best solution to monitor and log power usage
-
This looks like an interesting alternative to the Sonoff for power monitoring:
https://www.amazon.com/gp/product/B08J3QP1SG/ref=ox_sc_act_title_1?smid=AFXZFGKJMX9E4&psc=1Also based on ESP8266, it's smaller than the Sonof. The Shelly's dimensions are just: 39 x 36 x 17mm. i.e. Small enough to fit into an outlet box. No need to open it either: the ESP8266 reset and programming female pins are exposed on the back of it, whereas it appears that the Sonoff requires you to open its case and actually solder some programming wires onto PCB pads prior to uploading new firmware to it. If you end up not liking it, I don't imagine you can return a sonoff after doing a soldering procedure like that.
@NeverDie While I'm still sitting on a box full of various Shelly devices waiting to be installed (hardware stores are closed since months, due to lockdown...), I'd like to point out that the Shelly 2.5 models you linked are apparently not suitable for continuous loads. Lots of peope report that they get quite hot, unlike other models. They are meant to be used for roller shutter control or other momentary loads. With that in mind, I don't think they are very useful as a power meter. Shelly has dedicated power measuring relays like the 1PM, EM, the 3-phase EM3, or Pro4 for DIN rails, as well as the WiFi plugs Plug and Plug S.
You don't have to use their cloud service, nor do you need to reprogram them. Use their mobile app, wire them up in your favourite home automation controller or use the provided REST or MQTT APIs directly to set them up and collect data. Regarding power meter measurement intervals: at least the Shelly 1PM seems to be able to report down to a per minute scale.
But yeah, the fact that they fit into power outlets and that you can use them freely without any external services is pretty nice.
-
@NeverDie While I'm still sitting on a box full of various Shelly devices waiting to be installed (hardware stores are closed since months, due to lockdown...), I'd like to point out that the Shelly 2.5 models you linked are apparently not suitable for continuous loads. Lots of peope report that they get quite hot, unlike other models. They are meant to be used for roller shutter control or other momentary loads. With that in mind, I don't think they are very useful as a power meter. Shelly has dedicated power measuring relays like the 1PM, EM, the 3-phase EM3, or Pro4 for DIN rails, as well as the WiFi plugs Plug and Plug S.
You don't have to use their cloud service, nor do you need to reprogram them. Use their mobile app, wire them up in your favourite home automation controller or use the provided REST or MQTT APIs directly to set them up and collect data. Regarding power meter measurement intervals: at least the Shelly 1PM seems to be able to report down to a per minute scale.
But yeah, the fact that they fit into power outlets and that you can use them freely without any external services is pretty nice.
@BearWithBeard said in best solution to monitor and log power usage:
Lots of peope report that they get quite hot, unlike other models.
I did see that one of the Amazon reviews reported it as being hot (85C), but he didn't say what his load was (just that his voltage was 220v), and I didn't see other reviewers (at least on amazon) mention it being hot. It does claim to have an overtemp cutoff and a UL rating, but I haven't verified whether either claim is actually true or not. I'd be using it to monitor a refrigerator/freezer, whose boilerplate says it's rated to draw 700w max.... That's less than half of what of what this Shelly is spec'd for....
I suppose I could just try it and see, but instead I cancelled my order until I can get to the bottom of it.
-
OK, I found both the problem description and also, allegedly, a fix for the Shelly 2.5 hotness. TL;DR: if you leave GPIO16 floating, then it sounds as though Shelly 2.5 will experience a partial short circuit and heat up to 62C, but if you simply configure GPIO16 as an input, it will, allegedly, avoid that problem and run at 15C instead! Well, I'm guessing that by 15C the blogger in the following link, which is where I got my information, means ambient temperature., or thereabouts: https://savjee.be/2020/11/shelly25-esphome-potential-fire-hazard-fix/
So, with that now sorted, I re-submitted my order. :) I'd sleep better if the hardware had been designed to guarantee that such a problem could never occur, rather than allow a potential software bug to trigger it, but it is what it is. Hopefuly the UL certification is genuine, because their failsafe testing is even more important for a device harboring a potential hazard such as this. You never know if or when a lightning bolt or voltage spike (or cosmic ray for that matter!) might glitch it out. Perhaps, just to remove all doubts, it should be encased in intumescent putty inside the electrical box.... One could argue that it would/might be overkill, but aside from the sticky mess and the extra cost, I'm not aware of any other downsides to doing so. Plainly the alternative of planting it inside a full metal junction box to secure improved protection from Murphy's Law would defeat the whole reason for installing it in the first place. On the other hand, I seem to recall that even regular outlet boxes are tested to meet at least minimum performance standards and are therefore probably safe enough to contain a failure should one occur. After all, AFAIK, that's much if not their entire raison d'etre.
@BearWithBeard Thanks for the heads up!
-
OK, I found both the problem description and also, allegedly, a fix for the Shelly 2.5 hotness. TL;DR: if you leave GPIO16 floating, then it sounds as though Shelly 2.5 will experience a partial short circuit and heat up to 62C, but if you simply configure GPIO16 as an input, it will, allegedly, avoid that problem and run at 15C instead! Well, I'm guessing that by 15C the blogger in the following link, which is where I got my information, means ambient temperature., or thereabouts: https://savjee.be/2020/11/shelly25-esphome-potential-fire-hazard-fix/
So, with that now sorted, I re-submitted my order. :) I'd sleep better if the hardware had been designed to guarantee that such a problem could never occur, rather than allow a potential software bug to trigger it, but it is what it is. Hopefuly the UL certification is genuine, because their failsafe testing is even more important for a device harboring a potential hazard such as this. You never know if or when a lightning bolt or voltage spike (or cosmic ray for that matter!) might glitch it out. Perhaps, just to remove all doubts, it should be encased in intumescent putty inside the electrical box.... One could argue that it would/might be overkill, but aside from the sticky mess and the extra cost, I'm not aware of any other downsides to doing so. Plainly the alternative of planting it inside a full metal junction box to secure improved protection from Murphy's Law would defeat the whole reason for installing it in the first place. On the other hand, I seem to recall that even regular outlet boxes are tested to meet at least minimum performance standards and are therefore probably safe enough to contain a failure should one occur. After all, AFAIK, that's much if not their entire raison d'etre.
@BearWithBeard Thanks for the heads up!
@NeverDie Interesting find. But according to this GitHub issue, that fix only concerns those Shellys that have been flashed with certain versions of Tasmota or ESPhome, where the GPIOs had been misconfigured. To me, that sounds like it was an issue on top of the inherently higher temperature of the Shelly 2.5, doesn't it? I assumed the Shelly 2.5 temperatures were higher because of the second power metering circuit on board, potentially dissipating more heat through resistors.
Anyway - you are right that the Shellys have over-temperature protection which should kick in at 90 to 95°C and I can only assume that all components are rated for temperatures above that. So in that regard it should be fine if the Shelly 2.5 operates at higher temperatures than the other models. The device is completely encased, which lowers the risk of scorching wire insulations or terminals with lower temperature ratings that might touch it.
It may just be that it triggers the OTP earlier than single channel Shellys when two (high?) loads are connected. Then again, installing two single channel Shellys in a single power outlet could potentially be even worse, as you then have two heat-emitting devices in close proximity. Giving it a try may be the only way to find out.
-
@BearWithBeard One of the posts in the github you linked seemed to imply that much of the regular heat comes from the energized relay coil. I'm hoping it has an NC contact on the relay, since all I want to do is monitor energy consumption. I have no interest in switching it on and off, and for my use-case I'd rather it didn't even have switching capability. I can't tell from the cryptic markings on the case though whether it has an NC or not, but if it does, then hopefully much of the heat can be avoided, since the relay wouldn't need to be energized.
[Edit: I found the manual. Regrettably, it has no NC contact: https://shelly.cloud/documents/user_guide/shelly_25.pdf ]
One good bit of news: Looks as though it really does have a UL listing:
https://productiq.ulprospector.com/en/profile/1897230/pazx.e504925?term=e504925&page=1At least that much is promising.
-
@BearWithBeard One of the posts in the github you linked seemed to imply that much of the regular heat comes from the energized relay coil. I'm hoping it has an NC contact on the relay, since all I want to do is monitor energy consumption. I have no interest in switching it on and off, and for my use-case I'd rather it didn't even have switching capability. I can't tell from the cryptic markings on the case though whether it has an NC or not, but if it does, then hopefully much of the heat can be avoided, since the relay wouldn't need to be energized.
[Edit: I found the manual. Regrettably, it has no NC contact: https://shelly.cloud/documents/user_guide/shelly_25.pdf ]
One good bit of news: Looks as though it really does have a UL listing:
https://productiq.ulprospector.com/en/profile/1897230/pazx.e504925?term=e504925&page=1At least that much is promising.
@NeverDie Oh, if you refer to the second set of infrared images - those with the relay as the hottest spot - they are taken from a Sonoff Basic. The other set is the Shelly 2.5.
In the meantime, I found some images of Shelly 2.5 with burnt spots and antennas pierced by the screw terminal pins. Reports of bad solder joints and such (German source with images). It seems that this was a faulty batch of devices from early 2019 which has been recalled. Never the less, I just opened the enclosure of my two Shelly 2.5 and I can confirm that they are obviously of a newer revision (bought in december 2020. the PCB was produced in July 2020, according to the silkscreen). The antenna is now attached to the upper part of the enclosure so that it can't be pierced by the pins and the cable is not touching the resistor R42 that is getting so hot in the FLIR images, although it's routed around the PCB in that corner. All pads and terminals look clean and nicely soldered.
The relays are 10A 250VAC rated HF32FA-G/012-HSL1 models.
-
@BearWithBeard It's all so ironic: my whole reason for buying something pre-made was to just slot something in without having to think about it. Now, with the cloud of doubt hanging over this thing, here I am having to spend time thinking about it. :face_with_rolling_eyes:
For my intended purpose the ideal solution is probably something like this:
https://jeelabs.org/book/1508a/ Even if it were to fail, it's all just low power low voltage stuff and my refrigerator would keep on working, as there's no on-off switching like with the commercially available pre-made products. No direct connection to mains, and no batteries to change either: it lives by soaking up just a tiny amount of parasitic power. I should probably just do it right the first time, and then I can just be done with it without having to worry about my refrigerator losing power, or whatever else might go wrong as it ages over a long future. -
What no one seems to mention but which certainly seems relevant is that the working temperature range for the Shelly 2.5 tops out at 40C:
https://shelly.cloud/knowledge-base/devices/shelly-25/
Does "working temperature" mean ambient temperature, or the temperature of the device itself? I'm not sure, but I believe it refers to the temperature of the device and the components therein, not ambient temperature. And if that is so, then looking at all the measurements people have done:
https://community.home-assistant.io/t/shelly-2-5-getting-hot-to-touch-63-c-external-case-should-i-be-worried/175376
it seems as though many of those measurements are above Shelly 2.5's own declared spec. -
What no one seems to mention but which certainly seems relevant is that the working temperature range for the Shelly 2.5 tops out at 40C:
https://shelly.cloud/knowledge-base/devices/shelly-25/
Does "working temperature" mean ambient temperature, or the temperature of the device itself? I'm not sure, but I believe it refers to the temperature of the device and the components therein, not ambient temperature. And if that is so, then looking at all the measurements people have done:
https://community.home-assistant.io/t/shelly-2-5-getting-hot-to-touch-63-c-external-case-should-i-be-worried/175376
it seems as though many of those measurements are above Shelly 2.5's own declared spec.@NeverDie Working temperature means ambient in this case. Quoting the Allterco CEO:
Max ambient temperature is 40 degree. With no load PCB temperature is 55-60 degree. At MAX load continuesly is 87-90 degree.
Heating protection will switch off device at 95 degree.
All parts inside are 105-120 degree certifed for continuous usage.Original source: https://www.facebook.com/groups/1686781668087857/permalink/2054834997949187/
-
Aha, good catch.
I presume it's just measuring apparent power instead of real (true) power? Power factor is going to be relevant for a refrigerator. The Shelly 2.5 makes no mention of measuring power factor or true power, but the more pricey Shelly EM does:
https://www.amazon.com/Shelly-Smart-Energy-Monitor-Consumption/dp/B07ZHLN63D -
These peacefair energy monitors are fairly inexpensive and also appear to measure power factor:
https://www.youtube.com/watch?v=74gKMTsHmYYThey use RS485 for communication.
Aside from that, it's not easy to find a power meter that takes power factor into account and which has anything other than just an LCD for its output interface.
-
Aha, good catch.
I presume it's just measuring apparent power instead of real (true) power? Power factor is going to be relevant for a refrigerator. The Shelly 2.5 makes no mention of measuring power factor or true power, but the more pricey Shelly EM does:
https://www.amazon.com/Shelly-Smart-Energy-Monitor-Consumption/dp/B07ZHLN63D -
This suddenly makes the Shelly 2.5 a whole lot more interesting! Do we know whether the Shelly 2.5 reports real power by default out-of-the-box, or does it require special configuration?
-
Hmmm.. Apparently even the sonoff POW R2 can measure real power and power factor: https://wattaurus.com/posts/smart_switch
Well, either the Sonoff or the Shelly 2.5 sound much easier to work with than the PeaceFair. I guess it's time I try them out! I can compare their measurements to my ancient kill-a-watt meter, which supposedly measures true power also, literally plug and play.
-
Nice one, thx!
-
Found this Sonof IW100:
https://smile.amazon.com/gp/product/B083LJ4HWQ/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1If it measures real power, then it should be code compliant, easier to wire, and maybe safer overall, so I ordered one to test. It's ETL certified, which as far as I can tell is just as good as UL Certified, since ETL tests to the same standards as UL. I've also read it uses the same hardware as the Sonoff S31.
-
Found this Sonof IW100:
https://smile.amazon.com/gp/product/B083LJ4HWQ/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1If it measures real power, then it should be code compliant, easier to wire, and maybe safer overall, so I ordered one to test. It's ETL certified, which as far as I can tell is just as good as UL Certified, since ETL tests to the same standards as UL. I've also read it uses the same hardware as the Sonoff S31.
-
I hadn't known this before, but from recent reading it appears that relays are appropriate for switching resistive loads, but for inductive loads (like motors) a "contactor" is recommended instead. Apparently the reason is that opening a relay on an inductive load can cause voltages to jump beyond the relay's rating, resulting in arcing. Well, I suppose that does make sense. In contrast, from what little I've read, contactors are resistant to arcing.
On the other hand, I thought the use of flywheel diodes was supposed to prevent these kinds of inductive voltage spikes, in which case I don't see what the problem is. Maybe there is no equivalent of a flywheel diode for an AC motor as there is for a DC motor? Not sure, but on first glance it looks as though it may require a snubber or similar:
https://m.littelfuse.com/~/media/electronics/application_notes/reed_switches/littelfuse_magnetic_sensors_and_reed_switches_inductive_load_arc_suppression_application_note.pdf.pdfSo, in principle it is possible, but I don't know whether sonoff's or similar account for that or not.
Hmmm.. It's starting to look as though the Shelly EM may be the only sure-fire KISS solution for monitoring refrigerators, as there is no risk of it opening/closing relays, which is something I don't need and, if anything, would rather avoid anyway.
Sorry for all my dithering on this thread, but by process of elimination I think I've may have finally arrived at a correct answer. Hopefully it's illuminating for others as well.
-
I hadn't known this before, but from recent reading it appears that relays are appropriate for switching resistive loads, but for inductive loads (like motors) a "contactor" is recommended instead. Apparently the reason is that opening a relay on an inductive load can cause voltages to jump beyond the relay's rating, resulting in arcing. Well, I suppose that does make sense. In contrast, from what little I've read, contactors are resistant to arcing.
On the other hand, I thought the use of flywheel diodes was supposed to prevent these kinds of inductive voltage spikes, in which case I don't see what the problem is. Maybe there is no equivalent of a flywheel diode for an AC motor as there is for a DC motor? Not sure, but on first glance it looks as though it may require a snubber or similar:
https://m.littelfuse.com/~/media/electronics/application_notes/reed_switches/littelfuse_magnetic_sensors_and_reed_switches_inductive_load_arc_suppression_application_note.pdf.pdfSo, in principle it is possible, but I don't know whether sonoff's or similar account for that or not.
Hmmm.. It's starting to look as though the Shelly EM may be the only sure-fire KISS solution for monitoring refrigerators, as there is no risk of it opening/closing relays, which is something I don't need and, if anything, would rather avoid anyway.
Sorry for all my dithering on this thread, but by process of elimination I think I've may have finally arrived at a correct answer. Hopefully it's illuminating for others as well.
@NeverDie If you only want to monitor and are worried about relays you could always open the shelly/sonoff/... and permanently shortcut/bypass the relay. And while you're at it, also disconnect the relay coil contacts (or remove the relay completely) to reduce heating of the unit and reduce power consumption.
-
Roll your own MySensors version can be surprisingly simple from a hardware perspective. I did this to monitor my electric car. Plug a split coil to the audio jack:

The thinking about it part, not so easy! Good reference site:
https://learn.openenergymonitor.orgC and R depend on your split coil. Calibration is a real challenge. For my car, I know what it draws from plugging into commercial chargers, and I was not worried about precision. For unknown loads around the house, you would have to have something known to calibrate against. Also, the coil has to go around 1 leg of the power wiring. which means you need an adapter cable with the line and neutral split out (but still insulated).