News for hackers. Stuff that matters.
Re:Monitoring energy usage with smart plugs, Prometheus and ... by stavros on Sunday May 05, 2024 @03:26PM (#40267441)
I got a Zigbee power breaker and hooked it up so all my flat's power goes through it, and then made an e-ink display to show my power consumption:

https://www.stavros.io/posts/making-the-timeframe/

Re:Monitoring energy usage with smart plugs, Prometheus and ... by 3abiton on Sunday May 05, 2024 @03:34PM (#40267509)
That was a great write up! I wish I had the time to follow-up this guide. Thanks for sharing it!
Re:Monitoring energy usage with smart plugs, Prometheus and ... by stavros on Sunday May 05, 2024 @03:44PM (#40267586)
Thank you! It's not very hard to use, you basically just flash my firmware and use my script to display images on the Timeframe. That's about it.
Re:Monitoring energy usage with smart plugs, Prometheus and ... by hackernewds on Sunday May 05, 2024 @04:40PM (#40268139)
Related to your comment so much, I got hurt
Re:Monitoring energy usage with smart plugs, Prometheus and ... by gog on Sunday May 05, 2024 @04:25PM (#40267967)
Can you link the power breaker?
Re:Monitoring energy usage with smart plugs, Prometheus and ... by stavros on Sunday May 05, 2024 @04:55PM (#40268264)
Re:Monitoring energy usage with smart plugs, Prometheus and ... by homero on Monday May 06, 2024 @02:41AM (#40271833)
It's crazy to run any power through that. Only safe option are current transformers
Re:Monitoring energy usage with smart plugs, Prometheus and ... by sifttio on Monday May 06, 2024 @03:18PM (#40278448)
Do you have any you would recommend? I'll love you for a link, and like you for a brand name. Not being a dick here, I'm genuinely looking for one that I don't have to lose sleep over installing.
Re:Monitoring energy usage with smart plugs, Prometheus and ... by homero on Tuesday May 07, 2024 @10:29AM (#40285921)
Re:Monitoring energy usage with smart plugs, Prometheus and ... by shrx on Sunday May 05, 2024 @04:25PM (#40267972)
I'm curious, which power breaker do you have?
Re:Monitoring energy usage with smart plugs, Prometheus and ... by stavros on Sunday May 05, 2024 @04:55PM (#40268263)
Re:Monitoring energy usage with smart plugs, Prometheus and ... by wannacboatmovie on Sunday May 05, 2024 @05:13PM (#40268452)
You're running all your flat's power through that $14 Chinese rubbish and never assumed that shortcuts were taken or quality would be an issue? How do you know it will continue to function as a circuit breaker and isn't just a piece of wire inside?

For the uninitiated, CE marking is meaningless (it allows for self-certification).

I'd like to see Big Clive do a teardown of one of those.

Re:Monitoring energy usage with smart plugs, Prometheus and ... by stavros on Sunday May 05, 2024 @05:19PM (#40268505)
> How do you know it will continue to function as a circuit breaker and isn't just a piece of wire inside?

I don't care. I connected my previous breaker after it.

Re:Monitoring energy usage with smart plugs, Prometheus and ... by wannacboatmovie on Sunday May 05, 2024 @05:21PM (#40268534)
Why not just use a current transformer? (Clamp over wire type) It's much safer.
Re:Monitoring energy usage with smart plugs, Prometheus and ... by stavros on Sunday May 05, 2024 @05:27PM (#40268591)
Do you know of a Zigbee one? That's also a good option.
Re:Monitoring energy usage with smart plugs, Prometheus and ... by wannacboatmovie on Sunday May 05, 2024 @05:40PM (#40268714)
Some options at the $10 price point on AliExpress, though I cannot recommend one, maybe another reader can. CTs are the generally accepted way to do this and don't have to modify mains wiring. Could also build your own; CTs are inexpensive.
[dead]
Re:Monitoring energy usage with smart plugs, Prometheus and ... by wannacboatmovie on Sunday May 05, 2024 @05:53PM (#40268833)
Thanks Dad.
Re:Monitoring energy usage with smart plugs, Prometheus and ... by hurflmurfl on Tuesday May 07, 2024 @10:38PM (#40293828)
A bit funny, but I personally found "please learn to never..." to be MUCH more off-putting and patronizing than the "why not just...".

Maybe just something about the latter being interpreted as a question, and the former being interpreted as an order.

Re:Monitoring energy usage with smart plugs, Prometheus and ... by eldaisfish on Monday May 06, 2024 @09:58AM (#40274751)
The fire hazard from the cheap breaker is still present. Your existing one protects the downstream circuit but the Chinese breaker itself is a safety hazard.

You should care about the quality of these devices, especially ones that provide safety.

Re:Monitoring energy usage with smart plugs, Prometheus and ... by mindslight on Monday May 06, 2024 @02:02PM (#40277537)
Just a nit: The Chinese breaker isn't providing safety. You should still be caring about its quality because it's handling a lot of current (and potential power).
Re:Monitoring energy usage with smart plugs, Prometheus and ... by dist-epoch on Sunday May 05, 2024 @06:13PM (#40269010)
> $14 Chinese rubbish

Where do you think the "quality" devices are made?

Re:Monitoring energy usage with smart plugs, Prometheus and ... by homero on Monday May 06, 2024 @02:39AM (#40271821)
Quality ones inspect the product and have a company that can be sued. Others change their name monthly.
Re:Monitoring energy usage with smart plugs, Prometheus and ... by Symbiote on Monday May 06, 2024 @01:48PM (#40277334)
Somewhere in the EU or UK, normally.
Re:Monitoring energy usage with smart plugs, Prometheus and ... by theshrike79 on Sunday May 05, 2024 @05:18PM (#40268503)
You can get less shit ones that aren't made of Chinesium from Shelly
Re:Monitoring energy usage with smart plugs, Prometheus and ... by wannacboatmovie on Sunday May 05, 2024 @05:58PM (#40268873)
Great suggestion. Some of their modules appear to be UL certified.
Re:Monitoring energy usage with smart plugs, Prometheus and ... by baq on Monday May 06, 2024 @04:36AM (#40272492)
Yeah you need to shop for these specifically. They come at a premium.
Re:Monitoring energy usage with smart plugs, Prometheus and ... by theshrike79 on Monday May 06, 2024 @05:40AM (#40272849)
Some of them (most of the latest models) are scriptable on-device.

There are some ready-made scripts for the Nordics that check the current electricity prices and use those with some basic rulesets to see if the electric heating in a house should be on or off for example.

I just use mine to turn off the ice machine at 22:00 so it doesn't run through the night :D

Re:Monitoring energy usage with smart plugs, Prometheus and ... by londons_explore on Sunday May 05, 2024 @09:01PM (#40270128)
There are 2 ways to design these. They could use a regular relay, or they could use a solid state relay.

Solid state relays have widespread fraud. Like 60% of the ones on amazon will catch fire or fail before they hit the rated current. Trade suppliers generally don't sell them at >30 amps.

Regular relays up to 10 amps are cheap and reliable. Beyond that, they get expensive surprisingly fast, and the reliability is hit or miss. They fail in numerous ways, but the most concerning one is the plastic case melting and catching fire. The chance of failure depends on the nature of the load (capacitive or inductive loads will dramatically shorten a relays lifespan).

In my professional career, I have witnessed ~20 of the above devices failing, with melted bits or burn marks, but of that sample none has burned down a building, yet. But I'd say that was more down to luck than good design.

In general, I would trust a china-device for monitoring power, but not for switching anything more than ~10 amps (1 outlet).

Re:Monitoring energy usage with smart plugs, Prometheus and ... by baq on Monday May 06, 2024 @04:40AM (#40272517)
Is it the switching that kills the relay or is it enough to start/stop the load? E.g. if I have a 10A smart plug monitoring power on a small waist-tall freezer in the garage will it eventually damage the switching function?
Re:Monitoring energy usage with smart plugs, Prometheus and ... by londons_explore on Monday May 06, 2024 @07:26AM (#40273375)
Its generally the switching, although I wouldn't professionally sign off an undersized relay on the basis of 'it never switches, so its fine'.

The switching under load causes the contacts to get worn, then the large load causes the now-worn contacts to get hot, and the plastic supports melt and catch fire.

Re:Monitoring energy usage with smart plugs, Prometheus and ... by squarefoot on Monday May 06, 2024 @09:25AM (#40274377)
A mains connected circuit designed to minimum costs could have all sorts of corner cuts: bad capacitors, no overvoltage protection, no back EMF from load protection, bad isolation to the driving circuit, etc, so that it could work flawlessly for decades, but also stop working after a while because of a spark that welded the contacts together, or mains voltage to enter the driving circuit because of moisture and insufficient creepage between high and low voltage tracks, etc. I use a lot of cheap Chinese products in non critical contexts, but I'd avoid them with mains voltage or in any safety critical use.
Re:Monitoring energy usage with smart plugs, Prometheus and ... by jjeaff on Monday May 06, 2024 @11:14PM (#40281990)
I've been down this road quite a bit on Amazon, eBay, and AliExpress/Alibaba. Are there any good options for relays that work for 100-200amps? I've found 30 amp relays of the type that are built into PCBs and I have tried a few 100 amp contractors that can be triggered with a separate line but I'm not sure I trust them. Most tend to top out at 65a rating and I get the feeling the 100a ones are just the same but with a more belligerent seller willing to advertise a false rating. What serious options are available for switching larger loads remotely.
Re:Monitoring energy usage with smart plugs, Prometheus and ... by bityard on Monday May 06, 2024 @11:30PM (#40282079)
Relays and contactors are the same thing. The main difference is that they tend to be called contactors more often when they are carrying mains voltage and current. (Or higher.)

It's very common to use a relay to control a contactor.

Re:Monitoring energy usage with smart plugs, Prometheus and ... by whatble on Sunday May 05, 2024 @09:18PM (#40270227)
This is NOT a valid 63 Amps rated breaker, or 63 Amp anything for that matter. The screw terminal will melt.

Based on the screw terminal, without looking inside, I would rate it not higher than 10 Amps. Don't pass your whole apartment through it.

Re:Monitoring energy usage with smart plugs, Prometheus and ... by RedShift1 on Monday May 06, 2024 @06:25AM (#40273038)
I have seen 63 A (and higher rated) equipment, this is not it. This is a fire hazard.
Re:Monitoring energy usage with smart plugs, Prometheus and ... by aksss on Sunday May 05, 2024 @05:23PM (#40268555)
I think the aliexpress link for the display is busted (as they do).

A natural integration would be with Home Assistant. I’m not sure if the Earu breaker has an OOTB integration with HA yet, beyond doing something like Zigbee2MQTT and configuring entities for readings. It’s a good pattern though - integrate meter with your automation hub, let the automation hub push the images to displays, for meter and everything else.

Re:Monitoring energy usage with smart plugs, Prometheus and ... by danieldk on Monday May 06, 2024 @02:31AM (#40271773)
For people in The Netherlands: all Smart Meters that the net maintainers installed (are required to) support the P1 standard, which provides a standardized interface for customers to read out current current draw, cumulative power use, etc. Usually gas is hooked as well.

You can hook up a cheap dongle to expose the stats in an app. For instance, we use:

https://www.homewizard.com/nl/shop/wi-fi-p1-meter/

This meter also exposes an API on the local network. I have written a small driver for the SmartThings Hub, so that you can get the stats/graphs in the SmartThings app as well (we use a SmartThings hub for Zigbee/Z-Wave devices):

https://github.com/danieldk/homewizard-energy

Re:Monitoring energy usage with smart plugs, Prometheus and ... by Maakuth on Monday May 06, 2024 @03:33AM (#40272146)
This applies to Finland and Sweden too, perhaps others to follow.
Re:Monitoring energy usage with smart plugs, Prometheus and ... by jononor on Monday May 06, 2024 @03:40AM (#40272187)
Same principle in Norway, though it uses HAN instead of P1.
Re:Monitoring energy usage with smart plugs, Prometheus and ... by Maakuth on Monday May 06, 2024 @06:20AM (#40273016)
They call it HAN here in Finland too, but it's the same interface as the Netherlands one.
Re:Monitoring energy usage with smart plugs, Prometheus and ... by benhurmarcel on Monday May 06, 2024 @04:53AM (#40272594)
Same in France, the official meters have an interface on which you can plug a Raspberry Pi for example to read the data live.
Re:Monitoring energy usage with smart plugs, Prometheus and ... by swiftcoder on Monday May 06, 2024 @06:37AM (#40273097)
Do you know of an equivalent for the optical ports that speak DLMS/COSEM? The P1 standard doesn't seem to have caught on here in Spain just yet.
Re:Monitoring energy usage with smart plugs, Prometheus and ... by yard2010 on Monday May 06, 2024 @06:47AM (#40273158)
It seems that nl ppl always live 20 years into the future.
Re:Monitoring energy usage with smart plugs, Prometheus and ... by balfirevic on Monday May 06, 2024 @07:36AM (#40273438)
> all Smart Meters that the net maintainers installed (are required to) support the P1 standard

Does that support monitoring each power circuit separately?

Re:Monitoring energy usage with smart plugs, Prometheus and ... by quickthrowman on Monday May 06, 2024 @01:54PM (#40277421)
Not likely, you’d need a CT around the phase conductor(s) of every circuit. The meter likely only has CTs around the 2 (3) phase conductors on the incoming service drop.

It is entirely possible to meter each individual circuit, either with CTs and a meter or (gross simplification) special breakers that have metering capability built-in.

Re:Monitoring energy usage with smart plugs, Prometheus and ... by chrisdoc on Monday May 06, 2024 @10:24AM (#40275056)
Indeed it is great to use what is already provider by the utilities company, for the same reason I wrote a prometheus exporter that exposes the homewizard values https://github.com/chrisdoc/homewizard-p1-prometheus
Re:Monitoring energy usage with smart plugs, Prometheus and ... by smooc on Monday May 06, 2024 @10:45AM (#40275291)
Or to integrate with home assistant and cheaper

https://www.zuidwijk.com/product/slimmelezer-plus/

Re:Monitoring energy usage with smart plugs, Prometheus and ... by nachteilig on Thursday May 09, 2024 @01:23PM (#40310502)
I guess I will be able to get this cheap when we finally have smart meters in Germany in like 20 years
Re:Monitoring energy usage with smart plugs, Prometheus and ... by sifttio on Monday May 06, 2024 @02:32PM (#40277928)
This guy is funny, I like him. I just bought a $12 annual sub to his project IMGZ. I'm not affiliated at all, if you're thinking this is an elaborate ad.

https://imgz.org/

Hey dude, fix your "open in wallet" button when paying with BTC. The link is janked up.

Otherwise, it works great. See https://imgz.org/iAB4tgaJ/