Device Groups configuration

223 views
Skip to first unread message

Francisco Conceição

unread,
May 9, 2020, 5:54:43 AM5/9/20
to TasmotaUsers
Hi everyone,

I have a LED strip with a H801 module, that I would like to control with the 2nd and 3rd button of two SONOFF 3 buttons switch. I don´t have a MQTT broker.
I took a look at device groups and that seems the answer. Use a multicast group instead of rules seems a lot better. My question is:

How do I control which button/relay listen to the Device Group message?



Many thanks.
Francisco

Philip Knowles

unread,
May 9, 2020, 6:43:38 AM5/9/20
to TasmotaUsers, Francisco Conceição
Not sure I understand the question. Do you mean how do you get the Sonoff 2nd and 3rd buttons to send the message to H801? Essentially I think you would still need to create Rules in the Sonoff which create the multicast messages to send to the H801.

Regards

Phil K

Sent from Outlook Mobile


From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of Francisco Conceição <franc...@gmail.com>
Sent: Saturday, May 9, 2020 10:54:43 AM
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Device Groups configuration
 
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/67b52edf-9177-4d82-91a1-682ca44d8be7%40googlegroups.com.

Paul C Diem

unread,
May 9, 2020, 7:34:22 AM5/9/20
to Philip Knowles, TasmotaUsers, Francisco Conceição

Relays are shared one-to-one in device groups so if you choose to send/receive the power state, turning relay 1 on will turn relay 1 on in the whole group. Turning relay 2 on will turn relay 2 on in the whole group. etc.

To control different relays, you need to create rules that fire the DevGroupSend command to send power state changes to the group (or you could use DevGroupSend to send actual commands).

Francisco Conceição

unread,
May 9, 2020, 10:24:02 AM5/9/20
to TasmotaUsers
Thank for your reply,


My scenario is
  • 2x H801 LED controller (named H1 & H2)
  • 2x SONOFF Touch 3 Gang (named S1 and S2)
  • Groups: KitchenLED & EntranceLED

KitchenLED: H1, S1 button 2, S2 button 3

EntranceLED: H2, S1 button 3, S2 button 2

I think rules adds complexity (for a noob like me) to synchronize devices states, so I´m trying to use device groups. 
For now I´ve switched the relay/button template from the 2x SONOFF devices so the physical buttons are mapped to to relay1/button1. That fixes my problem for now with only one LED controller.
But if I try to control a 2nd LED controller, how would I use DevGroupSend with group separation? Is it possible to apply the mask applied per group? Could you please give me an example. Thx













sábado, 9 de Maio de 2020 às 12:34:22 UTC+1, Paul C Diem escreveu:

Relays are shared one-to-one in device groups so if you choose to send/receive the power state, turning relay 1 on will turn relay 1 on in the whole group. Turning relay 2 on will turn relay 2 on in the whole group. etc.

To control different relays, you need to create rules that fire the DevGroupSend command to send power state changes to the group (or you could use DevGroupSend to send actual commands).

On 5/9/2020 5:43 AM, Philip Knowles wrote:
Not sure I understand the question. Do you mean how do you get the Sonoff 2nd and 3rd buttons to send the message to H801? Essentially I think you would still need to create Rules in the Sonoff which create the multicast messages to send to the H801.

Regards

Phil K

Sent from Outlook Mobile


From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of Francisco Conceição <franc...@gmail.com>
Sent: Saturday, May 9, 2020 10:54:43 AM
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Device Groups configuration
 
Hi everyone,

I have a LED strip with a H801 module, that I would like to control with the 2nd and 3rd button of two SONOFF 3 buttons switch. I don´t have a MQTT broker.
I took a look at device groups and that seems the answer. Use a multicast group instead of rules seems a lot better. My question is:

How do I control which button/relay listen to the Device Group message?



Many thanks.
Francisco

--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonof...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonof...@googlegroups.com.

Paul C Diem

unread,
May 9, 2020, 10:36:52 AM5/9/20
to Francisco Conceição, TasmotaUsers

Configure your device groups with: Backlog DevGroupName1 KitchenLED; DevGroupName2 EntranceLED

In your rules, use DevGroupSend1 128=^ to toggle the power of KitchenLED and DevGroupSend2 128=^ to toggle the power of EntranceLED

To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/6b4daf8a-5673-44e5-9d36-c1f9ef44adcc%40googlegroups.com.

Paul C Diem

unread,
May 9, 2020, 10:50:41 AM5/9/20
to Francisco Conceição, TasmotaUsers

