Energy Meter S0 Output with ESP8266

Moderator: leecollings

Post Reply
DarkG
Posts: 89
Joined: Friday 15 September 2017 18:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10076
Location: Germany
Contact:

Energy Meter S0 Output with ESP8266

Post by DarkG »

Hello Everyone.

I bought an Energy Meter to use it with Domoticz. It has a S0 Output.
I wired it to an ESP8266 with ESPEasy Firmware.

S+ to 3.3V and S0 to D5 with a Resistor 4.7K to Ground.
The Esp is configured to a pulse Counter with falling Signal and a debounce of 20 ms.
I sent the counter to an IDX. But it wont work.

Is here anyone who uses such a solution?
H02accbc7a9d34e81bdd3e9401f78d6887.jpg
H02accbc7a9d34e81bdd3e9401f78d6887.jpg (32.59 KiB) Viewed 4233 times
Hb1d097f9dd464e66a062524de86ba559q.jpg
Hb1d097f9dd464e66a062524de86ba559q.jpg (19.95 KiB) Viewed 4233 times
RPi4 Shelly1 Shelly2.5 ESPEasy Tuya Domoticz Beta Dashticz 3.6
User avatar
kiddigital
Posts: 437
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Energy Meter S0 Output with ESP8266

Post by kiddigital »

What type of virtual device did you create?
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
DarkG
Posts: 89
Joined: Friday 15 September 2017 18:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10076
Location: Germany
Contact:

Re: Energy Meter S0 Output with ESP8266

Post by DarkG »

RFX Meter
RPi4 Shelly1 Shelly2.5 ESPEasy Tuya Domoticz Beta Dashticz 3.6
User avatar
kiddigital
Posts: 437
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Energy Meter S0 Output with ESP8266

Post by kiddigital »

Do you see any calls to domoticz from the esp in the log of Domoticz?
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
DarkG
Posts: 89
Joined: Friday 15 September 2017 18:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10076
Location: Germany
Contact:

Re: Energy Meter S0 Output with ESP8266

Post by DarkG »

No not really. First of all the esp must work and get the value from the power meter
RPi4 Shelly1 Shelly2.5 ESPEasy Tuya Domoticz Beta Dashticz 3.6
Toulon7559
Posts: 848
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: Energy Meter S0 Output with ESP8266

Post by Toulon7559 »

Perhaps this information is worth reading before trying to make an interface between the S0-interface of your kWh-meter and the ESP8266:
https://www.letscontrolit.com/forum/vie ... ?t=71#p866
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
DarkG
Posts: 89
Joined: Friday 15 September 2017 18:54
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10076
Location: Germany
Contact:

Re: Energy Meter S0 Output with ESP8266

Post by DarkG »

I think the esp is now working. I get the value from the meter.

But what now? Do I need a script?
RPi4 Shelly1 Shelly2.5 ESPEasy Tuya Domoticz Beta Dashticz 3.6
Toulon7559
Posts: 848
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: Energy Meter S0 Output with ESP8266

Post by Toulon7559 »

Just some suggestions 'what next'

'Inside' ESPEasy you could use Rules to locally perform control functions at the ESP8266,
e.g. control of a relais or indicator.

'Outside the ESP8266: Is the info from the ESP8266 arriving at the related Virtual Device at Domoticz?
Domoticz provides basic graphs & tables with the data collected over time.
Furthermore, under application of that Virtual Device you might process the data for all kind of purposes:
- for control of actuators simplest is using Blockly in Domoticz to make a basic script
- using lua-script, dzVents-script or Python-script (to name a few) ;) the road is open for all your nice projects .......
If your meter measures the output of a PV-System, one of the 'usual' applications is upload of PV-data to PVOutput for additional/remote graphing & archiving: just look around in this Forum for a script to be used.
If your meter measures 'Local Consumption', then look for a dashboard-script to get the archived & actual info nicely displayed at a website.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 0 guests