#Tasmota, MQTT, HomeAssistant and Auto Discovery

36 messages · Page 1 of 1 (latest)

molten dragon
#

I've recently gotten myself a Sonoff Zigbee Bridge Pro, onto which I've flashed Tasmota. I've set up an MQTT broker and manually configured a ZigBee switch in configuration.yml which I now can control from HA by publishing a message from the WebUI to topic cmnd/tasmota_6C8778/ZbSend with payload {"Device":"0x0F0D","Send":{"Power":1}}.

However, I have a feeling that using ZbSend for this is wrong. I would expect publishing to e.g. cmnd/switch1/Power with payload ON, but that's just my feeling.

Additionally, it seems that the "autodiscovery" is not working at all. I have several Zigbee devices connected to Tasmota, but none appear in the HA UI. I haven't added any specific config related to this, AFAIK.

Thanks in advance!

Related docs:
[1] https://tasmota.github.io/docs/MQTT/
[2] https://tasmota.github.io/docs/Commands/
[3] https://tasmota.github.io/docs/Commands/#setoption19 (discovery protocol)

vital ruin
#

You'd be a world better off using ZHA or Zigbee2MQTT, though that ZBBridge Pro is generally not great and a proper coordinator would be better

molten dragon
#

@vital ruin

  • What is a proper coordinator in your opinion?
  • Where does Zigbee2MQTT run?
vital ruin
#
  1. See the pins in #zigbee-archived - Tube or SMLight (or a great many other things, other than Sonoff)
  2. On the same host as HA, if you want
molten dragon
#

Thanks

Do you have any example messages for how data is sent and retrieved with Zigbee2MQTT? I am interested in the format

vital ruin
#

Well, other than their own docs?

#

They cover it pretty well, it's all (just) JSON payloads on the broker - kinda similar to Tasmota

#

Of course, they also have fully working MQTT Discovery for HA, so you don't have to care about the fact that it's MQTT

molten dragon
#

Anyway, I am trying to avoid jumping ship. I've invested in some hardware already and it'd be great to have it working. I am just trying to figure out if I'm doing things the right way, and if someone can point me to some articles or docs that I haven't stumbled upon yet.

#

Would you also mind explaining what is meant with "auto discovery" or "MQTT discovery"? To my understanding, any devices connected to my Tasmota device should pop up in HA - and they don't.

vital ruin
#

Right, but that discovery only applies to the Tasmota devices themselves

vital ruin
#

If you want simplest to set up, then ZHA is the way

#

If you want MQTT then Zigbee2MQTT is the way

molten dragon
#

Additionally, what should I expect when I run ZHA? How well will devices function?

For instance, right now I have no clue what payloads to send to some of the devices via MQTT. Is there some way to ask the device what capabilities it has?

vital ruin
#

If you want to know about Tasmota, you should join their Discord and ask them

#

Though, with HA you've got zero need to hand craft those payloads

vital ruin
#

If so you've got bigger problems than that

molten dragon
vital ruin
#

Then ... you have bigger problems

#

If you honestly expect to be the target of APT then you need more help than we can give 😉

#

Nobody else is gonna give a shit about trying to break your Zigbee setup

#

And, frankly, even they won't

#

Also, if you're really that worried, I hope you're using TLS/SSL everywhere, and not using self signed certs

#

And otherwise adopted zero trust

molten dragon
#

Just because it is unlikely doesn't make it an unreal threat. I prefer security and want to rely on unauthenticated serial connections over LAN

vital ruin
#

Then you need to use a USB based coordinator

molten dragon
#

:/

#

I will see what I can find through Tasmota communication channels

plucky sunBOT
vital ruin
#

Link there for you