Page 1 of 4
Cheap Chinese Power Meter made wireless
Posted: Saturday 18 July 2015 15:46
by SweetPants
Just succeeded in making a cheap Chinese Power meter wireless using ESP-07 and MQTT.
Below picture is the test setup.
IMAG0032_1.jpg
The output on my ESP device topic looks like
/Domoticz/MQTT/Device ESP_009D5CDF,247.3,17.7
/Domoticz/MQTT/Device ESP_00A1B476,1
/Domoticz/MQTT/Device ESP_009D5CDF,247.3,17.7
/Domoticz/MQTT/Device ESP_009E69A1,1
/Domoticz/MQTT/Device ESP_009E6AC0,1
The one with a single digit are MQTT switches (1 = off, 0 = on)
The dual digit one is the MQTT power meter Volt/Watt which updates every second for now
PS: Voltage looks high but that is due to the 1:1 safety transformer I used during testing.
The PowerMeter PSU is not suitable to drive the ESP and is directly connected to the mains so I will add a cheap $2 PSU in there too.
Re: Cheap Chinese Power Meter made wireless
Posted: Saturday 18 July 2015 22:24
by ThinkPad
This is so cool!
I guess you based this project upon reading this:
http://gizmosnack.blogspot.nl/2014/10/p ... -hack.html
http://gizmosnack.blogspot.nl/2014/11/p ... eless.html
?
I was also busy doing that (i am the 'Frank' from the reactions on the first article) and had it even working in Domoticz (Arduino reading the meter, ESP8266 transmitting the values to virtual sensors in Domoticz). But like you said: the powersupply in the wattmeter isn't capable enough of powering all those 'parasite' modules that you/we connected. So therefore i never finished it. I was also thinking about popping in a cheap power supply, but after reading
this, i don't trust these cheapo chargers from China for a single bit. Really dangerous designs being made there
Can you share your code? Maybe i will pick it up when i am bored and have some spare time
P.S. Be careful when testing, the author of those articles alerted that the datalines could carry 230V! When i was fiddling with the wattmeter being powered, i had it powered through an UPS running on batteries. Otherwise you could fry your PC because 230V could be blasted through your USB-port. Or is the 'MURR' device in your picture a isolation transformer?
Re: Cheap Chinese Power Meter made wireless
Posted: Saturday 18 July 2015 22:35
by SweetPants
Yes, this is based on the articles you mentioned, but now with ESP only, so no Arduino in between the meter and the ESP. The ESP is sending MQTT data directly to my broker. From there I pick it up using NodeRed and do what I want it to do.
I'm using these PSU's
http://www.ebay.com/itm/AC-DC-5V-700mA- ... 487ffca15f
Working great for several months now in my (5) MQTT switches.
Yes, the Murr is an isolating transformer just for testing
Re: Cheap Chinese Power Meter made wireless
Posted: Monday 20 July 2015 14:25
by ThinkPad
Can you share your code/schematics?
Re: Cheap Chinese Power Meter made wireless
Posted: Monday 20 July 2015 15:03
by SweetPants
I'm still in the prototype phase, just ordered the first PCB v1.0. Also need to figure out how to use JSON with the ESP instead of CSV separated values. If you send me a PM, i will share the first info with you.
Re: Cheap Chinese Power Meter made wireless
Posted: Monday 20 July 2015 15:06
by ThinkPad
Nah, don't need it directly. But like i said: maybe i will pick this up again when i am bored on a Sunday afternoon or so

