Live data from Hacker News

Monitoring energy usage with smart plugs, Prometheus and Grafana

ounapuu.ee

121–130 of 190 posts

Re: Monitoring energy usage with smart plugs, Prometheus and Grafana

#121
post #19

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/

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 Grafana

#123

Earlier quoted context omitted.

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.

> $14 Chinese rubbish Where do you think the "quality" devices are made?

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 Grafana

#124
post #67
post #52

Earlier quoted context omitted.

Can you link the power breaker?

This one: https://www.aliexpress.com/item/1005005657383634.html?spm=a2...

It's crazy to run any power through that. Only safe option are current transformers

Re: Monitoring energy usage with smart plugs, Prometheus and Grafana

#125
post #110

Earlier quoted context omitted.

Why sure. It's a rule that people who have the least amount of success with a thing will write the most about that thing. This is why those with their wits about them read things like Amazon reviews with a decent-sized grain of salt. And yes, you're describing a very quiet environment in terms of outside interference. I'm seriously a little bit envious of that. One thing that I am doing differently than what you were…

I have two identical Mikrotik devices bolted to a wall beside each other in a closet. One is the WAP serving all of our phones, the laptop I use for work, the laptop my wife uses for work, the TV, the PC hooked to the TV, and everything else. It’s been 100% rock solid. So my initial assumption is definitely going to be that the nearly identical setup except only serving a handful of low bandwidth devices is going to…

I haven't, at any time, doubted your ability to correctly configure an access point.

I'm just trying to find some data points that allow for an explanation of both "Eh, seems fine for me," and "Arrgh! This stuff doesn't work! Into the bin!"

I mean: I believe you when you say it doesn't work for you, for I have no reason not to believe you. And I assume that you also believe me when I say that it does work for me.

What other variables/data points could there be, do you suppose? It's hard, as you probably know, for me to imagine ways in which things can break when they've generally been working fine for me.

