Data coming in via emonhub can easily be posted to Emoncms.org or any other remote emoncms server.
However, if the MQTT messages are not coming via emonhub (i.e posted directly to emonPi MQTT server by another servie or device like the WiFi MQTT relay thermostat) there is currently no way to forward this data to emoncms.org. I’ve just written a simple nodeRED flow to do just this
I found a solution: (i was mistaken: the solution above will create multiple nodes in the target emoncms based on the nodenome from the mqtt and not group it under one node. I changed it to push multiple values and mqtt nodenames to one “node” in emoncms.
Create a “publish to MQTT” per output you want to share in your emoncms (base).
Change the “nodename from MQTT sub-topic” to:
var topic = msg.topic
var arr = topic.split("/");
var length2 = arr.length;
node = arr[length2-1];
var waarde = msg.payload;
msg.payload = node + ":" + waarde;
And fill in the Node name in “Emoncms” where you want it to show up in the other emoncms.
You should be able to use Valid JSON rather than Legacy Processing.
I am surprised this works as the JSON is not a ‘flat’ JSON (as per the info panel for the node).
You have the same error as your other thread in not just sending the payload.ENERGY portion of the original message.
You should be able to put the time element into a msg.time part of the msg (again as per the info panel on the node).