I have an arduino connected to the uart of the pi. Then sending data as
<nodeid> <data1> <data2> etc...
I am using SerialDirect from emonhub to post data with http.
I read on this thread below that we can post ‘null’ values which act as if nothing is send on that channel. This is a feature I am interested in. https://openenergymonitor.org/forum-archive/node/11637.html
So on my serial string I tried sending ‘null’ hoping this would be translated and posted as is. However the SerialDirect just ignore the string stating it contains some non-numerical content.
Would you know a way to post null on a channel when using SerialDirect?
WHY do you want to send null values? Are you trying to send bulk uploads as the post you linked describes? More detail on your goal will be useful to understand your problem. I send a lot of data to emoncms.org and to my local emonPi from an Arduino connected to a Pi, so I might be able to help.
Brian. Local or remote does not matter. In both cases the issue is the same. Yes null gets ignored when forwarded. This is what we like. Now try and send a null on the uart and get SerialDirect to receive it. There Emonhub complains about non-numerical data.
Steve. My goal is to send a row of data where one of them can be null. This way all channels can updates except the null one.
What I want to do is easy to understand. You have say 3 sensors. Then sensor2 for some reason is absent or in error (out of range etc…). I would still want to update sensor1 and sensor3. So the serial string will be
null
But the problem is that currently Emonhub complains about the non-numerical value (null) instead of forwarding the null on the http request.
The problem is that SerialDirect does not treat the null where it would be nice to have it to forwarding the null.