Zanzito problems for a newbie

I just begin to use zanzito as mqtt extension and i succesfully configured it to connect with my home assistant broker but i am having BIG problems with the activities configuration in zanzito.
Major problem is what to put inside payload entry when trying to send sensors value to the mqtt server.
About battery of my device i put topic as zanzito/s8/battery_level, but really don’t know what to put inside payload and if retained or not. This is also for all the other activities like location and status of my device.
Can someone helps me to fix this ?

You don’t need to do this.

Just go into preferences, sensors, and enable the sensors you want to send to MQTT.
Preferences > Location > Track location

You don’t need to manually do anything in ‘Activities’

Yes, ok and i have location tracking working very good, but i have also other entries regarding zanzito in my sensors. Like these:

- platform: mqtt
  name: "Samsung S8+ Battery"
  state_topic: "zanzito/s8/battery_level"
  qos: 0
  unit_of_measurement: "%"
  value_template: "{{ value_json.battery_level }}"
  retain: true

- platform: mqtt
  state_topic: "zanzito/s8/device_info"
  name: 'Samsung S8+ Status'
  value_template: "{{ value_json.battery_charging }}"
 
- platform: mqtt
  state_topic: "zanzito/s8/device_info"
  name: 'Samsung S8+ Status'
  value_template: "{{ value_json.charge_type }}"

But i have all of them as unknown state.
I have also this in binary_sensor:

- platform: mqtt
  name: "Zanzito status"
  state_topic: "zanzito/s8/status"
  payload_on: "1"
  payload_off: "0"
  sensor_class: connectivity

and in device_tracker i have:

- platform: mqtt_json
  devices:
    maurizio: zanzito/s8/location

And in the frontend of HASS i get always ‘OFF’
Log says:

2018-05-25 11:06:40 ERROR (MainThread) [homeassistant.helpers.template] Error parsing value: ‘value_json’ is undefined (value: send charge, template: {{ value_json.battery_level }})
2018-05-25 11:06:42 ERROR (MainThread) [homeassistant.components.device_tracker.mqtt_json] Error parsing JSON payload: on

Where is the error?

try:
value_template: '{{ value_json }}'

This for all the three sensors?

just for the battery

Ok, and what about the other errors regardin binary sensor and mqtt_json devi cetracker?

for device tracker, I prefer to let zanzito emulate owntracks, then on HA, I just enable owntracks.

For the device_info, I have had trouble getting that data from HA. I use node-red to grab the data and update things I need.

You mean enable owntracks emulation on zanzito prefs? Or activating owntracks platform on HASS?
Will you share some config about these ?

Well, in order for it to work, it would require BOTH, as I said I have set up.

About what?

Enable owntracks emulation in zanzito.

Enable Owntracks in Home Assistant.

DONE.

Both if possible…

HUH?

Enable Owntracks Emulation in Zanzito preferences.

Then enable Owntracks in Home Assistant.

I don’t know if I could possibly make that much simpler. It’s 2 steps, that I really cannot simplify.

1 Like