Having the info available would be nice then.
But if i understand correctly you send out a PCB-design (made by yourself) to the producer? Interesting!
Re: Cheap Chinese Power Meter made wireless
Posted: Monday 20 July 2015 15:40
by SweetPants
Yep, see below for ESP-7. ESP-12 will work also I think.
v1.0.png
JP1 connects to separate 5V PSU
JP2 connects to meter (CLOCK, MISO, MOSI, GND)
JP3 used to load new software (disconnect meter, hook up serial port with 5V to power the ESP (through 3.3 v regulator.
The rest of the components is to level shift 5v -> 3.3v and buffer the ESP from the outside.
Re: Cheap Chinese Power Meter made wireless
Posted: Saturday 26 September 2015 18:11
by SweetPants
Finished my first Wifi ESP8266 MQTT Power Meter:
PM_11.jpg
PM_21.jpg
output:
/Domoticz/MQTT {"device":"ESP_00022BCD","type":"energy","voltage":"229.3","power":"454.6","kwh":"0.0039"}
/Domoticz/MQTT {"device":"ESP_00022BCD","type":"energy","voltage":"229.3","power":"454.4","kwh":"0.0040"}
/Domoticz/MQTT {"device":"ESP_00022BCD","type":"energy","voltage":"229.3","power":"454.0","kwh":"0.0042"}
/Domoticz/MQTT {"device":"ESP_00022BCD","type":"energy","voltage":"229.2","power":"453.6","kwh":"0.0043"}
/Domoticz/MQTT {"device":"ESP_00022BCD","type":"energy","voltage":"229.2","power":"453.6","kwh":"0.0044"}
Re: Cheap Chinese Power Meter made wireless
Posted: Saturday 26 September 2015 18:15
by ThinkPad
Looking good! Still have that meter lying around here, but since i got a few Z-Wave plugs i didn't do anything with it.
Re: Cheap Chinese Power Meter made wireless
Posted: Saturday 26 September 2015 18:28
by SweetPants
Next project will be an old AP housing holding:
- Motion sensor (sensing people in the room)
- LUX meter (for turning on lights automatically)
- Smoke detector
- Temp + Hum + Baro
- Piezo alarm (alarm)
- and maybe more
ESP8266 based and of course all MQTT enabled
Re: Cheap Chinese Power Meter made wireless
Posted: Tuesday 09 August 2016 22:54
by jaysuk
Hi SweetPants,
Would you be willing to share your code for this?
Jay
Re: Cheap Chinese Power Meter made wireless
Posted: Thursday 11 August 2016 20:18
by SweetPants
jaysuk wrote:Would you be willing to share your code for this?
Send you a PM
Re: Cheap Chinese Power Meter made wireless
Posted: Thursday 11 August 2016 21:15
by Derik
SweetPants wrote:
ESP8266 based and of course all MQTT enabled
I do not get a F&%^*ck of that mqtt...
Is there a simple explanation how this works...
Re: Cheap Chinese Power Meter made wireless
Posted: Thursday 11 August 2016 21:27
by SweetPants
Derik wrote:I do not get a F&%^*ck of that mqtt...
Is there a simple explanation how this works...
Whoooo, hold your horses (I see you like riding them). It's not my fault you don't understand how this works. First off all start reading about MQTT (Google is your friend), build your own MQTT broker like mosquitto (already on the SD image for RPI) and play with the mosquitto_pub/sub commands. Then come back with questions, maybe I can help you.
Re: Cheap Chinese Power Meter made wireless
Posted: Friday 12 August 2016 15:22
by jaysuk
SweetPants wrote:jaysuk wrote:Would you be willing to share your code for this?
Send you a PM
I'm not allowed to reply to your PM yet.
Would you be willing to PM me your email so I can contact you that way?
Re: Cheap Chinese Power Meter made wireless
Posted: Sunday 21 August 2016 2:33
by Sine
Since you join the ground of your board and the ground of the meter ... I would not touch that nice shiny and very conductive WiFi connector.
That could be a shocking experience

Re: Cheap Chinese Power Meter made wireless
Posted: Sunday 21 August 2016 13:39
by SweetPants
Sine wrote:Since you join the ground of your board and the ground of the meter ... I would not touch that nice shiny and very conductive WiFi connector
.
Yes you are right, the ESP-7 internal antenna is not so good, so I used an external one on my prototype. My other meters use the ESP-12(E) this has a better anntena so I could remove the external one.
Re: Cheap Chinese Power Meter made wireless
Posted: Sunday 05 March 2017 13:24
by wvries
Hi SweetPants
Would you be so kind to also send me a mesage with your code ?
Got all stuff in and ready to do some work on it.
Re: Cheap Chinese Power Meter made wireless
Posted: Sunday 05 March 2017 13:55
by mayyam
Can i also get the code please?
____
may
Re: Cheap Chinese Power Meter made wireless
Posted: Tuesday 07 March 2017 12:48
by josbo12
Hi SweetPants,
I am working on the same project, but it does not work very well, you could publish the code?
Thanks