gravesjohnr / Sigfox-Thinxtra-Oracle-IoT-Bridge

This code is for using the Sigfox/Thinxtra IoT devices to work with the Oracle IoT Cloud Service.
MIT License
1 stars 2 forks source link

Callback data is not presenting battery level, heading or speed #1

Closed KiwiDanNZ closed 7 years ago

KiwiDanNZ commented 7 years ago

I have used this fantastic article to test the Sigfox Oyster and have found that it works perfect other than that my Heading, Speed and Battery info is not coming through correctly, instead of getting values coming through, i am getting 0's.

I am currently dweeting my Oyster to here: https://dweet.io/get/latest/dweet/for/Simpro_SIGFOX_1_2017

gravesjohnr commented 7 years ago

Interesting. I've just done some testing and seeing the same thing. I was focused mainly on the Lat/Long, so I didn't pay much attention to the heading/speed/battery. Let me do some digging.

KiwiDanNZ commented 7 years ago

I have found that if you remove the "LittleEndian Tag" off the custom payload you get the battery coming through. ie ...heading::int:8:little-endian speed::int:8:little-endian battery::uint:8 not ...heading::int:8:little-endian speed::int:8:little-endian battery::uint:8:little-endian

KiwiDanNZ commented 7 years ago

although this does not work with the heading and speed components. i tried changing the heading and speed to uint rather than int and this did not seem to help either. (puzzled ;) )

gravesjohnr commented 7 years ago

Based on the docs, "https://digmat.freshdesk.com/support/solutions/articles/16000056470-oyster-sigfox-integration" It seems these three are size BYTE. I would think uint:8 should be correct. Trying again and modifying heading and speed to be uint rather than int and no endian setting.

gravesjohnr commented 7 years ago

You are correct on the battery setting. I'll need to take the oyster for a ride to test the other two values.

gravesjohnr commented 7 years ago

That seems to work with uint:8 for all three. "heading": 160, "speed": 0, "battery": 182 }

gravesjohnr commented 7 years ago

Updated sample code.