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

Goodafternoon,
Are you still using the Tibber energy provider?
I started using them yesterday.
I am looking into means to incorporate their data in my reporting and in my emonevse.
Any suggestions?
Best regards,
Antoine

Hi,

No - i’m not actually using Tibber anymore. I switched to another provider, greenely - they have a worse API (or rather, none; i had to use the undocumented api their app uses).

However, I use the data the same way.

I have a script that runs every few minutes until the next days prices are available, which collects prices and then submits them to emoncms. I then am able to use this in other calculations within emoncms, e.g calculating current cost per hour, and then also per day (though the per day needs a separate script outside of emoncms to calculate).

The rate of change I have been using less, though would like to get back to it sometime.

Gareth

Thanx Gareth - is this something you are willing to share?

I am looking to use something similar to start / stop charging the car.

Brgds,

Antoine

I’ve been trying to make my scripts a little more general with the aim of putting them in a public repo. I will see if I can get the pricing ones to emoncms in order and put a link here when I do

1 Like