Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

Posted

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.

Solved by TriLife

Go to solution
  • 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.

  • Author

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.

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.

Guest
This topic is now closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.