Live data from Hacker News

Monitoring energy usage with smart plugs, Prometheus and Grafana

ounapuu.ee

31–40 of 190 posts

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

#32
post #14

Guys what are your favourite smart plug? I need one with easy integration with grafana, not sucking, and shipment to EU country?

ATHOM plugs are very nice, you can order one with ESPHome or Tasomata firmware preinstalled and they can ship from Germany https://www.athom.tech/

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

#33
post #14

Guys what are your favourite smart plug? I need one with easy integration with grafana, not sucking, and shipment to EU country?

I've been happy with my tplink sockets, especially running them off-cloud, and getting some command line control over them (although I think that debug api got blocked on later firmware updates). But quite easy to feed data into any db once you have such control.

Just about to try some ikea zigbee sockets, seem cheap(7e) in comparison. I hope I can also get them working command line based, just trying to setup a sonoff usb stick with some python package (bellows) as we speak.

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

#34
post #7

No need for that mate, just deploy home assistant or something similar and you will get this (and more) out of the box

Grafana is a hell of a lot nicer & controllable than HA HA is great, but it's not the answer to everything

It might be, but for all of the examples in the blog post, HA does this out of the box.

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

#35

No need for that mate, just deploy home assistant or something similar and you will get this (and more) out of the box

Right up until the Home Assistant UI turns into a lagfest, the installation dies, and you can't debug why because Docker. At least that's what happened to me. And no, it wasn't RPi SD power issues. This happened on an otherwise-stable amd64 server. The Home Assistant authors' hostility towards simple native distributions is now a show stopper for me. Long term reliability is more important than quick initial setup.

It's a Python app, of course being distributed as a docker image is the sanest way of doing it. I don't see why you couldn't just pip install it if you really wanted, but having been a Python developer for close to two decades, I wouldn't want to.

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

#36

No need for that mate, just deploy home assistant or something similar and you will get this (and more) out of the box

Right up until the Home Assistant UI turns into a lagfest, the installation dies, and you can't debug why because Docker. At least that's what happened to me. And no, it wasn't RPi SD power issues. This happened on an otherwise-stable amd64 server. The Home Assistant authors' hostility towards simple native distributions is now a show stopper for me. Long term reliability is more important than quick initial setup.

Nobody is preventing you from running Home Assistant core and deploying everything else yourself manually.

Demanding the authors who gave you the software for free also provide support for an installation method they've offered up with no support is a bit ridiculous, don't you think?

That attitude is what causes open source projects to die though...

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

#37

You need to be careful with what plugs you choose, though, because they each have, let's say, their own peculiarities. For instance, their overvoltage protection might not align well with what the local regulations say. For example, in my region of EU, the upper voltage tolerances are such that 264V must trigger an instant poweroff, and also anything producing power must shut off if the average voltage over the last…

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.

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

#38
post #30

Earlier quoted context omitted.

I'm also looking at a custom solution for my current migration from WiFi sockets to Zigbee. It seemed impossible to do an offline installation of home assistant, and discouraging signs for running it without an internet connection. There seems to be a sonoff usb stick that might act as a hub and allow command-line monitoring of all devices, should be perfect for feeding into grafana/prometheus.

HA will happily run offline; if you mean HAOS then I don't know what it does but it's an unorthodox Linux distro, but once it installs it should also run offline without issues. I'm also using their skyconnect zigbee coordinator and it works very well.

Yeah one of the tests was a RPi image and it wouldnt complete without a LAN internet connection (only got 4G). And it seemed far too weighty for a bit of home automation.

I recall the online requirement was for some ntp server requests that cant be disabled.

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

#39
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!

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

#40
post #12

Earlier quoted context omitted.

HA is actually pretty debuggable. Just install the SSH plugin, then SSH into the HA box, and then simply "docker exec" into the target HA container.

... and then not have any of your usual development tools, environment, system layout, or repair techniques because you're inside someone else's "works on my system" that they threw over the wall. It's obviously possible to debug what goes on inside a Docker image. It's just not something I'm particularly interested in dealing with, especially under duress.

> because you're inside someone else's "works on my system" that they threw over the wall.

FWIW, this can also be called stable state you can retreat to. And build upon, e.g. adding a layer of debugging tools.

I don't really like to deal with Docker, but at least I have reasonable certainty it'll work. I prefer system package manager or MSI, but if not that, it beats having to build something when it's near-guaranteed that what I'll get is not the binary the authors had in mind, if it even runs at all.

(Then again, I routinely rebuild Emacs to stay on the bleeding edge. But it took a while to work out all the usual dependency mess, and I even broke my system once doing it.)

Post reply on HN