Sorry for the long post, but I fear that if Iām not specific, any answers may not apply enoughā¦
So⦠I have Meross WiFi switches that I used with SmartThings. I canāt afford to replace them with Z* devices. I recently purchased Sengled RGBW bulbs. I have multiple bulbs in a lighting unit (ceiling fan, vanity light, etc.).
The bulbs do not always show the correct status under āCurrent Statesā. This is especially true if the wall switch is actuated. In this case the bulbs often show the state they were in before the switch was de-energized. The Meross switches use a community driver. The switches are polled every minute to determine their status.
I created lighting groups for each unit. I included the Meross switches as well. Using the lighting group actuator always refreshes the Meross switch status correctly. The main issue is that when the Meross switch is actuated, either manually, the device page, a tile, or the actuator (yes, still the deviceā¦), the Sengled bulbs sometimes turn on, sometimes turn on and off again, and sometimes do not come on. Toggling the switch manually a few times get the bulbs on again, but the WAF factor there is sub-zeroā¦
I tried rule machine to query the Meross switch, and if itās on, to turn on the lights. This works great if the switch is actuated with the tile or from the device page. If energized manually, it takes up to a minute (the driver polling period) to turn the lights on. No problem, I thought, I can refresh the switches every second, and should reduce the latency to a maximum of 1 second. That worked very well, until the C-8 came to a screeching halt due to the loggingā¦
My next attempt was to create a variable for each lighting unit. (FanBulbsAreOnline for example) I used rule machine to do the following:
If the Meross switch is discovered to be on (there must be power) Then
FanBulbsAreOnline = TRUE
EndIf
If any of the bulbs are on (again there must be power) Then
FanBulbsAreOnline = TRUE
EndIf
(This can be flakey because the bulbs donāt always show the correct status)
If the Light Group actuator is on Then
FanBulbsAreOnline = TRUE
EndIf
If the Light Group actuator is off Then
FanBulbsAreOnline = FALSE
EndIf
If the Meross switch is discovered to be off Then FanBulbsAreOnline = False
EndIf
(This can take up to a minute as well, but isnāt an issue as FanBulbsAreOnline still equals TRUE, should it be turned right back on again)
But wait, I have to query the state of the variable⦠So then came the following rule that runs, you guessed it, every second
If FanBulbsAreOnline == TRUE
Turn on the group (remember, the biulbs donāt always show the correct state
Else
Turn off Group
EndIf
This over fills the logs as well.
All the debug logging is off. The rules have no logging checked.
I realize that having a switch in front of the smart bulb is not best practice, but thatās how it is, and why have a smart home hub except for to solve these little issues with automationsā¦
So, my question is, not what hardware needs to be replaced, but what is the best way to accomplish the task? I would like to simply not log the events unless I needed to troubleshoot. The simplest rule was my first try (query the Meross switch, and if itās on, to turn on the lights)
Iād appreciate any constructive help! Thank you!