Optimum hardware setup EmonCMS / Mosquitto / Openhab etc

I’m continuing to play around with my setup, and want to expand the power monitoring into home automation. Initially, this is being driven by the (NICE) plugin power monitoring switches (flashed to Tasmota) I bought – Thanks @borpin that I want to integrate the power logging to EmonCMS and latterly I’ll get to adding control via Openhab or HomeAssistant

I’ve seen a few posts that don’t recommend co-installing Openhab / NodeRed on the emonpi (after I’ve done it of course, but seemingly with no ill effects – so far), so I’m looking again what the optimum hardware setup might be, and what to run where.

I have a fair amount of hardware, including

Synology 1819+ NAS
1 x unused PI3
2x Orange PI zero (running PiHole in a High Availability Cluster)
1 x emonBase (with 1x emonTx and a number of emonTH nodes)

and I’m not averse to getting another couple of Orange Pi Zeros to try setting up in a HA cluster for the broker.

After reverting my emonBase to stock, is there any advantage to putting openhab/node red on my NAS over the unused PI3. What about the MQTT broker, Mosquitto ? I understand there will be some config changes needed if i do this, but is there any mileage in shifting that away from the emonBase ?

On a related note – what’s the best way to backup / restore my current emonBase / emoncms config before reverting it to stock by reflashing the SD card with Etcher. When I re-flash, is there any advantage to putting a larger SD card in ?

On the emonSD image, the reason I say not to put anything else on is that the partitions are setup for data gathering so there is limited space on rootfs.

MQTT Broker, you can use the one on the emonbase for everything without any ill effect. I run mine in a PVE container (see below).

On other hardware, I personally have moved to an old Laptop, with more memory running Proxmox VE. Onto that I have various systems in VMs or containers (Home Assistant, emoncms, PiHole, Mosquitto). These can easily be backed up and it has the advantage of a builtin UPS.

I am gradually moving away from the RPi for these systems.

For your current system, just use the ‘backup’ in the emoncms UI. There is little advantage to a larger SD card. You are unlikely to gather more data than it can store in the life of the card. If you do have that much data, you really do not want it on an SD Card.

For me I have the RFM Card on an old Pi2 just running emonhub which sends the data to the emoncms running in an Ubuntu container.

Thanks @borpin.

I’ve just realised that i’ve started to go down the HA resiliancy / redundancy rabbit hole which is somewhat akin to trying to run before I can walk. There are some very interesting options - started looking at Pi clusters and Docker swarms last night. Re-purposing my spare laptop (dell lattitude 7440) could be an option too - though that is currently my gpu passthrough virtualisation testbed. I think this needs more investigation, but as a separate project once i have things running. I also need to think about how to use the hardware i already have - I keep forgetting about the rack mount synology NAS i have (fans are too loud to use currently) - rather than buying yet more bits of kit. For now, I think that’s using my spare PI for the openhab (or other) install.

Why did you go with Proxmox VE over other VM solutions ? Something i’m not clear on from the website is do you need a subscription? likewise, why are you shifting away from RPi ?

I tried it and I liked it and there was a method to do an install of HA available. I’d had an HP Microserver for a while running a free ESXi hypervisor but it was too inflexible, limited max memory and the power draw was just ridiculous. Key thing I like about PVE is the ease of backing up your VM/LXC containers (yes you can have native containers). You can also create a cluster if you really want more resilience.

It has now been up 84 days and that includes my Smart Meter install during that time (remember, Laptops have batteries and there is no screen to drive).

No. You need to edit the available repositories else the apt update fails but other than that it just works.

SD Card failures. So much of this stuff is actually fairly high write load. I’ve run Pis for years with HDDs to avoid this. Look at HA. It is now very definitely moving to NUCs or Odroid based installs - that is what most of the devs use and there are numerous - my card died comments on the forum.

The other reason is I have a VM or container for specific tasks or tools (so one for HA, MQTT, NR, Pi-Hole, Unifi Controller etc). This means when one thing goes pete tong, it doesn’t take everything else with it.

The additional CPU “horsepower” over that of a Pi is nice too. (although the Pi 4 narrows that gap)
Between the battery, HDD and loads of RAM, compared to a Pi, (Pi 4 narrows that gap too)
as well as a small and all-in-one type “package,” they’re an attractive option.
I went that way myself about 3 years ago, and haven’t looked back since.

1 Like

Ok. great. I think i’ll give that a go. I had started going down the debian / KVM / Xen route but not got too far so i won’t loose much by changing tack now. wasn’t too hard to find the info needed to change repositories either.

Ah. makes sense. I’m still fairly new at the whole Pi computing thing so haven’t encountered SD card failure yet - that said i was planning on doing backing everything up to my NAS box via rsync, and did implement a High Availability setup of my orangepi zero pihole lest i lose one & all my dns.

I’m still getting my head around how to make best use of VM’s / clusters at home so this is useful knowledge to throw in the mix. Definitely for a later date though - need to watch out for taking on too much at one bite. Still got my network redesign & segment to complete - after i have got my energy monitoring / home automation stuff in hand.

Early on in my Virtualisation journey, I made the mistake of adding lots of systems to one VM (Under ESXi). When that went, so did everything. Definitely better to keep things separated and use LXC containers wherever possible as they are ‘lightweight’ in PVE (bit like docker on Linux).