One possibly-related theoretical datapoint: My access points are not near eachother at all, on purpose. It is perhaps possible that the chatter from one of your APs was "desensing" (I hate that word, but it's a common-enough word) the front-end of the other AP and that this limits the ability of that AP to receive weak-ass signals from an ESP module (or whatever) in some manner of smart device. (When I do want to isolate wifi networks, like when my neighbor asks if he can borrow a cup of Internet because he's broke this month, I've been successful at creating virtual wireless interfaces that are steered to a particular VLAN -- even as far back as the WRT54G days.)

Another possibly-related data point: I do run my 2.4GHz channels at 20MHz bandwidth instead of 40MHz, because that always seemed to get better performance at a longer distance (not that I think I need that for most little in-home smart widgets, but it is nice to be able to take a wifi-connected speaker into the yard or out by the alley where I work on my car, and to use it without using bluetooth[0] or making my phone into a battery-sucking hotspot and reconfiguring the speaker to use that hotspot instead of the house's SSID).

In doing this, the best available throughput in my neighborhood is not very quick at 2.4GHz -- it's always down into low single-digit Mbps with 20MHz-wide 2.4GHz channels, which quite frankly sucks. But it always seems to work with a fairly consistent level of suck, and that level of suck is adequate (throughput-wise, at least) for what I actually need/want from 2.4GHz.

And, sure: I'd be happy to swing by with a few smart devices that seem to Just Work and one of my rather boring Mikrotik wAP ACs so we could sort it out. Or just share configs with passphrases and SSIDs sanitized? I don't think I'm doing anything special, but perhaps I am? (Perhaps I'm even doing something that is both wrong and stupid, but which lets it actually-work.)

I mean: At the end of the day, I just want other people to enjoy the same pleasure of being able to plug in random stuff and have it generally just behave. I don't think I'm an expert, though: I've got some background in land-mobile RF, have established some rather long links between Ethernet-connected devices using ISM bands (some of which have stood up for well over a decade), and I've been playing with Wifi since Orinoco PCMCIA cards were the new hotness. I think I know a few things, but that doesn't mean that I've got some super-secret sauce or something.

At home I'm just a cheap bastard who wants to automate some things, and who seems to be successful at getting inexpensive things like TP-Link smart plugs, ATHOM light bulbs, random Google/Amazon smart speakers, and trash-tier relay modules to work seemingly-reliably with Home Assistant over wifi. I'd pay more for Z-Wave or something if I felt that I had to do so, but my (perhaps unique) experience with wifi isn't leading me towards Z-Wave. (I also had good "luck" with X10 around a quarter of a century ago: It always worked well-enough to automate reliably as long as I kept everything X10-related far away, wiring-wise, from the beastly Best FerrUPS UPS I was using back then.)

---

[0]: Most people would use Bluetooth for this, and they're generally not wrong. But I absolutely hate the way in which Bluetooth breaks when the person with a Bluetooth-connected speaker wanders off with their phone in their pocket and leaves their speaker behind: The audio breaks up in ways that are particularly annoying, but which they'll never, ever hear -- much to the disdain of anyone who does hear it happen. I don't like being that person. If I'm going to play music that the neighbors or anyone else can coincidentally hear, I don't want it to get broken and choppy just because I went inside the house to fetch a different wrench or a beer or something, even if I myself will never hear the problem that Bluetooth use can promote. In this way, slow wifi is better than broken Bluetooth.

Re: Monitoring energy usage with smart plugs, Prometheus and Grafana

#126
post #19

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/

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 al…

This applies to Finland and Sweden too, perhaps others to follow.

Re: Monitoring energy usage with smart plugs, Prometheus and Grafana

#127

Earlier quoted context omitted.

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 al…

This applies to Finland and Sweden too, perhaps others to follow.

Same principle in Norway, though it uses HAN instead of P1.

Re: Monitoring energy usage with smart plugs, Prometheus and Grafana

#128

Earlier quoted context omitted.

could you expand on your comment? what is data sinks as applied to your idea?

similar to how you can make plugins for data sources, you can make plugins for data sinks, like write over modbus, or POST to http API or, publish to some kind of MQTT broker, etc. since IoT devices have limited storage, usually the metrics are dumped into another system like Prometheus. but that Prometheus data source used plotting cannot be used to control the device, which will have another endpoint and another AP…

Have you seen/know about NodeRED? I myself have moved away from HA/OpenHAB-likes to NodeRED as that allows me control that's more... restricting. At its heart NodeRED is a visual programming tool (and I think it wouldn't be a terrible fit for Grafana), but what NodeRED has and Grafana doesn't is a community which built a very significant number of packages that integrate with various protocols and devices used in home automation.

I see a potential for some integration and/or idea sharing here. But it is also important to understand that the set of people who want to fiddle with their homes is much, much larger than the set of people who (are able to) program. Which is why HA and the likes are so popular.

Re: Monitoring energy usage with smart plugs, Prometheus and Grafana

#129

One step further. I just installed the Emporia Vue 2 in my distribution box. 16 CTs plus the three mains phases. It's ESP32 based and there is a great ESPHome project that you can flash it with for local only reporting. Add some HA and VictoriaMetrics, and now I can see how the whole house behaves with Grafana. Next up, Zero-Export using this data to steer my little OpenDTU solar plant. We live in such cool times!

Is anyone aware of any other OSHW alternatives to this? Preferably with Ethernet. ESPHome would be preferable. The clones I can find are roughly the same price as the "original" hardware. ATM90E32AS seems to be ~$1 per channel on JLCPCB, so I'd imagine this could be pretty cheap with SMT assembly. My use case is like ~60 circuits.

The main one I'm away of is IotaWatt, which I've had running in my panel for the last few years without incident.

Re: Monitoring energy usage with smart plugs, Prometheus and Grafana

#130
post #37

Earlier quoted context omitted.

Shelly relays can be configured to do all these things and the voltage safety threshold itself is also configurable (at least in the Plus devices) but they aren't zigbee. Otherwise great little devices.

I cannot really understand why Shelly doesn't offer ZigBee (and now Matter) options, only Wifi. This has always been the biggest blocker for me.

They have z-wave options, though.
Post reply on HN