Local node-red emoncms push to emoncms.org

I am trying to use the Node-red emoncms push node to push some local data to emoncms.org. These are feeds that don’t come from emonhub, but are sent to local emoncms through mqtt.
I have been able to send local data to emoncms.org using http, but I can only get it to send one input at a time.

No matter what I try, I’ve not been able to load an input to emoncms.org. I’ve included the node name by using msg.nodegroup, and have tried all combinations of json, text etc.
The user and API key are loaded in the node. For example, here is a test object sent using the push node:


But no new node (test) shows up on emoncms.org. The node reports OK rc=200, so the server has been responsive but no other clues as to why it doesn’t take the input.

Any suggestions welcome!

Looking at the help in the node

Your payload doesn’t match any of the structures. if you have selected CSV, it doesn’t want the {}.

TBH Full JSON is the best format IMHO.

I have tried combinations of all the above but still no success. I have been using an inject node to provide the data - maybe that is the problem?
For example, I inject
as JSON, with msg.nodegroup as string “test” (also tried JSON etc)
this is accepted as valid JSON by the node and is injected without error.
The debug node shows this:


but still no change to inputs on emoncms.org

Are you sure you are using the right API Key in the emoncms instance settings in Node-RED?

Do you have emoncms locally to test - easier to look at logs etc.

Good suggestion! I changed the url to my local emoncms and was able to log the test input with no errors. I tried again on emoncms.org with no success - so deleted the url and API key in the node and reentered the url and API key and success!
I can only imagine it was a dodgy API key which might have got corrupted when copying?
Many thanks - now to load the real data from mqtt server…

1 Like