Newbie here - how to integrate with existing ecosystem

Hello,

I just found this community searching for Heatpump efficiency analysis. Im using OpenHAB for a long time and already have many sensors(rf433/rf24/zigbee/wifi) in the house. Most of the data is flowing via MQTT. I just installed a Clivet 16kW heatpump which heats water in radiators but the heatpump doesnt directly heating them - it instead mixes the water in a 120L tank.
Also, i have a PV installation with Solaredge SE8000H inverter but i cant see the potential of the produced energy because im no exporting it. I see only when consuming.
For energy meter i bought DDS238-2 Wifi module which im about to flash with tasmota. The data will again go to MQTT/OpenHAB and InfluxDB+Grafana.
How to integrate my existing ecosystem with OEM? Do i need only emonCMS?

Thanks!

Welcome!

Well, what are you wanting? Just the “My Heatpump” and maybe “MMSPHeatPump” apps? If so, I think just emonCMS would suffice. You’ll need something to take the MQTT data and either reformat/resend numeric values on emon/NODE/INPUT topics (which emon should pick up, as described in MQTT — OpenEnergyMonitor 0.0.1 documentation ) or send them to emonCMS’s HTTP Input API (best documented in “Input API Help” once you have it installed).

As a minimum, try to mimic the inputs described on Heat Pump Monitoring — OpenEnergyMonitor 0.0.1 documentation and note the feed details described in emonCMS: Getting started emonPi/Base — OpenEnergyMonitor 0.0.1 documentation

I think there may be some other page with more detail on the expected feed setup steps but I did not find it. Ask more questions if you get stuck, please!

1 Like

Thank you! Ill check the links.

I just want search for points of improvement in my heatpump setup. Right now it doesnt look very efficient as in the energy monitor the curve has pikes on even intervals.

Set up a Raspberry Pi with EmonCMS.
Then send all the data that you have to MQTT at emon/xxxx
They’ll turn up in the Inputs page.
From there you can log the data.
After that you’ll be able to get graphs, overlay data etc and see what’s going on.

1 Like

Can i install EmonCMS on bare metal linux server?

I don’t see why not, as long as you can install its requirements like PHP and stuff. Might not be the easiest route.

Yes and no.
The default/best option EmonSD which is a ready made Linux distro for the RPi, containing everything all set up and ready to go.
You can alternatively install, say, Ubuntu on bare metal or a VM, and then use the script to install the EmonCMS software onto the the server. Several people have done this, but obviously many things are now out the control of Emon team.
I’m assuming you mean a server that’s on prem rather than in the cloud?

It’s the best if you’ve got a Pi handy and no other always-on local server. From @borpin’s posts, I’m not sure it’s the best if you have because it seems Pi SD cards always die eventually, even with the clever settings of EmonSD.

Yes.

There is a script to install on Ubuntu. https://github.com/openenergymonitor/EmonScripts/blob/master/install/readme.md#building-your-own---base-os-preparation

Personally, I run it on a PVE server on an Ubuntu LXC. Use 20…04 rather than 22.05.

Hmmm, if you use a decent, oversized (32/64GB) SD card, and change then every 4-5 years, you’ll be fine. I’ve been running EmonSD/EmonCMS 24/7 for 8 years on the same Pi2 and changed the card a couple of times (due to them filling up) but never had a dead SD card yet.

Now, development Pi’s that are being actively worked on (code/electronics/etc) that are being switched on/off repeatedly (at the mains plug when then crash) that’s a different matter. I’ve had a pair of dead cards. However, it’s possible they were copycat/pirate cards made to look like Samsungs…

Im just had too many rpi’s each running something. Thats why i currently consolidating everything in a single on-prem server running either on VM or Jail(its FreeBSD). That saves alot of space and power sockets :slight_smile: Only one left to run Zigbee2MQTT with attached Sonoff USB dongle.
So ill probably try the Ubuntu install script or the Docker experimental image.
Im reading about the MQTT topic structure here but im not sure what my nodeID name should be as i dont have other Emon’s. Also, have to check what values the CMS accepts, for example some of the data is produced by Tasmota flashed modules and is in JSON.

That is largely down to the work done on the structure and setup of the EmonSD. Before that, failure was far more regular.

That was why I moved to a PVE setup. The biggest advantage of that as the base system is that it will take automatic snapshots on a schedule.

I’d use the script. We can support that but the Docker is very unsupported!

Just read the install instructions carefully.

The system looks for a base topic of emon.

There are the 2 levels of grouping so emon/device/data but it doesn’t really matter. Any deeper than that and it will add the topic name to the sensor name.

The system will accept a single JSON string for one node, but you may need to preprocess the data to get it absolutely correct (I do this for some devices in Node-RED).

1 Like

Me too! :smile: Still probably uses less power than the servers that came before them!

I know my PVE setup on a laptop uses way less power than what it replaced!

Well, that could mean it replaced a decade-old 4U rackmount server from a retired nuclear-powered Navy ship! :wink:

1 Like

We were talking about replacing Pis…

Im using an HP Microserver gen 8 with Xeon CPU and 16GB RAM. Its powerful enough and in the same time uses low power.

On Topic:
Here is the data structure which the DDS238-2 Power meter sends to the MQTT topic:

{
	"Time": "2022-11-03T16:41:17",
	"ENERGY": {
		"TotalStartTime": "2022-11-03T14:32:22",
		"Total": 26.690,
		"Yesterday": 0.000,
		"Today": 0.020,
		"Period": 10.0,
		"Power": 106.5,
		"ApparentPower": 200.3,
		"ReactivePower": 169.7,
		"Factor": 0.53,
		"Voltage": 223.1,
		"Current": 0.898
	}
}

Is it suitable for the CMS if i put it in emon/* topic as is?

[edit] Mod - I formatted the JSON with https://jsonlint.com

No, not quite - the outer level needs to be removed.

The timestamp does not have the correct label so would be ignored (it also doesn’t say if it is local or UTC)

Ideally it would be this

{
	"time": "2022-11-03T14:32:22+00:00",
	"Total": 26.690,
	"Yesterday": 0.000,
	"Today": 0.020,
	"Period": 10.0,
	"Power": 106.5,
	"ApparentPower": 200.3,
	"ReactivePower": 169.7,
	"Factor": 0.53,
	"Voltage": 223.1,
	"Current": 0.898
}

note the timestamp key is time and I have appended +00:00 - adjust time offset as necessary. Please do not use Z.

Can you input a json list over MQTT? That’s not mentioned in MQTT — OpenEnergyMonitor 0.0.1 documentation

That is exactly what I said above :frowning: It needs to be the right format though! As I said before, Documentation is not a strong point.

From my Emonhub log

2022-11-03 16:30:29,997 DEBUG    MQTT3      Publishing: emon/3 {"Pulse": 14100, "Pulse Inc": 1, "time": 1667493029.7302015}

It is actually more efficient than multiple topics.