error: json: cannot unmarshal number into Go struct field .data.timestamp of type string
Getting this with a brand new ruuvi gateway running just updated firmware. i wonder if the format has changed.
Failed to deserialize http listener data, error: json: cannot unmarshal number into Go struct field .data.timestamp of type string, path: /, body: { "data": { "coordinates": "", "timestamp": 1694729352, "nonce": 926543281, "gw_mac": "E5:07:91:6D:9E:71", "tags": { "F1:1A:AC:60:FE:DA": { "rssi": -57, "timestamp": 1694729351, "data": "02010415FF990403511823CAE30010FFD804140AFF00000000" }, "E2:2C:CF:25:0F:F6": { "rssi": -68, "timestamp": 1694729351, "data": "02010415FF990403C80954CAEF0048001404140B3B00000000" }, "CF:62:B6:80:C2:C5": { "rssi": -55, "timestamp": 1694729351, "data": "02010415FF9904035F1639CA590014000003E40AE700000000" }, "ED:29:AF:53:7E:DF": { "rssi": -84, "timestamp": 1694729351, "data": "02010415FF990403511853CA90FFF00010042C0B1D00000000" }, "E1:3E:C6:08:F4:C8": { "rssi": -69, "timestamp": 1694729351, "data": "02010415FF990403611727CA43FFFCFFD804340AFF00000000" }, "E3:D3:FA:E0:DF:CF": { "rssi": -73, "timestamp": 1694729351, "data": "02010415FF9904035D175CCA440004002404100B2900000000" }, "C3:E6:7B:27:36:7B": { "rssi": -69, "timestamp": 1694729351, "data": "02010415FF990403AB0A29CA99FFE0FFD004300ACF00000000" }, "C9:41:48:4E:61:B0": { "rssi": -81, "timestamp": 1694729351, "data": "02010415FF9904032C2931CA0C0058000C04000AE100000000" } } } }
ruuvibridge-v0.1.18-linux-amd64.tar.gz
According to the error it indeed looks like the timestamp format has changed for the http pushes from the gateway, which is a bit odd since the MQTT messages have not changed. I have to check the behavior on mine. To be sure, which firmware version do you have on the gateway?
| Current firmware version: | v1.14.1 |
|---|---|
| Latest available firmware version: | v1.14.1 |
also the "history" endpoint looks the same and i think when the parsing fails it will not emit an error message there so i was confused at first where my data is.
Indeed it looks like both http pushes from the gateway as well as the /history endpoint (used for polling) changed in gateway firmware v1.14.1. I've released a new version of RuuviBridge that expects this new format and should now work, please give it a try