Community
OpenEnergyMonitor

OpenEnergyMonitor Community

Home Assistant Emoncms Addon

That’s putting it mildly. :wink:
Alpine is a super lighweight distro. Viz:

Ref: about | Alpine Linux
Alpine Linux is built around musl libc and busybox. This makes it smaller and more resource efficient than traditional GNU/Linux distributions. A container requires no more than 8 MB and a minimal installation to disk requires around 130 MB of storage

and at Alpine Linux: The Lightweight Linux Distro Explained
Alpine Linux is a Linux distro that aims for minimalism, both in terms of space and in scope, as well as for higher security. The default installation media is only 133MB. This is quite impressive given that some ISO files on other distros are designed more for DVDs and thumb drives. Alpine fits comfortably on a CD-R with room to spare.

Haha true :slight_smile:

Here’s the size locally:

REPOSITORY                                                  TAG       IMAGE ID       CREATED         SIZE
inversechi-hassio-emoncms                                   local     5fd94588fdd5   4 minutes ago   86.7MB

With 11mb being emoncms itself and the majority being binaries for mariadb + php-fpm

Yes. It is a bit like the fact this is using the built-in HTTP server.

My issue is that a backup of the add-on should backup everything associated with that appliance - if you use an external SQL server, it doesn’t.

As you say, Alpine does have an sqlite package.

MQTT is different in that it is not a fundamental part of Emoncms - the SQL backend is.

The HA docs do not really discuss what should and should not be part of the add-on container and what shouldn’t AFAICS.

Hi Malachi, and thanks a lot for sharing this.

I was looking for the best option to install emoncms, but I didn’t want to bring in another RPi, already have too many of them to maintain. :slight_smile:

I’m a HA addict, and I have all my home devices and sensors in it, including energy data from the inverter and the meter. So your solution seems perfect to me.

I installed it and it seems to be working, but I’m stuck at the beginning of the process, because of my ignorance about emoncms: how do I integrate existing meter data (which I have in HA as sensors) in emoncms?

From what I understood, the best way should be MQTT, which for your integration means the mosquitto instance of HA, is that correct?

If you can point me to the relevant documentation or description of what’s needed to feed emoncms I’d be more than grateful.

UPDATE: I just found this in the guides, looks like I’m on the right track, but I want to be sure before I start exporting energy sensors’ data to MQTT. I’m not even sure yet if your addon is actually using HA’s MQTT, but I assume so. :slight_smile:

The more I think about your integration the more I like it…thanks again. :slight_smile:

I had time to verify today, and HA natively supports emoncms through two official integrations:

  • emoncms: creates sensors for the feeds available in your local or cloud based version of emoncms

  • emoncms history: makes it possible to transfer details collected with Home Assistant to the cloud version of emoncms or your local running emoncms instance.

Now I can start configuring emoncms and see how it works.

A question for @inverse: is it possible to add the redis component to your addon? While configuring some inputs I noticed some functions are not available because it says REDIS is not available. Thanks.

Hi Alessandro,

Glad you’re a fan of the idea of having emoncms running along side your HA setup.

Interesting what exactly is failing with redis? The extension is very lean at the moment and doesn’t include redis or any of the required PHP extensions.

If you have a GitHub account it would be great if you could raise these concerns on there we can tackle these in an issue.