MQTT Topic Problem

I’ve been trying to get a feel for MQTT.

I’ve got a plug ‘gosund_tasmota6’ that I want to control, and I can do it with publish and subscribe nodes with the topic ‘gosund_tasmota6/cmnd/tasmota/POWER’, with a payload of ‘on’ or ‘off’.

It works OK, but I want to say that the plug is in (say) the kitchen, so I changed the topic in the publish and subscribe nodes to: 'kitchen/gosund_tasmota6/cmnd/tasmota/POWER - but it doesn’t work (with no connection). Can anyone explain why, please?
Jim

Did you change the topic/subscribe paths in your Tasmota device as well? Changing them in NodeRed merely tells NodeRed where to publish and subscribe to, but if you haven’t setup those topics in your Tasmota device, then it won’t publish and subscribe to them.

Got it - thanks ‘code-in-progress’!

No I didn’t alter the topic in the Tasmota device - I’ll do so.

BTW: are Tasmota devices the only MQTT devices commonly available for HA and Node-Red? They’re the only ones I’ve come across.
Jim

No problem!

Nope. Basically any device that supports MQTT can be used in both HA and NodeRed. It’s just a matter of knowing the topic structure the device uses in MQTT and then configuring HA and/or NodeRed appropriately.

Case in point: Zigbee2MQTT. :slight_smile:

I’m aware of Zigbee2MQTT, but am not sure what benefit it can offer over the Zigbee integration in HA.

Jim

I have a bunch of mini d1 type esp8266 boards running espeasy that is setup for mqtt.

I like espeasy because it has built in support for lots of different sensors and interface chips. Have them connected to relays to control sprinklers and my pool equipment. Also with reed switches (same as used for home alarms) to detect if garage door or garage freezer door is open. And a temp sensor for pool water temp.

Tasmota may be able to do the same type of thing, since I have it working with espeasy never tried with Tasmota.

1 Like

Tasmota does have support for MQTT, but personally I like how espeasy and esphome both implement it over Tasmota’s implementation.

What I meant was if Tasmota could interface with different hardware sensors and output devices like Espeasy. I know they both do MQTT.

For example, I use a DS18B20 to measure pool temp

With espeasy, I connected it up, told espeasy what I was connecting, and it worked (maybe a few more steps than that, but was easy to make it work).

Ahhh, sorry. I totally misunderstood there.

Honestly, I don’t think Tasmota is nearly as easy to setup like that (part of the reason we have projects like espeasy and esphome is due to how Tasmota works).

I’ve not come across espeasy and esphome, but see that there’s and integration for esphome. Maybe I ought to look into it - any tips?

Jim

1 Like

ESPHome would be my highest recommendation. It uses YAML for it’s configuration (so, much akin to HA’s own config files) and then, once deployed, tightly integrates with HA natively.

Thanks ‘code-in-progess’.

Can you recommend a simple project to get started?

Jim

Call me Bill (I guess I should add that to my profile one of these days).

Depends on the hardware you have around, but if you have something like a basic ESP8266 board (like a Sonoff Basic or something), try flashing that from the cookbook: DIY Examples — ESPHome

That’s what I started with. There’s a post in there from @frenck on how to create a cheap $2 doorbell that I still have on my back door.

1 Like