Tasmota has this inconsistency where if there's only one relay configured, it does not include the relay number; if more than one, then it adds it. There's no way for the template to know how many relays are configured, so you found the correct fix.
Global Moderators
Forum wide moderators
Posts
-
Struggling to setup my first Tasmota device and MQTT -
Struggling to setup my first Tasmota device and MQTT@cw-kid I have them with lux, barometric, distance, and temp/humidity sensors, while also using a couple as Bluetooth bridges. in this regard, your fantasy is the real limit.
I've recently moved everything I could to ZWave, because it is better in terms of stability, but ATM there's no equivalent for fancy sensors, even if ZigBee has a denter offer.
-
Struggling to setup my first Tasmota device and MQTT@cw-kid post some screenshots from mqtt explorer. It’s easier to follow, if you want my advice.
-
Struggling to setup my first Tasmota device and MQTT@cw_kid in your post here the configuration you posted is incorrect -- the indenting is invalid, and that will prevent anything from working for that entity.
Honestly, I can't at this stage really get a read on where you are. Between you jumping in with random AI changes and others commenting, your config is a moving target and I can't follow it. If you want my help, I will send you a link so you can upload your config and I can look at it and potentially fix it. Otherwise, I'll let you continue to learn on your own and seek help from others.
-
Struggling to setup my first Tasmota device and MQTTWhen asking AI, be sure to send the docs, the exact page. It will be more precise. All that said, here's my config
controllers: - id: mqtt name: MQTT enabled: true implementation: MQTTController config: # omitted... entities: # dehum tasmota_dehumidifier: name: "Dehum - sensors" include: tasmota_sensor_temperature_humidity topic: "tasmota-dehum" source: SI7021 tasmota_dehumidifier_switch: name: "Dehum - switch" include: tasmota_generic_relay topic: "tasmota-dehum" unit: ""You could probably consolidate them, but I prefer to have the switch and the sensors separated: it's easier to start and to manage them.
In you case, as per the post,
topic: "tasmota-dehum" should betopic: "fan_controller", whilesourceshould beAM2301`. -
Struggling to setup my first Tasmota device and MQTTMQTT Explorer is good for troubleshooting to make sure your data is actually getting to the broker IME
C
-
Struggling to setup my first Tasmota device and MQTTSorry, my bad, change the
includesection to look like this (I'll fix the example above as well):include: - tasmota_generic_relay - tasmota_sensor_temperature_humidityAlso, you can use yamllint.com to sanity-check your entire config file.
-
Struggling to setup my first Tasmota device and MQTT@cw-kid By the numbers:
tasmota_discoveryis not a thing in Reactor, so that won't work.- The AI-recommended use of 0.0.0.0 for the host IP address of your MQTT broker (mosquitto) is correct and recommended.
implementation: MQTTControlleris the correct usage (classis deprecated).- You should use the 127.0.0.1 (aka loopback) address for the MQTTController's
sourceconfiguration inreactor.yamlwhenever the MQTT broker (i.e. mosquitto) is running on the same host as Reactor; otherwise, use the LAN interface address (192.168.0.4 in your case). system:andextension_pathare also not a thing in Reactor configuration (another AI fantasy fact).- All ESP32s and other MQTT clients should use the LAN address for the MQTT host (192.168.0.4 as shown in your image; that's correct).
You need to use one of the available templates for Tasmota described in the MQTTController documentation or create a configuration of your own. The latter may be necessary for your configuration, but we need more info. Please show more of the Tasmota device configuration (screen shots), so we can help you with that.
Until then, just choose the simple included switch/relay configuration template to get things working (i.e. so you can see that Reactor sees the device and may be able to control it).
# In the controllers section of reactor.yaml: - id: mqtt enabled: true implementation: MQTTController name: Mosquitto config: source: mqtt://127.0.0.1:1883/ log_topics: ['tele','stat','tasmota'] # only for testing, disable when not in use (makes big log file) entities: tasmota_fan_controller: name: "Tasmota Fan Controller" topic: fan_controller # matches topic configured in Tasmota unit: 0 # relay number on the device include: - tasmota_generic_relay - tasmota_sensor_temperature_humidityThis may be all you need. Try it and see what happens. Don't forget to look at the logs when things aren't working as expected. And look at the
mqtt-topics.logfile to see what data you are getting (post a nice snippet of it here, along with everything else requested, if the device isn't working in Reactor). -
Existing Rule stopped working HTTP command fetching IP address from websiteHere's another one that is very likely to not have significant downtime: https://checkip.amazonaws.com/
If you still get errors with this one, I suspect your local network or something off with the configuration of your host.
-
Existing Rule stopped working HTTP command fetching IP address from websiteBest add some error detection, then.