RuuviBridge icon indicating copy to clipboard operation
RuuviBridge copied to clipboard

Format 6 parsing doesn't work due to no padding

Open Aketzu opened this issue 1 year ago • 1 comments

Tried getting Ruuvi Air data but failed due to RuuviBridge not being able to parse it,

4:52PM TRC Failed to parse data format_3_error="data is not in data format 3" format_5_error="data is too short" format_6_error="data is not manufacturer specific data" format_e1_error="data is too short" raw_data=02010017FF99040610ED3F28C6990003025D0500FFFF32D002B8AD

I have motherboard integrated wifi+bt in Linux with ruuvi-go-gateway pushing data through MQTT to RuuviBridge.

Example MQTT data:

ruuvi/70:85:c2:a5:0a:80/ED:47:10:4F:6C:FA {"gw_mac":"70:85:c2:a5:0a:80","rssi":-67,"aoa":[],"gwts":"1761981596","ts":"1761981596","data":"0201001BFF99040511AE3F33C930001000040400A3F6EC3255ED47104F6CFA","coords":""}
ruuvi/70:85:c2:a5:0a:80/C3:F4:1C:02:B8:AD {"gw_mac":"70:85:c2:a5:0a:80","rssi":-51,"aoa":[],"gwts":"1761981596","ts":"1761981596","data":"02010017FF99040610B84008C916000602CF1500FFFF74D002B8AD","coords":""}

Both format 5 and format 6 messages have similar headers in my case.

Format 5 parser looks at data[4] https://github.com/Scrin/RuuviBridge/blob/master/parser/format_5.go#L22 Format 6 looks at data[8] https://github.com/Scrin/RuuviBridge/blob/master/parser/format_6.go#L23

If I adjust format 6 parser indexes down by 4 then it works as expected:

4:53PM TRC Successfully parsed data data_format=6 raw_data=02010017FF99040610ED3F24C69B000402590500FFFF73D002B8AD
4:53PM TRC Measurement processed mac=C3:F4:1C:02:B8:AD
4:53PM TRC Skipping InfluxDB publish due to interval limit mac=C3:F4:1C:02:B8:AD
4:53PM INF Processed measurement absoluteHumidity=7.692289931945508 airDensity=1.1878041778648136 airQualityIndex=90.3492863825367 co2=601 data_format=6 dewPoint=7.641026568491392 equilibriumVaporPressure=2589.269775662378 humidity=40.410000000000004 mac=C3:F4:1C:02:B8:AD measurementSequenceNumber=115 name=Olohuone nox=1 pm2p5=0.4 pressure=100843 rssi=-55 temperature=21.665 voc=11

Aketzu avatar Nov 01 '25 08:11 Aketzu

Thanks, so it seems. I received a similar report on the forums and fixed it in the newest version

I did test format 6 at some point during the development but must have mixed up something while refactoring and didn't catch this earlier as the physical Ruuvi Gateway doesn't forward format 6 for devices that are also sending format E1

Scrin avatar Nov 01 '25 11:11 Scrin