Home Assistant Community

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

#182

i have tried that. doesn’t work reliably IMHO. So far Zanzito is the best solution I have came across. Communication between HA and my phone works the best via MQTT. It is fast and reliable. I just created a bunch of activities to turn on/off my switches in Zanzito way faster than in tasker. IMHO only thing missing is the always listen feature.

0 Likes

#183

I use HTTP shortcut, is very fast

0 Likes

#184

Valid points.
What I advice is to allow Zanzito to show the full content of notifications on the locked screen, it’s a system preference not zanzito’s. Then you’d just have to wake your phone. Depending on Android’s version, device brand and the presence of other notifications, zanzito’s notification might already be expanded, so you’d just have to press the mic button, without unlocking the phone. It’s not perfect from the p.o.v. of security, but it’s handy.
If zanzito’s notification is compressed, you’d have to two finger swipe down and then press the mic.

I explored other solutions:

  • a general hardware button combination to trigger vocal recognition, not possible because Android doesn’t allow it (you’d have to recompile the whole OS and flash your own ROM, that’s how some manufactures do it)
  • A widget (as you asked) is possible and it’s on my todo list. It requires some coding though, I don’t know how soon I will implement it.
  • We could use Google general voice recognition capabilities, so you could say something like “Ok Google, Zanzito, switch porch lights on”, but it would work only if the device is connected to a power source, otherwise you’d have to reach for Google app (or widget), which at the end seems more complicated. For example, look here, I might be wrong, but it doesn’t look very user friendly…
  • I could write Zanzito’s own voice recognition module, or use one of the other existing libraries, but I think it’s not worth the effort, considering all the implications… Google is there and it’s free for all Android apps, it comes with limitations, but as you said, it works…
  • There’s a vague chance to write a lock screen widget, like the meteo or the battery ones, but again Google looks very protective towards this things, with some reason: if any developer could write a widget that could easily bypass the screen lock, it wouldn’t be nice…

So, after all, I decided that a notification button would be easy enough to be reached for most uses.
A widget will come, sooner or later…

0 Likes

#185

In my opinion you could you use a configurable trigger command to be always on listen. Because i.e. my Android devices that use zanzito are constantly on charge so I did enjoyed if you could put the mic in always listen for example if I would say "Zanzito, "

Just my 2 cents

0 Likes

#186

Yes, that would be my next attempt, but it doesn’t look simple, we’ll see.

0 Likes

#187

Hi,
a new version of Zanzito (0.9.7b) is now available at Google Play store. Here’s what’s new:

  • Added support for FIND (https://www.internalpositioning.com);
  • Added support for JSON subscriptions with value extraction;
  • Added support for gps altitude;
  • Switched to PDF user manual;
  • Preferences and UI improvements.

In particular, the support for FIND includes both tracking and learning and it’s working beautifully in my tests: I’d be glad to hear about yours.
Zanzito’s FIND support works only with local, private FIND servers (Zanzito connects to one MQTT server only). I managed to install it, with some work, see here.
Let me know.

Also, now you can define a custom topic, indicate a JSON key and be presented with the key’s value only, I hope you’ll find this useful.

Thanks,
gl

0 Likes

Tracking altitude
#188

Thank you MrMep,
Find integration working great

1 Like

#189

Hello MrMep,
You are a talented android developer.
You have implemented almost all the features required to use the app as a companion with home automation software.
One thing if I can ask you is Do you have any plan to integrate iBeacons to the app.

  • Get the phone to act like an iBeacon continuously

  • Send an update to server if the phone sees a beacon

  • Bookmark locations along with beacons

1 Like

#190

Thanks anilet!
I don’t have any plan about iBeacon technology at the moment.
I don’t trust Bluetooth in general: I think it’s a clumsy framework that has never worked properly, generally speaking.
But ok, I take the hint, we’ll see :slight_smile:

1 Like

Tracking altitude
Does it use iBeacons?
#191

Hi guys,
I managed to write down a notifier component for Zanzito.
Before sending a PR for it to be officially included in HA, I would like to be sure I got it right in terms of functionality.
I hope some of you are willing to test it in their environments and report back.

Please, understand this is not an official HA platform yet, there are still a couple of technical things that need to be discussed with HA boss(es).

You can download the component file zanzito.py from [here] (http://www.barbaro.it/cms/images/android/zanzito.py) (right-click to save the file).

It needs to be copied into your HA notifier custom components directory (within your configuration directory).
The path would be:
<path-to-ha-config-dir>/custom_components/notify/

To setup the component, add to your configuration.yaml something like:

notify:
  - name: My device
    platform: zanzito
    device-name: my_device_name

my_device_name is the name you put in your Zanzito’s preferences. You can call the notification service in the action: part of your automations.

To send a text notification:

  - service: notify.my_device
    data:
      message: 'Message body'
      title: 'Message title'

To send a TTS notification:

  - service: notify.my_device
    data:
      message: 'Message body'
      data:
        say:

To trigger an alarm:

  - service: notify.my_device
    data:
      message: 'Wake up!'
      data:
        alarm: 'on'

To stop an ongoing alarm:

  - service: notify.my_device
    data:
      message: ''
      data:
        alarm: 'off'

To send an SMS:

  - service: notify.my_device
    data:
      message: 'This is an SMS msg!'
      data:
        sms: '<dest-phone-number>'

To send an image from local file:

  - service: notify.my_device
    data:
      message: ''
      data:
        photo:
          - file: '<path-to-your-local-image-file>'

To send an image from url:

  - service: notify.my_device
    data:
      message: ''
      data:
        photo:
          - url: 'http://<your-destination>'
            username: <username>
            password: <password>

username and password are optionals.

All the above types of notification are builtin in Zanzito. If you wish to experiment further, you can setup a notifier with a fake device-name and manually subscribe to it in the Reports section. All topics name information is in the manual.

Latest versions of Zanzito and Home assistant are required.

That would be all for now, thanks!

gl

4 Likes

Zanzito component in hass.io?
MQTT Notifications via notify domain
#192

Count on me to do it next week can you also add the sensors automatically? It would be great

0 Likes

#193

Thanks,
auto-setup would be work for another component, this is just a notifier, but good suggestion, thanks!

0 Likes

#194

Wonderful! Works like a charm. I put this in my custom_components/notify folder.

1 Like

#195

HI all, looking to post an image from a raspberry pi via MQTT, and in a way that is compatible with https://home-assistant.io/components/camera.mqtt/ Can anyone point me towards a python package for doing that? Thanks!

0 Likes

#196

will this work all time? I mean the zanzito I have I need to wake up all time, to recieve/send topics

0 Likes

#197

Hi, have a look at Zanzito’s manual, Technical Addenda: there’s a simple python script that does that, maybe you can start with that.

1 Like

#198

Hi Claudio, I don’t understand: what do you mean you need to wake up?

0 Likes

#199

I hadn’t tried that, great!

0 Likes

#200

turn on the phone (not from totally off, just turn on the screen) and then open zanzito app

0 Likes

#201

yeah. it is better to put it there until it is made into the official component.

By the way, I have tried the alarm. It works. But how do I stop the alarm on my phone? I had to reboot my phone to make it stop.

1 Like