Continuing the discussion from MQTT JSON Input with timetamp:
As the MQTT input currently does not support a time element, I decided to try the Emoncms Node-red node. I discovered it had not been updated to match the new input API so I have had a start at improving it.
You can find the 2 relevant files here. Simply overwrite the files in your modules folder and restart Node-red service. You will need to select a ‘data type’ in the node before using it.
My test environment is a little limited so if anyone wants to try this out for me feel free.
The key difference is that you need to select a data type of either legacy (which should behave as before), JSON, fulljson or CSV.
I have also made it such that you can (optionally) supply an ISO date and it will convert that to seconds.
There is now a status output from the push node so you can see if the server reports success. As I discovered this does not mean that data has been accepted, just that the server is OK!
If this node doesn’t work, please let me have an example URI you are trying to submit and I’ll check and see what is happening.
I am confident the full (or validated) JSON input works (as I am using it). I suspect the json one will not, but it is the same construct as before. However, I need this tested.
I have created a fork and opened a PR. If you want to test the updated node, please do. Just overwrite the js and html files in the node folder and restart node-red.
Feedback welcome on the PR.