Issue using rate of change and MQTT

Hello,

Bit of background first…

I have been using Emoncms for quite a number of years, but now I want to try and get more data out of it.

One goal is to try and identify when things like my heat pump…under floor heating etc come on by looking at the increase per phase - for example my under floor heating might use 800w on phase 2. I have the data coming into emoncms from two sources - my old source whihc is a current cost meter, and a new source which is a tibber pulse which plugs into my electricity meter. At the moment i’m only involving the data from tibber for this project.

I have a process set up as follows:

My new addition is the rate of change step (which works:


and then the MQTT bit. I have been messing around for a few hours trying to get it working, assuming it was a config issue on my side - until i moved up the MQTT step to above the rate of change step - once i did this i started getting data. I then moved it back down and stopped getting data. (i used redis-cli and mosquitto_sub to validate that emoncms was adding data to the queue and mosquitto receiveing it from the mqtt_emoncms service)

Should the rate of change step pass onto the next step in the process, as well as output to my feed?

My goal here is to get the +/- data out of emoncms in near real time, and then do some logic in abasic python program to start with - would be great to eventually suggest devices…rather than looking out for hard coded numbers…but figured this would be a good start.

Hopefully the above makes sense as well as gives some background to what i’m trying to do.

Thanks!

Gareth

I’m reasonably sure it should but don’t use it as I use Node-RED t give me a ROC over a longer period - @TrystanLea?

I had a quick look in the code - and i think i found the issue:

The return is commented out - when i uncomment it i indeed get it published in MQTT - any reason it might be commented out? Objections for me to raise a PR to uncomment it?

Thanks
Gareth

1 Like

Thanks @gareth-ellis that does look mistakenly commented out, Im not sure why that is, yet happy for a pull request to fix that. thanks!

Created Fix rate of change process by gareth-ellis · Pull Request #1595 · emoncms/emoncms · GitHub