Announcing MQTT/Android bridging app: Zanzito. Beta testers wanted!

I have been using the always listening voice command feature extensively. It works so well that I have been considering replacing all my echo dots with this.

However, one of the thing that prevent me from doing that is the reliability of it hearing my command accurately comparing to echo dot. If I place my phone next to an echo dot and speak from a distance, only echo dot can understand me correctly. While my phone didn’t get what I said.

I believe this is hardware limitation rather than a software issue. While echo dot has 8 microphones array in it’s body, my phone has only one.

To overcome this limitation, I’m thinking of using an external device that has really good mic. But I don’t know any in the market.

Does anyone has any suggestion? Thanks.

Jabra 510, great mic and speaker, highly recommended

Will you leave a smartphone running in every room you have a dot now?

Can you give me example of your usage?

You put mqtt topic for any HA action (light, switch, script, automation), and then call/modify the topic with your voice?

The problem with Bluetooth mic is it is not always listening. It works great when you make a phone call but I don’t think it will work as always listening virtual assistant. I’m thinking of PS3 eye but you need a USB port for that.

Yes. I plan to put my old phones in all my rooms.

Yes. Zanzito will listen to command and publish to a topic with a payload. HA will trigger the automation to turn on/off devices using mqtt trigger.

Maybe OTG cable

Yeah. Maybe I should get one and try it out.

Problem is charge. I think the Jabra is always listening, will have to try that out

Other solution is those cheap Android boxes (a previous year version should be available for 10-20 and attach a mic to it

good idea. i have few of those!

Yes, better than a phone always on. Need to be verified that a mic is always listening, maybe to find an app that does that.
Let me know if you find one

Edit
Something like

Wireless MIC Advanced ?

So basically every light, switch and script?

this is great. maybe i can install this in my phone and use my phone as remote mic for the zanzito in my rooms.

Yes. Basically this is much versatile than Alexa. I’m planning to use it for these commands…

  1. “Turn on/off lights (or any devices)”
  2. “Tell me a joke” - reply back with random jokes
  3. “Where is my phone?” - reply back location name and trigger my phone alarm.
  4. “Set timer for XXX minutes” - will sound the alarm after XXX minutes.
  5. “Wake me up at X o’clock” - will trigger my alarm clock automation at X o’clock.
  6. “Good morning” - will great me back and read out current weather forecast and any calendar events.
  7. “How is the weather” - will reply back with the current weather status and forecast.
  8. “Thank you” - reply back “you are welcome”.
  9. “How are you?” - reply back with “I am fine” or “I’m not feeling good” and follow by the CPU, RAM and storage status.
  10. “Who is at home?” - reply back with the list of occupants that are still at home.
  11. “Who is away?” - reply back with the list of occupants that are away.
  12. “Where is XXX?” - reply back with the zone name of the XXX that is currently in.
  13. “Pause TV”, “Resume TV”, “Turn up volume/louder”, Turn down volume/softer", “Mute TV”, Unmute TV", “Play next”, “Play previous”, “Stop TV” - use it to control the TV/Plex
  14. “Good night” - run the “good night script” (turn off all switches, turn on night lamp) and wish you good night.
  15. “Play some music” - play random playlist from Spotify.

That’s all I have in mind. Feel free to suggest more “skills” to me. Thanks.

2 Likes

Light and switch you use HASS, I don’t get how you achieve the other commands, like jokes and so on… ??

All can be done using automation. Example of “Where is my phone” command…

in Zanzito (every rooms)…

Add this activity…

Name: Chit chat (or anything you like)
Topic: %devicename%/chitchat
Payload: whereismyphone
Voice cmd: where is my phone

Make sure your phone also has Zanzito with the device name “mydevicename”.

In HA automation…

- alias: 'MQTT Chit Chat - where is my phone?'
  trigger:
    platform: mqtt
    topic: +/chitchat
    payload: "whereismyphone"
  action:
    - service: mqtt.publish
      data:
        topic: zanzito/mydevicename/alarm/play
    - service: mqtt.publish
      data_template:
        topic: >-
          zanzito/{{ trigger.topic.split('/')[-2] }}/notification
        payload: >-
          Your phone is{% if states('device_tracker.owntrack_user1') == 'not_home' %} not at home {% else %} at {{states('device_tracker.owntrack_user1)}} {% endif %}. I have triggered the alarm so that you can find it. Good Luck!

The concept is very simple. Zanzito is just capturing your voice and then trigger the corresponding activities you have created in Zanzito. The corresponding activity will publish to the specified MQTT topic with the payload.

With this MQTT message, it will trigger the relevant automation in HA using MQTT trigger. If you are familiar in creating automation in HA, then you can automate all sorts of things using your voice.

3 Likes

I’m unable to connect to my MQTT broker with TLS. In the Zanzito logs I see the following:

Not connected: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found

and in the Mosquitto log I see:

1494575238: New connection from x.x.x.x on port 1883.
1494575238: OpenSSL Error: error:14094416:SSL routines:SSL3_READ_BYTES:sslv3 alert certificate unknown
1494575238: OpenSSL Error: error:140940E5:SSL routines:SSL3_READ_BYTES:ssl handshake failure
1494575238: Socket error on client , disconnecting.

I have already installed Owntracks on the phone and it is working just fine.

Hi, two things:

  1. I see the port is 1883: is that the port for TLS connections, in mosquitto configuration?
  2. Did you import the CA certificate in Android? (not through Owntracks, but at a system level)

Yes, I use 1883 for TLS.

And I did import the CA certificate at system level (you have to do that for Owntracks as well). It’s imported with use set to “VPN and apps”.

I did just try to change my mosquitto server certificate. I was using a certificate create from instructions in Owntracks, using a self-created ca certificate.
I switched to a server certificate from cacert.org. I’m still getting the same error with Zanzito, but Owntracks is working fine.
What I noticed was that Owntracks did give me the same error until I updated the path to the ca certificate file inside Owntracks. As far as I can see there are no option inside Zanzito to specify the ca certificate, could that be where the problem originate?

Would I be abusing if I asked you to share your configurations of zanzito? Is this even possible? So that maybe have some sort of cookbook for zanzito based on your work since i guess you are the one with more use cases onto zanzito :slight_smile:

Sure. I plan to share my examples once I get everything works perfectly. I am still in Work in Progress stage. I might share them in another thread so that I won’t flood this thread with unrelated posts.

@HVPereira

I have shared them at My Jarvis using Zanzito (Skills Collection)