i am currently busy with pond demotics. (relays,temp sensors,buttons, water level, lights and flow meter etc)
And i would like to add a current sensor so i can messure how mush power the whole pond uses.
what sensor do i need to attach and how to configure this ?
it is for a pond where they will be at least 4 high power pumps large UV light, pond lights etc so it will be way over the rated Amp of a sonoff and i dont want to be a relay in front off the other relays.
One device many have used is the Current Cost smart meter - ( mainly in UK ). They are relatively inexpensive and have a simple serial port that is easy to listen to. Or maybe look at the openenergymonitor site - who, as well as a range of products, have some great info for DIY - https://learn.openenergymonitor.org/electricity-monitoring/ac-power-theory/introduction
You realise the Sonoff POW is approx 3600w (i.e. 16A) although i would not push it that far.
For the sake of simplicity - why not deploy more than 1 - which would give you better metrics as to the electricity per pump/light.
Each provides a MQTT controllable relay as well as current monitoring etc - so you would be able to remove your current relay soluton and simplify it to one device (relay and monitor) per device
I implemented power measurement on RasPi 3 with ADS1115 (4-channel ADC converter) and Split Current Transformers. I measure the current assuming voltage is 230V.
Comparing to suggested Sonoff POW, this method had disadvantage: the assumption of voltage, not measurement. This can be satisfied with a little more additional circuitry (was not required in my case).
The advantage of this method is: no special HW (Sonoff) required neither software-related mess with it.
Just to note that I was not suggesting the Sonoff POW is the best solution for this application, just throwing it into the mix. There is no correct answer for this class of problem, different applications will require different solutions.
Power measurement can also be done using a Belkin Wemo Insight Switch. There is an american and european version:
Don't use a normal Wemo Switch, because that only allows you to turn on/off a 230 Volt device.
Wemo devices have a HTTP interface (see here and here), which can be called e.g. using a HttpRequest node. Or you can use the node-red-node-wemo nodes out-of-the box.
Interesting!!
I'm not a specialist about this area, but there is the similar SCT-013 on Aliexpress, which is wired to a Raspberry in this tutorial. They put one of the RPICT boards as a hat on top of a raspberry (which seems to be compatible), to connect it to the gpio pins. Such boards allow up to 7 SCT-013 modules to be connected.
Interesting. But the boards seem to cost around ÂŁ35 and for that it might be better to us a bunch of cheap ESP8266's - I expect someone has connected up those current sensors.