Reboot count in API refers to radios_status

I notice my hub took a reboot approximately 07:57 PDT today according to the reboot count, but my uptime didn’t reset to zero which is what I would have expected. I’d call that a bug. (v94 of firmware currently here)

1 Like

What is your Station ID?

in my profile…
(sigh - have to get over 20 chars for the blasted forums to take the response)

It looks like it’s been up for 4 days. Where are you seeing the reboot count?

in the hub status…

pi@pi3jr:~ $ influx
Connected to http://localhost:8086 version 1.5.4
InfluxDB shell version: 1.5.4
> use telegraf
Using database telegraf
> select timestamp,uptime,reboot_count,topic from mqtt_consumer where topic='wf/status/hub' AND reboot_count > 1 and time > now() - 1d limit 1
name: mqtt_consumer
time                timestamp  uptime reboot_count topic
----                ---------  ------ ------------ -----
1537196297703698486 1537196296 342519 2            wf/status/hub

The time decodes to

pi@pi3jr:~ $ date -d @1537196296
Mon 17 Sep 07:58:16 PDT 2018

I don’t know where that is coming from. WeatherFlow does not have a reboot_count so you should complain to whomever wrote that application.

Of course it does. It comes from the hub_status message, radio_stats array, second item in there.

https://weatherflow.github.io/SmartWeather/api/udp/v94/

My current raw data looks like:

{
  "firmware_revision": "94",
  "fs": "1,0",
  "mqtt_stats": [
    26
  ],
  "radio_stats": [
    5,
    2           <=== this is the reboot count
  ],
  "reset_flags": "PIN,SFT",
  "rssi": -38,
  "seq": 36601,
  "serial_number": "HB-00010412",
  "timestamp": 1537219849,
  "type": "hub_status",
  "uptime": 366072
}
1 Like

Where do you see that it is a reboot_count for the hub? Maybe it’s for the radio.

Here is a sample that shows the ‘reboot’ does not change on a Hub reboot.

As you can see, after two Hub reboots, the counter is still at 1.

Capture

Capture2

1 Like

@dsj, @rderr
Can one of you comment on exactly what the reboot in radio_stats actually means?

2 Likes

There are three radios in the hub; WIFI, BLE, and 915/868mhz. The WIFI and BLE radios are built into the main processor but the 915/868mhz radio is a different module. The reboot count in the radio_status field is the number of times the 915/868mhz radio has been reset. We track the value across all the hubs to make sure we didn’t introduce a firmware bug.

Hope that helps.
-Rob

6 Likes

That is exactly the information wanted

Thank you.

1 Like