Uploading from IoTaWatt to emoncms using the bulk protocol, if an entry in the array is empty, Emoncms responds ok (in the case of unsecure GET) or with the proper SHA256 validation (in the case of secure POST), but doesn’t post the data.
Here are normal secure transactions with the SHA256 response: time=1512339910&data=[[0,"IotaWatt",118.3,1393.7,307.3,152.9,0,0,0,0,0,0,0,0,0,0,0]] GI0eIXIrPtI4EoVe3BYV8zi2mo_JRLY-WZjkq5s7bTQ= time=1512339920&data=[[0,"IotaWatt",117.9,1382.4,305.2,152.0,0,0,0,0,0,0,0,0,0,0,0]] IMGKZNQnrTpDcRpgHoMz7JVgPWjN-oaQe8yrAvvPOgo= time=1512339930&data=[[0,"IotaWatt",118.0,1388.8,306.9,152.7,0,0,0,0,0,0,0,0,0,0,0]] cDIXMOen5PtsPT2Z3c_5aEEkCDUH1T9ynCr5p32JStM=
During this, the Emoncms.org input display shows the updates happening.
Now one field is removed and the input string has no value for one entry:
time=1512339960&data=[[0,"IotaWatt",117.9,1400.1,309.5,154.0,0,0,0,0,0,0,0,,0,0,0]] -_kt6f3P27qP0xYEI6dSRJPnc1kul8Ewkx1cvuuYPuA= time=1512339970&data=[[0,"IotaWatt",117.9,1430.5,316.4,157.5,0,0,0,0,0,0,0,,0,0,0]] VwsTaFpkIEu47V3PUhor0P2Kdq75Vbyf9bk2JsgQmDY=
As you can see, a proper SHA256 acknowledgement is returned, yet the input screen doesn’t change, and the data is not posted.
Switching over to unsecured GET:
time=1512340020&data=[[0,"IotaWatt",118.7,1409.5,311.4,154.8,0,0,0,0,0,0,0,,0,0,0]] ok time=1512340030&data=[[0,"IotaWatt",118.7,1413.7,314.3,156.5,0,0,0,0,0,0,0,,0,0,0]] ok
The ok response is received, but again, no updates occur.
Adding that input back into the array:
time=1512340090&data=[[0,"IotaWatt",118.4,1407.8,311.6,155.1,0,0,0,0,0,0,0,0,0,0,0]] ok time=1512340100&data=[[0,"IotaWatt",118.1,1396.8,308.9,154.0,0,0,0,0,0,0,0,0,0,0,0]] ok time=1512340110&data=[[0,"IotaWatt",118.1,1496.5,331.8,164.6,0,0,0,0,0,0,0,0,0,0,0]] ok
Now still getting OK, but the data is actually being posted.
This is disconcerting. Not because the null array entry causes the problem, but that there is no indication of any problem.
The bulk protocol is positional, so in order to post higher entries, this position must be included. Previously, I believe this worked OK, although the input was created and treated as zero. I can put a zero in there, but it would be better if I could leave it with no value (or “null”) and not have an input created or updated.
But most importantly, the acknowledgement should be failure if the inputs don’t post.