Sonoff Dual-R3 V2.0 with BL0939

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Micha_he
Normal user
Posts: 372
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Sonoff Dual-R3 V2.0 with BL0939

#1 Post by Micha_he » 07 Jan 2024, 11:40

Any news/help, to get the 2-channel power measurement-chip BL0939 of the Sonoff Dual-R3 V2.0 to work with Espeasy?

IMG_20240105_234425438_HDR.jpg
IMG_20240105_234425438_HDR.jpg (732.42 KiB) Viewed 26319 times

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff Dual-R3 V2.0 with BL0939

#2 Post by TD-er » 07 Jan 2024, 12:16

Hmm so far I only found a Chinese datasheet.
At first glance it seems like it may be a mixture of both P076_HLW8012 and P077_CSE7766

As in it does use serial (like P077), but there's also mention of CF like pins to switch between voltage/current measurements. (like P076)

I did see Google mentioning ESPHome seems to support it (not yet looked at it), but it is quite a lot of work to "convert" ESPHome code to ESPEasy code as they often leave out quite a lot and focus on using a lot of core components in the ESPHome code.
Don't get me wrong as that's a perfectly fine way of coding, but since I'm quite unfamiliar with the ESPHome code base, it may take quite a lot of work to "convert" it.

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff Dual-R3 V2.0 with BL0939

#3 Post by TD-er » 07 Jan 2024, 12:19

Hmm on another site I found an English "datasheet" which is more like a summary of features and this one mentions it has I2C interface.

So I guess when this will be supported, it must probably have its own plugin. :(

Micha_he
Normal user
Posts: 372
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: Sonoff Dual-R3 V2.0 with BL0939

#4 Post by Micha_he » 07 Jan 2024, 15:01

What I've read is, that the BL0930 the i2c and the BL0939 is the UART-variant.

https://evelta.com/content/datasheets/3 ... SOP16L.pdf

But plugin 076 & 077 doesn't read anything.

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff Dual-R3 V2.0 with BL0939

#5 Post by TD-er » 07 Jan 2024, 16:22

I would really be surprised if those would work, as P076 is absolutely not UART and P077 is using very specific way to decode any data.
Also I don't know which pins are connected to the ESP.

Micha_he
Normal user
Posts: 372
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: Sonoff Dual-R3 V2.0 with BL0939

#6 Post by Micha_he » 08 Jan 2024, 10:31

I will try to determine the pin configuration (BL0939 <-> ESP32) on the existing hardware.

I'm also going to give Tasmota a chance... ;)


Edit - Here is a summary of the complete pin assignment:

Code: Select all

GPIO  0 = Button1 (OnBoard)
GPIO  4 = BL0939 ZX (Zero Crossing)
GPIO 13 = WLan-Led
GPIO 14 = Relay2
GPIO 25 = BL0939 Tx
GPIO 26 = BL0939 Rx
GPIO 27 = Relay1
GPIO 32 = Switch1
GPIO 33 = Switch2

Micha_he
Normal user
Posts: 372
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: Sonoff Dual-R3 V2.0 with BL0939

#7 Post by Micha_he » 19 Jan 2024, 11:04

Can someone help me, to port this BL0939 tasmota plugin code to an espeasy-plugin.

I can done tests and if necessary, I could also send a DualR3 V2 by post for testing.

The Sonoff DualR3 V2 works under Tasmota, but I love the EspEasy interface and how easy it is to use the rules. ;)

User avatar
Ath
Normal user
Posts: 3520
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Sonoff Dual-R3 V2.0 with BL0939

#8 Post by Ath » 19 Jan 2024, 12:00

This subject is drowning somewhere in my "things I'd like to fix in ESPEasy" list (that's an actual list, but I just did not call it my TODO list...) :lol:
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8756
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff Dual-R3 V2.0 with BL0939

#9 Post by TD-er » 19 Jan 2024, 12:07

Maybe just create an issue for it, so it is more like an actual todo list :)

Post Reply

Who is online

Users browsing this forum: No registered users and 43 guests