cisco / senml

Tool to convert senml between formats and act as gateway server to other services
BSD 2-Clause "Simplified" License
39 stars 15 forks source link

discussion about validity of no values in record with a basetime set #28

Open jhelberg opened 3 years ago

jhelberg commented 3 years ago

I'm using senml for receiving data from KPNThings (Dutch KPN LoRaWAN network) and every message fails the validity test. This is because the first record doesn't contain any value. According to RFC section 4.2, this is a violation of SenML. Your code ensures this. KPN tells me that the basetime, which is present in every first record, serves as a value, so their SenML-message is OK. The message is e.g.:

[{"bn": "urn:dev:DEVEUI:A84041D86182B195:", "bt": 1621778032}, {"n": "payload", "vs": "031b15c4004e357f0f9464"}, {"n": "port", "v": 2.0}]

My software implements a work-around where I add a vs: "" to the first record.

As you know the standard a lot better than I do: am I wrong? Has KPN the wrong interpretation of the standard? If KPN is wrong, I'll fork, fix the validity-checker and submit a pull-request of course.

many thanks! Not the least for the software you wrote!