Zanzito - A lightweight bridge between your Android device and your MQTT/home automation system

Android permissions?

Implementing this does not cause any errors, but it doesn’t actually do anything useful either. I tried this and I still get zone hits from low accuracy readings. Sometimes the accuracy is 2000 meters which is over a mile. It is a ridiculous oversight to implement max_gps_accuracy for OwnTracks and not the other GPS based device_trackers. Very disappointing.

I noticed that too! But with Owntracks emulation activated in Zanzito (although the manual states that it isn’t necessary) and the following configuration in Hass

device_tracker:
  - platform: owntracks
    max_gps_accuracy: 200
    mqtt_topic: "owntracks/#"

it gives less incorrect location changes. Although I just tried it today so I have to test it more.

Bumping this. @MrMep Any ideas? I’d love to use the light sensor without the proximity sensor over writing the value.

Is there a way the name of the proximity and light sensors can be changed? Here is my reasoning for asking…

When you enable 1, they both get enabled. I am guessing the sensors are shared? Problem is when you add a sensor and the mqtt message is received for 1, the other which in my case does not provide a value will overwrite the previous value. Example.

(light sensor) zanzito/phone/tmd490x_als_prx 54
(proximity sensor) zanzito/phone/tmd490x_als_prx

This is in the mqtt logs ^

So if I add an mqtt sensor for the light sensor and expect that sensor to keep its previous value which in the above example would be 54, it gets overwritten by the null value below in the next sensor (proximity) update.

If you go in the app settings and enable 1 or the other, they are basically named the same thing.

TMD490X ALS_PRX
TMD490X ALS_PRX

I’m using a samsung galaxy s7 so I’m not sure it makes a difference.

The only way around this is if I enable instant updates of the sensors as the light sensor will constantly send updates. Good from a standpoint that I always get an updated sensor but bad in that I’m constantly sending traffic and draining the battery. It is when I set to a heartbeat that the proximity sensor null value overwrites the light sensor value because it is the last update to come across. If each were named independently, the light sensor would never get overwritten. The proximity sensor on my device just never sends an update. It is always blank.

@MrMep any thoughts?

That is a good point about using the OwnTracks emulation in Zanzito to get max_gps_accuracy functionality. I’ll give that a try, because false triggers for automations is pretty much a deal breaker. They need to be reliable.

1 Like

Hi, I changed my configuration and now I need to fix my Zanzito settings.
Need help.

My settings is now a pi3 as reverse proxy with Caddy.
Inside my lan I have Hassio on a NUC without https, and I put the Mosquito broker on a pi3 inside the LAN, (but I can change this.).

Inside the LAN Zanzito works fine. Now I need to find a good solution to make it work outside the LAN (Zanzito is my favourite notifier).

Recommendations?

PS 443 and 80 are the forwarded ports from the router to the caddy reverse proxy pi3 (as per caddy instructions

OwnTracks emulation is allowing me to use max_gps_accuracy and it is working great.

claudio, I setup multiple mqtt servers, one in a dmz running tls and authentication with only the tls port exposed, and a secondary within the hass lan environment that is bridged. Zanzitto has a ‘home host’ mqtt profile based on a list of wifi sid’s that will switch to internet or lan based.

Now if the author would address the gps issues and/or at least the find integration dependency on gps - I would have a pretty good room presence detection system (assuming I have my phone on me)…

-pd

yes I saw that, problem is that I have multiple SSID in the house, so ideally I need a solutiojn that works automatically if I am in WIFI or outside.

Before it was working great using HASSIO on https:xxx.duckdns.org, , but now I moved all my HASS behind the proxy

It does work automatically? You can have multiple ssid’s listed according to the manual, one per line if i remember right, and it automatically flips between the two mqtt servers accordingly if its on a defined wifi ssid or not.

-pd

Ohh I don’t know that, that would solve that issue

Hi, could you help me figure out what am I doing wrong?

On my HASSIO NUC I do have also the Caddy server proxy plugin with the below configuration

   https://xxx-mqtt.duckdns.org {      
    tls /ssl/fullchain.pem /ssl/privkey.pem {                            
        alpn http/1.1                                                    
    }                                                                    
    proxy / 192.168.1.239:8883 {                                            
        transparent                                                      
        websocket                                                        
    }                                                                    
    log stdout                                                         
    errors stderr                                                      
}

In a raspberry pi3 at address 192.169.1.239 I do run a mosquitto server

In zanzito I should put under “MQTT Connection” the following

Host
xxx-mqtt.duckdns.org
Port 8883 (or maybe 443???)
Security “SSL/TLS Connection” ticked

In my router I forwarded port 80 and 443 to my HASSIO NUC with reverse proxy addon
In my router I forwarded port 8883 to my raspberry with mosquitto server

Is not working …

I’m not sure the Zanzito app supports websockets, and if it does that is usually port 9001 assuming you have it turned on within mosquitto.

I am using mosquitto with tls natively and just forwarding 8883 direct.

-pd

I think I understand. Well I just opened the port 8883 and 1883 on the router, and now it works.

Wonder if there is a solution of opening just port 443 and 80 … thats is the whole purpose of a reverse proxy: not opening port and be the only way in the home network

is zanzito as the option to see Bluetooth le and send notification like in owntrack?

Is there a reason why zanzito is coming up with a “zanzito is using battery” notification from Android itself? I’ve noticed that the app doesn’t run in the background and is keeping the app in the foreground the whole time. I turned off pulse update and went to instant updates (250m GPS accuracy). I’ve already purchased the full license as well, and if I can suggest - hide the icon for the license please!

I have a strange issue here.
Stauts reports are not shown. I subscribed to /# on a different client, I can see all mesages send by homeassistant and from zanzito if I publish them by hand using the activity option.
If I want to send my location or sensor data nothing shows up. Logs on zanzito show that messages have been send.
I’m running mqtt in Has-io on a pi3 with Mosquitto and ssl.

Edit Found my error, # is the right topic

I have the problem that the FIND integration is not working.

It sends the MQTT message, formatted properly, but the message does not match the fingerprints on my local server.

Does the learn function store the fingerprints in the local server by default or do I need to do something to make this function properly?

Example Zanzito-FIND MQTT fingerprint: e4f042d9980748e4f042d9980b48e4f042d9859c64e4f042d97c5f71e4f042d9859869e4f042d97c5b78

Example FIND fingerprint: e4f042d9980745e4f042d9980b49e4f042d9859c66e4f042d97c5f75e4f042d9859868e4f042d97c5b81

I am not sure I am using this correctly? Does it use the same rest sensor FIND uses, or should I do something else in Home Assistant?

My config.yaml:
- platform: rest
resource: http://HA_IP:8003/location?group=wardhead&user=daddy
value_template: ‘{{value_json.users.daddy[0].location}}’
method: GET
name: Daddy’s Internal location
scan_interval: 1

Possibly a silly question but I’m going to ask anyway… why switch to Zanzito when Owntracks seems to work fine and is (as far as I can tell) still being developed?

Also, why Zanzito and not an open source application?

2 Likes

Another question relating to FIND integration:

I have recently moved to FIND3, which now uses MQTT format - FAMILY/location/USER while the old FIND and the Zanzito integration uses - FAMILY/track/USER

Is there any plan to update this, or to offer an option in settings to choose which version of FIND you are using?

Thank You