I’ve done some searching, and can’t find what I’m looking for. Can anyone share their NodeRED setup with me?
I’ve got emoncms working nicely. I’ve got NodeRED up and running and talking to the Mosquitto server. I’ve got two Tasmota smart plugs, which monitor energy use and can talk to an MQTT broker. I just can’t crack getting that data across into an input to Emoncms.
I’m not the sharpest spoon in the drawer, and I could probably bumble my way to something over time, but if someone already has something that works, I’d love to just take it and run with it.
You need to process the Tasmota data in NodeRed and split out the energy reading and send that to a MQTT Topic e.g. emon/TasPower1. Emoncms will pick up anything published to the base topic emon/ and it will just appear as an Input. I note you say an MQTT Broker - Emoncms and Node-Red need to be pointing to the same broker or you need to bridge the 2 brokers together.
You can send a JSON string with a timestamp and multiple measurements e.g.
Thanks @borpin. I’ve used one of the code blocks from your old posts to get the data translated to something digestible by Emoncms. I’ll do a write up for the sake of future googlers once it’s all settled.
Can I ask a follow-on question: whats the best way to take and process the power measurements into a useful feed?
There’s two “power” feeds: “Power”, which is an instantaneous reading, and “Period”, which is Whr since the last report. Using power-kWh for “Power” works ok, but I can see that it’s not high enough resolution to be accurate. Using an accumulator on “Period” should be better, but doesn’t seem to work as well as expected either.
My current goal is to try and stamp down my energy consumption a bit, by monitoring the major draws on power, sieving them out and then attacking the smaller items.
It’s not about resolution as such, just about making sure I’m taking the best reading I can with the tools that I have. Ideally I’d like to overlay the readings from each plug on my overall consumption, and be able to say “that was the washer/dryer coming on” etc, and for the trace to be the right sort of size, rather than 20% low or something.
The “instantaneous power” reading is clearly not the right one to use, because it has a lag on it, even at 10s or 20s intervals.
The “period power” reading looked promising, and I’ve turned the resolution on that reading up, but it’s still not quite right.
I’ve tried using kWh to Power on the “Period” power, but it’s not right either.