Hi, i have an arduino monitoring power and temperature that sends the data to an emoncms server running on a RPi through a nrf24 module. To measure the temperature, i take ~50 samples and do the average, storing (and sending to the emoncms server) also the standard deviation of the measurement..
When the RPi receives the data, it runs a curl command as this:
curl "http://192.168.0.8/emoncms/input/post.json?node=10&csv=Vrms,Irms,power,Temp,TempErr&apikey=$foo
but when the TempErr (std deviation of the temp) is above 1°C i'd like to ommit the Temp value from my log (while keeping the TempErr log), so i tried adding an if statement that modifies the curl command to
curl "http://192.168.0.8/emoncms/input/post.json?node=10&csv=Vrms,Irms,power,,TempErr&apikey=$foo
my problem is that when i do that, emoncms stores a value of 0 to the temperature, which screws up my TempMin daily feed..
I have been able to do this (ommit the Temp measurement) if i use this command instead
curl "http://192.168.0.8/emoncms/input/post.json?node=10&csv=Vrms,Irms,power&apikey=$foo
but i'd like to keep track of the TempErr value to see how much off was the measurement and know if my temp sensor is way off or just a little bit off.
is it possible to do this without having to change the order of the inputs?
I'll attach the c++ code i use on the RPi side to send the data to the emoncms server (running on the same RPi)
Thanks
Re: Trying to pass empty value with csv input api
Using json you can be selective about which inputs you update so something like
should work to omit the 4th value but still update the 5th
Paul
Re: Trying to pass empty value with csv input api
hmm.. yeah, i remember i used .csv because the brackets confused bash and i didn't knew how to escape it :S
i'll research that and do it json style.
thanks