Jump to content

Multi-channel device support?


giomania

Recommended Posts

I was wondering if it is possible to support multi-channel devices? I have an Athom Tasmota 4-channel relay, and multiple topic payloads can be set buy rule to control the various channels, but it believe this node server only supports a single cmd_topic per device? I hope that makes sense. 

Thank you.

Link to comment

i use multi channel with it..

{"id": "sonoff1", "type": "TempHumid", "status_topic": "tele/sonoff1/SENSOR", "cmd_topic": "cmnd/sonoff1/power"},  
{"id": "sonoff2", "type": "switch", "status_topic": "stat/sonoff1/POWER", "cmd_topic": "cmnd/sonoff1/power"},

both use the sonoff1 device, just different names and commands per line...

Link to comment

My apologies, I should have specified multi-channel power devices. Your example uses 1 TempHumid and 1 switch, so I am not sure if that would work for my situation. It is a four-channel power relay with NO and NC terminals: https://www.athom.tech/blank-1/4ch-inching-self-lock-relay

I did research and MQTT can address multiple power devices by using Power1, Power2, etc., so that is what I have been attempting to do, but it is not working. This is what is in the devfile, but the nodes are not added. Perhaps the syntax is not correct?

{"id": "HTFans", "type": "switch", "status_topic": "stat/HTFans/POWER1", "cmd_topic": "cmnd/HTFans/Power1"}, {"id": "HTFans", "type": "switch", "status_topic": "stat/HTFans/POWER2", "cmd_topic": "cmnd/HTFans/Power2"}, {"id": "HTFans", "type": "switch", "status_topic": "stat/HTFans/POWER3", "cmd_topic": "cmnd/HTFans/Power3"}, {"id": "HTFans", "type": "switch", "status_topic": "stat/HTFans/POWER4", "cmd_topic": "cmnd/HTFans/Power4"}

Thank you.

Edited by giomania
Link to comment

I determined why the nodes were not added. It was because I have another smart plug with the ID: "HT_Fans", as well as this 4-channel relay with the ID: "HTFans". I noticed in the node server log that the underscore was removed from the smart plug, apparently (I might be wrong there, lol). Anyway, I changed the 4-channel relay  ID to: "4DFans", and it was successfully added.

That said, I still cannot control it, so I suspect there is an issue with the commands controlling the power to each relay. I can switch the relays on or off in the device, and the status change is reflected in the Admin Console, but the commands for each relay do not work, presumably because it is configured as a switch, not a multi-channel switch.

When I use the "powerx" commands (with x corresponding to each relay number) in the device console , the individual relays (1-4) power on or off, so I know the commands work in the device, but not through MQTT.

Also, the node only appears as one device in the Node Server, because (again, presumably) it is configured as a switch, vice a multi-channel switch.

If I were able to use multiple MQTT topics to define each relay as a separate topic, I think it would work. But apparently, that is not possible with Tasmota.

Mark

Edited by giomania
Link to comment
Guest
This topic is now closed to further replies.

×
×
  • Create New...