Bare metal install on Debian

Hi,

I’m keen to try out openemon, but I dont want to run it on a pi, and I already have debian systems in my house that I use to run services.

I don’t want to run a docker image, but there seems to be no documentation (that I can find) regardin g bare metal setup.

I’ve perused the install scripts, but there is no way I’m running them on my system - they violate so many principles of basic system administration, with many dangerous assumptions being made, and permissions being set / files / folder created etc.

I’ve managed to get emoncms “sort of” up and running on nginx/mariadb, but as yet I have no input sources and am not really sure how to test it.

I’ve also become stuck on the issue of servicerunner and feedwriter - I have configured redis to be used via a unix socket, but I cannot see how to convince these scripts to actually use the socket in question. feedwriter /might/ be ok (I don’t know how to check) but service-runner complains that it cannot connect to the redis server.

Any help would be appreciated, including what to do next. How can I generate some test data and graph it?

Welcome @spyro - I suspect there won’t be many people who have done this. The history of emonCMS development is (and I’m happy to be corrected!) on and for a single tenant on a dedicated device, e.g. a Raspberry Pi or VM. Indeed, the documentation specifically states this.

If you don’t want to use docker, probably the easiest way to try it would be a lightweight VM rather than trying to connect it all manually. You’re also very welcome to contribute changes that you think would be beneficial in the build scripts.

Sorry, Angus, but emoncms.org (the on-line multi-user version) predates the first Raspberry Pi version by a good few years. Indeed, it dates back to the emonTx V2 using a NanodeRF as the base to connect to the router by Ethernet.

1 Like

Happy to be corrected :stuck_out_tongue: :slight_smile: Although is it still fair to say continued development has targeted a system dedicated to it?

I’d be happy to contribute a writeup of what I eventually manage to do, btw - I believe in contrinuting back to projects.

My goal right now is to get stats from my OpenEVSE (which is misbehaving rn, but that’s a different problem), and graph them from my home server (debian bookworm box).

Is there a good overview of how the system is supposed to work? I’m a bit lost at sea right now. There are a LOT of moving parts, and I can’t find much in terms of clear guidance.

1 Like

Ultimately, I’d like to have it running on debian + nginx + postgres, but I’ll settle for mariadb if I have to for now.

In short, no. There’s a lot of instructions with detailed steps for what to do to get it working, but they don’t tell you what following them achieves - if you see the distinction.

The very short version is:
Data arrives in emonCMS by one of two routes, either directly by LAN or via emonHub if it’s serial or USB. If it arrives via emonHub, it’s interpreted/converted by an Interfacer. On first arrival in emonCMS, it creates an input on the Inputs page (you don’t and can’t). The numbers can be manipulated there (scaled, offset, integrated power→energy, etc) in steps called Input Processes and somewhere along the line must be sent to a Feed, which is the database. You create a Feed from inside an Input Process. If you don’t send the data to a Feed, nothing happens to it and it’s lost when the next value appears and overwrites it. If no data comes in on time after you’ve created a Feed and it’s a Fixed Interval feed, you get NULL values in the database, which cause havoc in graphs. Graphs/Visualizations/Dashboards/Apps extract data from Feeds and display it.

You can also try reading this New user old emon devices - #10 by Robert.Wall, which I wrote recently for someone equally lost.

@awjlogan The RPi version of emonCMS tends to lead the on-line version when new features are introduced.

2 Likes

Thanks, that’s really helpful.

I think I’ll take the advice above and run the scripts in a VM, so I can see a “working” installation.

Right now, the only source of data I have is my OpenEVSE, so I’ll try to use that for now.

1 Like

You can “synthesise” data in a web browser. Take a look at Input API Help from the Inputs page, this give you the data formats to go straight in to emonCMS, unfortunately not via emonHub. This will at least demonstrate everything except emonHub is working.

Aha! Thanks, I was wondering where those powerX things had come from that I couldn’t seem to get back… understanding is starting to happen…