quazzie / tellstick-plugin-mqtt-hass

Plugin for tellstick, connect to homeassistant via mqtt with autodiscovery.
39 stars 7 forks source link

Debug info #34

Open vlumikero opened 2 years ago

vlumikero commented 2 years ago

Hi,

I’ve had this plugin installed for about a year, but haven’t used it in a while. The plugin seems to have changed its behavior to posting messages with the topic telldus/znet/debug instead of …/binary_sensor. The content is e.g. “deviceState 119, state: 2, value: “.

Is this a setting? Am I missing something?

Thanks, Ville

vlumikero commented 2 years ago

I updated to the latest release. When I listen to telldus/# it just gets telldus/znet/available: offline.

What am I doing wrong?

quazzie commented 2 years ago

Nothing wrong, all state changes are published as homeassistant autodiscovery under homeassistant/(sensor type)/(znet name)/(znet device id)/state

vlumikero commented 2 years ago

How should I configure the plugin?

Right now it seems that the autodiscovery works, or at least I think so. The devices show up in HA but they are unavailable.

The autodiscovery message is


{"device": {"model": "Selflearning-Switch:Tellduseverflourish-Outdoor", "identifiers": "xxx", "via_device": "xxx", "name": "Brytare utkastare", "manufacturer": "Comen"}, "name": "Brytare utkastare", "state_topic": "homeassistant/switch/znet/111/state", "command_topic": "homeassistant/switch/znet/111/set", "availability_topic": "telldus/znet/available", "unique_id": "xxx_111"}
vlumikero commented 2 years ago

The availability topic telldus/znet/available shows unavailable. I’m guessing that’s why my mqtt sensors don’t work. Any ideas what the problem could be?

C6BD9D17-B2B8-4F53-9752-2E542E34C853

vlumikero commented 2 years ago

@quazzie Any ideas why telldus is shown as unavailable (see above)?

quazzie commented 2 years ago

There is some issue with the tellstick not reconnecting to mqtt when connection lost. Maybe the tellstick failed to reconnect? Try rebooting your tellstick.

vlumikero commented 2 years ago

It’s shown as offline even immediately after reboot. The states are sent under the homeassistant topic but HA shows the devices as unavailable. I’m guessing the erroneous availability topic throws it off.

quazzie commented 2 years ago

That is the old availability topic, new availability topic should be a binary_sensor named "hub" (homeassistant/binary_sensor/(devicename from config)/hub/state). Usually take a couple of minutes from reboot of tellstick until connect to mqtt. If it's connected you should se debug messages coming in on (basetopic)/(devicename)/debug Maybe you are looking at old config that has not been cleared for some reason.

vlumikero commented 2 years ago

Here’s my config. It seems like the autodiscovery topic is not used, or perhaps it points to another problem?

CAB7EC88-BA82-489B-A9E4-382B2C4B39EE

This is what’s posted under the base topic. No debug info.

DAAE58A7-86B1-4CA3-86D4-B77737F65B0C

But the devices seem to post info about themselves under the homeassistant topic:

402FA738-4681-4FA7-B84F-30147A5C0CF2