Jump to content

How to add all 4 channels in Sonoff 4CH Pro to appear in MQTT NS?


Go to solution Solved by TriLife,

Recommended Posts

I'm new to MQTT. I have a Sonoff 4CH Pro (4 relays) that I have been controlling using the eISY network resources. Time to grow up and transition over to using MQTT as I swap out hardware that is no longer manufactured. 

Following xKing and @TriLife's instructions on various threads, I was able to set up eisy's Mosquitto as broker and a .yadl file to define the device. Wasn't sure whether I should create one device and somehow the broker would let MQTT know there are 4 devices, or if I should create 4 devices. I tried it both ways and am stuck with only one controllable relay of the 4.

In the Sonoff Tasmota web interface, it shows a few topics I've tried using (tasmota_%6X, tasmotas, and tasmotas_725533). Only tasmotas_725533 produces a node that allows me to send on/off commands, and only to the 1st channel/relay in the 4CH Pro. 

image.thumb.png.ad3d2dabf0252b478b87e67c7f0af324.png

 

Here's the device list in my .yaml file below. I'm guessing I need a different topic path for each channel but can't figure out how to find them. I searched through the Tasmota documentation for this device and various forums but didn't turn anything up.

devices:

- id: "SO1_DesVenOpen"
  name: "Sonoff4CH1_DesVent_open"
  type: "switch"
  status_topic: "stat/tasmota_725533/POWER"
  cmd_topic: "cmnd/tasmota_725533/POWER"
- id: "SO2_DesVenClos"
  name: "Sonoff4CH2_DesVent_close"
  type: "switch"
  status_topic: "stat/tasmota_725533/POWER"
  cmd_topic: "cmnd/tasmota_725533/POWER"
- id: "SO3_LoRoofOpen"
  name: "Sonoff4CH3_LoRoof_open"
  type: "switch"
  status_topic: "stat/tasmota_725533/POWER"
  cmd_topic: "cmnd/tasmota_725533/POWER"
- id: "SO4_LoRoofClos"
  name: "Sonoff4CH4_LoRoof_close"
  type: "switch"
  status_topic: "stat/tasmota_725533/POWER"
  cmd_topic: "cmnd/tasmota_725533/POWER"

Any help is appreciated.

Link to comment
  • Solution
6 hours ago, cosyn said:

I'm new to MQTT. I have a Sonoff 4CH Pro (4 relays) that I have been controlling using the eISY network resources. Time to grow up and transition over to using MQTT as I swap out hardware that is no longer manufactured. 

Following xKing and @TriLife's instructions on various threads, I was able to set up eisy's Mosquitto as broker and a .yadl file to define the device. Wasn't sure whether I should create one device and somehow the broker would let MQTT know there are 4 devices, or if I should create 4 devices. I tried it both ways and am stuck with only one controllable relay of the 4.

In the Sonoff Tasmota web interface, it shows a few topics I've tried using (tasmota_%6X, tasmotas, and tasmotas_725533). Only tasmotas_725533 produces a node that allows me to send on/off commands, and only to the 1st channel/relay in the 4CH Pro. 

image.thumb.png.ad3d2dabf0252b478b87e67c7f0af324.png

 

Here's the device list in my .yaml file below. I'm guessing I need a different topic path for each channel but can't figure out how to find them. I searched through the Tasmota documentation for this device and various forums but didn't turn anything up.

devices:

- id: "SO1_DesVenOpen"
  name: "Sonoff4CH1_DesVent_open"
  type: "switch"
  status_topic: "stat/tasmota_725533/POWER"
  cmd_topic: "cmnd/tasmota_725533/POWER"
- id: "SO2_DesVenClos"
  name: "Sonoff4CH2_DesVent_close"
  type: "switch"
  status_topic: "stat/tasmota_725533/POWER"
  cmd_topic: "cmnd/tasmota_725533/POWER"
- id: "SO3_LoRoofOpen"
  name: "Sonoff4CH3_LoRoof_open"
  type: "switch"
  status_topic: "stat/tasmota_725533/POWER"
  cmd_topic: "cmnd/tasmota_725533/POWER"
- id: "SO4_LoRoofClos"
  name: "Sonoff4CH4_LoRoof_close"
  type: "switch"
  status_topic: "stat/tasmota_725533/POWER"
  cmd_topic: "cmnd/tasmota_725533/POWER"

Any help is appreciated.

Hi, you're close!

Replace "POWER" with "POWER1", ..2 ..3 .. 4. For each switch you're trying to control...

In case you need to controll ALL on/off, create a 5th device and use "POWER0".

I'm away from my computer right now. You might want to follow the instructions on lower/upper case for POWER... Tasmota doesn't care, but the MQTT plug-in might.

  • Like 1
Link to comment

That worked! Thanks so much. I wouldn't have figured that out from the Tasmota command list. And thanks for taking over developing this NS from xKing! It's really a boon after many Insteon-based manufacturers have fallen.

  • Like 1
Link to comment
1 hour ago, cosyn said:

That worked! Thanks so much. I wouldn't have figured that out from the Tasmota command list. And thanks for taking over developing this NS from xKing! It's really a boon after many Insteon-based manufacturers have fallen.

I'll make sure to add this to the instructions on the next iteration.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...