openshwprojects / OpenBK7231T_App

Open source firmware (Tasmota/Esphome replacement) for BK7231T, BK7231N, BL2028N, T34, XR809, W800/W801, W600/W601 and BL602
https://openbekeniot.github.io/webapp/devicesList.html
1.36k stars 229 forks source link

Energy Monitoring on Sonoff S40 (BL602) - Feature Request/Driver Enable #529

Open davygravy opened 1 year ago

davygravy commented 1 year ago

Describe the bug Sonoff S40 has the capability to monitor energy use via the CSE7759B chip (similar to CSE7766). Makes sense to have this enabled and usable.

Firmware:

To Reproduce Steps to reproduce the behavior:

Screenshots

Additional context

Certainly willing to test/assist.

openshwprojects commented 1 year ago

I'll take a look into that in the following days, I will most likely need you to copy the debug log from BL602, but that's when I add the UART read...

davygravy commented 1 year ago

Happy to do that, @openshwprojects. I've got one unit held back just for testing (others are deployed/in use). I updated/added to the "Additional context" section in first post : added in links that might be helpful [ for others reading this post - not really for you, since I see that you've been working on the driver here already : https://github.com/openshwprojects/OpenBK7231T_App/blob/main/src/driver/drv_cse7766.c ] :smiley:

I guess that these :

...will be joined by just 1 dropdown item, something like...

openshwprojects commented 1 year ago

@davygravy , I replied on forum: https://www.elektroda.com/rtvforum/topic3889041-210.html my question is, which serial port do you need for that device? current,y uart0 is working for me - pins 16 and 7