I don't know about the SONOFF Touch specifically, but I'd think you could use the PWM Dimmer module in Remote Device mode (https://tasmota.github.io/docs/PWM-dimmer-switch). Just configure and activate a template based on PWM Dimmer with the 3 buttons mapped to GPIO's on the SONOFF Touch. Set up your device groups (Backlog DevGroupName1 KitchenLED; DevGroupName2 EntranceLED) and enable remote device mode with SetOption88 1. That will make button 1 toggle power to device group 1, button 2 toggle power to device group 2 and button 3 toggle power to device group 3. No rules required.

Francisco Conceição

unread,
May 9, 2020, 3:08:56 PM5/9/20
to TasmotaUsers


Paul,
Using your 1st sugestion with rules, doesn't this only works one way? If I do 
SONOFF_1
do rule 1 on Button2#TOGGLE do DevGroupSend1 128=^ endon
do rule 2 on Button3#TOGGLE do DevGroupSend2 128=^ endon

and on SONOFF_2
do rule 1 on Button1#TOGGLE do DevGroupSend1 128=^ endon
do rule 2 on Button2#TOGGLE do DevGroupSend2 128=^ endon

it will send the correct message, but what about the receiving devices? When using Button2 on SONOFF1, how will that affect  Button1 on SONOFF2? Should I create a rule also for the arriving message?

Regarding your second suggestion, to be honest I don´t understand what you mean. I´ve only been "playing" with Tasmota only for a few days, I´m still scratching the surface.
I can change the relay/button mapping so that for example I map relay4 to button4 or for example configure the physical button out of order ( ex 2 1 3), but I don´t understand how to do that with PWN. there is no button on my template.
I attached 2 screenshots from the SONOFF and LED controller. for reference.
H801.PNG
SONOFF.PNG

Paul C Diem

unread,
May 9, 2020, 7:02:54 PM5/9/20
to Francisco Conceição, TasmotaUsers

The DevGroupSend1 128=^ command will cause relay 1 to be toggled on all the devices in the group. I'm not sure what you're expecting to happen to Button1 on SONOFF2. If I'm understanding correctly, you're not actually using the relays on the SONOFF Touches (you're just want the buttons to send power toggle messages to the LED's), correct?

What I was suggesting you could try is to create your template based on the PWM Dimmer module. On the same page as in the pictures you sent, select PWM Dimmer (73) for Based On, Button1 (17) for GPIO0, Button2 for GPIO9 and Button3 for GPIO10. This will make pressing button1 send a power toggle to device group 1, pressing button2 send a power toggle to device group 2 and pressing button3 send a power toggle to device group 3.

To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/b8d8946d-43ab-4abc-b092-69b91b5f2290%40googlegroups.com.

Francisco Conceição

unread,
May 10, 2020, 4:28:18 PM5/10/20
to TasmotaUsers
Paul,

Thank you for your help. 
When I talk about the Buttons, I mean change the button light to signal it as on. But thanks to you I think I understood it.  Button<x> will act on RELAY<x> on both itself and other members of the group.
With this behavior I think I can manage it by using a combination of Button<1...4>/RELAY<1..4> and that way I can have a mix of switches and LED controllers. 
What I don´t understand is why templates buttons are Button<1..4> and switches are Switch<1..8> ?? This way I´m limited to combinations from 1..4.

My last question,
My LED Controllers only responds to POWER1 (SetOption68 0)
Is there a way to change the LED controller so that if I want to use a 3 button switch, button<1> act on LED_1 with power1 and button<2> act on LED_2 with power2?

Again, thank you for your time. If you ever come to Portugal I´ll buy you a beer...

Paul C Diem

unread,
May 10, 2020, 4:32:37 PM5/10/20
to Francisco Conceição, TasmotaUsers

You can make it treat the the LED's as independent channels using SetOption68 1. See https://tasmota.github.io/docs/Lights/#independent-pwm-channels

To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/0a9e9d64-d47f-42dc-9716-5ebb573e03df%40googlegroups.com.

Francisco Conceição

unread,
May 10, 2020, 4:39:21 PM5/10/20
to TasmotaUsers
But that way, how would I turn of all the lights, from a POWER2 OFF message?
two beers ;)

Paul C Diem

unread,
May 10, 2020, 4:41:27 PM5/10/20
to Francisco Conceição, TasmotaUsers

Power0 turns all relays on/off simultaneously. https://tasmota.github.io/docs/Commands

To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/bb08a3ce-0102-4912-9625-5c1a52a28657%40googlegroups.com.

Francisco Conceição

unread,
May 10, 2020, 4:44:36 PM5/10/20
to TasmotaUsers
Thank you Paul .. I cannot thank you enough
Reply all
Reply to author
Forward
0 new messages