Sonoff Power R2 Power Monitoring

20 views
Skip to first unread message

Prabakaran Shanmugam

unread,
Jun 11, 2024, 12:23:10 PMJun 11
to TasmotaUsers
We have installed Sonoff Power R2 device in several areas and we aren't able to know the power OFF and ON time.
How to make rule for this condition( Power ON and OFF.

Justin Adie

unread,
Jun 11, 2024, 3:46:29 PMJun 11
to Prabakaran Shanmugam, SonoffUsers
You do not specify how you want to recover/read the on / off time.  Of course the easiest way is to track the on/off events on an mqtt topic.  You don’t need to change anything in tasmota or make any rules for this.  

Assuming you want to store the on/off time in tasmota you could do this

Rule1 on power1#state=1 do var1 %time% endon on power1#state=0 do var2 %time% endon

NB vars do not persist through reboots.  If you need persistence you could use mem but be aware that this will wear down your eeprom quickly.  You are better advised to use an mqtt listener in this instance.



On 11 Jun 2024, at 17:23, Prabakaran Shanmugam <prabakaran...@aparinnosys.com> wrote:

We have installed Sonoff Power R2 device in several areas and we aren't able to know the power OFF and ON time.
How to make rule for this condition( Power ON and OFF.

--
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/2c9d595b-a337-48f4-b216-329f5686be91n%40googlegroups.com.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages