gordlea / fireboard2mqtt

8 stars 5 forks source link

Spark Temperature showing Unavailable but Battery percentage is working #43

Closed runjmc closed 6 months ago

runjmc commented 6 months ago

Fireboard Spark seems to be showing Battery percentage but Temperature shows up as Unavailable.

I checked in MQTT and it just shows up as offline for temperature.

gordlea commented 6 months ago

Would you mind trying the following so I can get some logs: setting logLevel to fireboard2mqtt::fireboard_watcher=trace in the home assistant addon config, restart the addon, wait 10 seconds, then go to the logs pages, can copy and paste the results into a message here?

I'd really appreciate it, I need to see what data you are getting back from the api request for the spark.

runjmc commented 6 months ago

Here you go. Let me know if you need anything else. Thanks for the help.

s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started [14:31:41] INFO: drive enabled: false [14:31:41] INFO: using mqtt service username from home-assistant: addons [14:31:41] INFO: using mqtt service password from home-assistant [14:31:41] INFO: using mqtt service url from home-assistant: mqtt://core-mosquitto:1883 [14:31:41] INFO: Starting fireboard2mqtt [2024-04-03T21:31:42Z DEBUG fireboard2mqtt::fireboard_watcher] client authenticated successfully [2024-04-03T21:31:42Z INFO fireboard2mqtt::fireboard_watcher] checking fireboard api for updates [2024-04-03T21:31:42Z TRACE fireboard2mqtt::fireboard_watcher] devices fetched successfully: [FireboardApiDevice { id: 231004, uuid: "cf7600a4-906c-4d8c-aff3-xxxxxxxxxxxx", title: "Spark", hardware_id: "GFDK42JK7", version: "1.4.10", channel_count: 2, degreetype: Fahrenheit, model: "FBXIR", channels: [FireboardDeviceChannel { channel: 1, channel_label: "Instant Probe", last_templog: None }, FireboardDeviceChannel { channel: 2, channel_label: "External Probe", last_templog: None }], latest_temps: [], device_log: FireboardDeviceLog { date: 2024-04-03T14:17:09-07:00, mac_nic: "xx:xx:xx:xx:xx:xx", onboard_temp: 82.89428, v_batt_per: 0.7359597 } }] [2024-04-03T21:31:42Z DEBUG fireboard2mqtt::fireboard_watcher] found device: "GFDK42JK7"

gordlea commented 6 months ago

Thank you!

So, looking at the response more carefully, I notice there are no actual temperature readings happening.

{
  "id": 231004,
  "uuid": "cf7600a4-906c-4d8c-aff3-xxxxxxxxxxxx",
  "title": "Spark",
  "hardware_id": "GFDK42JK7",
  "version": "1.4.10",
  "channel_count": 2,
  "degreetype": "Fahrenheit",
  "model": "FBXIR",
  "channels": [
    {
      "channel": 1,
      "channel_label": "Instant Probe",
      "last_templog": "None"
    },
    {
      "channel": 2,
      "channel_label": "External Probe",
      "last_templog": "None"
    }
  ],
  "latest_temps": [],
  "device_log": {
    "date": "2024-04-03T14:17:09-07:00",
    "mac_nic": "xx:xx:xx:xx:xx:xx",
    "onboard_temp": 82.89428,
    "v_batt_per": 0.7359597
  }
}

Due to fireboard api limits (200 requests per hour), it takes a little while for home assistant to notice measured temperatures. In the fireboard api also, each channel only retains it's temperature for 1 minute after you take a reading, so if you are using it as an instant read thermometer, it might be easy to miss the time when the thermometer actually shows a reading in home assistant.

Would it be more intuitive if I increased the time the temperature persists in home assistant to 5 minutes?

runjmc commented 6 months ago

Thanks for the help.

Hooked up a external Probe and that seems to be working and showing up correctly.

With the Instant probe I had pressed the button on the spark to read the instant temp every 30 seconds for 5 minutes and saw each read in the app and website show up. I came back later to check in home assistant and checked the history and it still showed unavailable during that time range.

Also with the external probe and doing instant reads at the same time frame I see the external probe temp but not the instant probe. Both readings show up on the website.

[2024-04-04T21:31:05Z TRACE fireboard2mqtt::fireboard_watcher] devices fetched successfully: [FireboardApiDevice { id: 231004, uuid: "cf7600a4-906c-4d8c-aff3-xxxxxxxxxxxxx", title: "Spark", hardware_id: "GFDK42JK7", version: "1.4.10", channel_count: 2, degreetype: Fahrenheit, model: "FBXIR", channels: [FireboardDeviceChannel { channel: 1, channel_label: "Instant Probe", last_templog: None }, FireboardDeviceChannel { channel: 2, channel_label: "External Probe", last_templog: Some(FireboardTemps { temp: 85.9 }) }], latest_temps: [FireboardTemps { temp: 85.9 }], device_log: FireboardDeviceLog { date: 2024-04-04T14:26:18-07:00, mac_nic: "xx:xx:xx:xx:xx:xx:xx", onboard_temp: 88.521965, v_batt_per: 0.6815318 } }

fireboard

gordlea commented 6 months ago

Strange, i'll try to take a look this weekend.

gordlea commented 6 months ago

So I think I must be missing some property where the onboard probe is logging temperature, here's the cleaned up version of your last log:

[
  {
    "id": 231004,
    "uuid": "cf7600a4-906c-4d8c-aff3-xxxxxxxxxxxxx",
    "title": "Spark",
    "hardware_id": "GFDK42JK7",
    "version": "1.4.10",
    "channel_count": 2,
    "degreetype": "Fahrenheit",
    "model": "FBXIR",
    "channels": [
      {
        "channel": 1,
        "channel_label": "Instant Probe",
        "last_templog": null
      },
      {
        "channel": 2,
        "channel_label": "External Probe",
        "last_templog": {
          "temp": 85.9
        }
      }
    ],
    "latest_temps": [
      {
        "temp": 85.9
      }
    ],
    "device_log": {
      "date": "2024-04-04T14:26:18-07:00",
      "mac_nic": "xx:xx:xx:xx:xx:xx:xx",
      "onboard_temp": 88.521965,
      "v_batt_per": 0.6815318
    }
  }
]

I wish I had a spark to debug with. I'll release a version with even more verbose logging when I get a chance to get some more data, however I have kind of a busy weekend this weekend, it might be next week sometime.

runjmc commented 6 months ago

Thanks for the help. No worries whenever you have time.

What is the easiest way to clean up the log to make it easier to read like you have it posted?

Ill see if I can do some digging also.

gordlea commented 6 months ago

@runjmc The debug logs are much more detailed now, can you update to 3.1.2 and then take an instant read and send me some of the logs from then?

runjmc commented 6 months ago

Here you go. Let me know if you need more. Seems like you can get the Instant probe info from the session info.

Thanks for looking into this.

[
  {
    "uuid": "xxxxx-xxxx-xxxx-xxx-xxxxxxxxxxxxx",
    "id": 231004,
    "title": "Spark",
    "hardware_id": "GFDK42JK7",
    "created": "2023-12-22T03:33:11.785Z",
    "latest_temps": [],
    "device_log": {
      "versionJava": "7.6.5",
      "version": "1.4.10",
      "syncmode": false,
      "diskUsage": "0.3M/4.0M",
      "contrast": "7",
      "macAP": "xx:xx:xx:xx:xx:xx:xx",
      "commercialMode": "false",
      "cpuUsage": "71%",
      "macNIC": "xx:xx:xx:xx:xx:xx",
      "memUsage": "1.1M/2.2M",
      "drivesettings": "{\"p\":0,\"s\":0,\"d\":0,\"ms\":0,\"f\":0,\"l\":0}",
      "onboardTemp": 89.7670115128003,
      "uptime": "0:00",
      "versionUtils": "6.1.3",
      "bleClientMAC": "xx:xx:xx:xx:xx:xx",
      "versionNode": "5.0.0",
      "vBatt": 4.078546934523542,
      "txpower": 78,
      "linkquality": "84/100",
      "timeZoneBT": "America/Los_Angeles",
      "auxPort": "",
      "showdecimal": false,
      "publicIP": "xx.xx.xx.xx",
      "model": "FBXIR",
      "internalIP": "192.168.22.131",
      "frequency": "2.4 GHz",
      "vBattPerRaw": 0.9881257870426408,
      "versionEspHal": "HAL: V1R2;MSP: 1.0.3;",
      "versionImage": "201703260554",
      "signallevel": -58,
      "vBattPer": 0.9881257870426408,
      "date": "2024-04-06 19:13:22 UTC",
      "ssid": "JayAndNayWifi-2.4G",
      "mode": "Managed",
      "boardID": "GFDK42JK7",
      "deviceID": "cf7600a4-906c-4d8c-xxx-xxxxxxxxx",
      "bleSignalLevel": -114,
      "tempFilter": "true",
      "band": "802.11bgn",
      "nfc_tag_db": {
        "last_updated_max": 0,
        "last_updated_min": 9223372036854776000
      }
    },
    "last_templog": "2024-04-06T20:52:55Z",
    "last_battery_reading": 0.9881257870426408,
    "channels": [
      {
        "id": 33760813,
        "created": "2024-04-06T20:50:30Z",
        "enabled": true,
        "range_min_temp": 73.4,
        "sessionid": 6845735,
        "channel_label": "Instant Probe",
        "alerts": [],
        "channel": 1,
        "range_average_temp": 83.6,
        "range_max_temp": 88.9
      },
      {
        "id": 33760814,
        "created": "2024-04-06T20:50:30Z",
        "enabled": true,
        "sessionid": 6845735,
        "channel_label": "External Probe",
        "alerts": [],
        "channel": 2
      }
    ],
    "fbj_version": "7.6.5",
    "fbn_version": "5.0.0",
    "fbu_version": "6.1.3",
    "version": "1.4.10",
    "probe_config": "8|0|0.0|8|0|0.0",
    "last_drivelog": null,
    "channel_count": 2,
    "degreetype": 2,
    "model": "FBXIR",
    "active": true,
    "auto_session": true
  }
]
gordlea commented 6 months ago

No problem, i'd love to have it working perfectly :smile

latest_temps appears to be empty in that one. When you get a chance, can grab a few more log outputs while using the instant read?

Like maybe one at 30s after you take a reading, then the next 3 logged updates?

runjmc commented 6 months ago

Here is after 30 seconds

[
  {
    "uuid": "cf7600a4-906c-4d8c-aff3-xxxxxxxxxxx",
    "id": 231004,
    "title": "Spark",
    "hardware_id": "GFDK42JK7",
    "created": "2023-12-22T03:33:11.785Z",
    "latest_temps": [],
    "device_log": {
      "txpower": 78,
      "versionJava": "7.6.5",
      "drivesettings": "{\"p\":0,\"s\":0,\"d\":0,\"ms\":0,\"f\":0,\"l\":0}",
      "ssid": "JayAndNayWifi-2.4G",
      "macNIC": "xx:xx:xx:xx:xx",
      "bleClientMAC": "xx:xx:xx:xx",
      "vBattPerRaw": 0.9798841806158475,
      "internalIP": "192.168.22.131",
      "versionImage": "201703260554",
      "syncmode": false,
      "contrast": "7",
      "showdecimal": false,
      "band": "802.11bgn",
      "commercialMode": "false",
      "versionNode": "5.0.0",
      "mode": "Managed",
      "tempFilter": "true",
      "frequency": "2.4 GHz",
      "vBattPer": 0.9798841806158475,
      "signallevel": -61,
      "boardID": "GFDK42JK7",
      "diskUsage": "0.3M/4.0M",
      "model": "FBXIR",
      "version": "1.4.10",
      "uptime": "0:00",
      "vBatt": 4.065030452735408,
      "versionUtils": "6.1.3",
      "memUsage": "1.1M/2.2M",
      "publicIP": "",
      "nfc_tag_db": {
        "last_updated_max": 0,
        "last_updated_min": 9223372036854776000
      },
      "auxPort": "",
      "macAP": "xx:xx:xx:xx:xx:xx",
      "deviceID": "cf7600a4-906c-4d8c-aff3-xxxxxxxxxxxx",
      "bleSignalLevel": -58,
      "date": "2024-04-06 21:19:26 UTC",
      "linkquality": "78/100",
      "cpuUsage": "70%",
      "versionEspHal": "HAL: V1R2;MSP: 1.0.3;",
      "onboardTemp": 78.70620424829406
    },
    "last_templog": "2024-04-06T21:55:27Z",
    "last_battery_reading": 0.9798841806158475,
    "channels": [
      {
        "channel": 1,
        "sessionid": 6846365,
        "enabled": true,
        "id": 33763441,
        "range_average_temp": 91.5,
        "created": "2024-04-06T21:55:31Z",
        "alerts": [],
        "range_max_temp": 91.5,
        "range_min_temp": 91.5,
        "channel_label": "Instant Probe"
      },
      {
        "channel": 2,
        "sessionid": 6846365,
        "enabled": true,
        "id": 33763442,
        "created": "2024-04-06T21:55:31Z",
        "alerts": [],
        "channel_label": "External Probe"
      }
    ],
    "fbj_version": "7.6.5",
    "fbn_version": "5.0.0",
    "fbu_version": "6.1.3",
    "version": "1.4.10",
    "probe_config": "8|0|0.0|8|0|0.0",
    "last_drivelog": null,
    "channel_count": 2,
    "degreetype": 2,
    "model": "FBXIR",
    "active": true,
    "auto_session": true
  }
]

Here are 3 after doing 3 more instant temps

[
  {
    "uuid": "cf7600a4-906c-4d8c-aff3-xxxxxxxxxxxx",
    "id": 231004,
    "title": "Spark",
    "hardware_id": "GFDK42JK7",
    "created": "2023-12-22T03:33:11.785Z",
    "latest_temps": [],
    "device_log": {
      "date": "2024-04-06 21:19:26 UTC",
      "cpuUsage": "70%",
      "commercialMode": "false",
      "bleSignalLevel": -58,
      "showdecimal": false,
      "boardID": "GFDK42JK7",
      "frequency": "2.4 GHz",
      "auxPort": "",
      "versionUtils": "6.1.3",
      "vBatt": 4.065030452735408,
      "signallevel": -61,
      "ssid": "JayAndNayWifi-2.4G",
      "uptime": "0:00",
      "vBattPer": 0.9798841806158475,
      "version": "1.4.10",
      "memUsage": "1.1M/2.2M",
      "onboardTemp": 78.70620424829406,
      "versionImage": "201703260554",
      "linkquality": "78/100",
      "contrast": "7",
      "nfc_tag_db": {
        "last_updated_min": 9223372036854776000,
        "last_updated_max": 0
      },
      "publicIP": "",
      "deviceID": "cf7600a4-906c-4d8c-aff3-xxxxxxx",
      "macNIC": "xx:xx:xx:xx:xx:xx",
      "internalIP": "192.168.22.131",
      "tempFilter": "true",
      "versionEspHal": "HAL: V1R2;MSP: 1.0.3;",
      "versionNode": "5.0.0",
      "macAP": "xx:xx:xx:xx:xx",
      "drivesettings": "{\"p\":0,\"s\":0,\"d\":0,\"ms\":0,\"f\":0,\"l\":0}",
      "band": "802.11bgn",
      "diskUsage": "0.3M/4.0M",
      "bleClientMAC": "xx:xx:xx:xx:xx:xx",
      "model": "FBXIR",
      "versionJava": "7.6.5",
      "syncmode": false,
      "vBattPerRaw": 0.9798841806158475,
      "mode": "Managed",
      "txpower": 78
    },
    "last_templog": "2024-04-06T21:56:48Z",
    "last_battery_reading": 0.9798841806158475,
    "channels": [
      {
        "channel": 1,
        "sessionid": 6846365,
        "range_average_temp": 82.8,
        "alerts": [],
        "range_max_temp": 91.5,
        "range_min_temp": 75.6,
        "id": 33763441,
        "created": "2024-04-06T21:55:31Z",
        "channel_label": "Instant Probe",
        "enabled": true
      },
      {
        "channel": 2,
        "sessionid": 6846365,
        "alerts": [],
        "id": 33763442,
        "created": "2024-04-06T21:55:31Z",
        "channel_label": "External Probe",
        "enabled": true
      }
    ],
    "fbj_version": "7.6.5",
    "fbn_version": "5.0.0",
    "fbu_version": "6.1.3",
    "version": "1.4.10",
    "probe_config": "8|0|0.0|8|0|0.0",
    "last_drivelog": null,
    "channel_count": 2,
    "degreetype": 2,
    "model": "FBXIR",
    "active": true,
    "auto_session": true
  }
]
[
  {
    "uuid": "cf7600a4-906c-4d8c-aff3-xxxxxxxxxxxx",
    "id": 231004,
    "title": "Spark",
    "hardware_id": "GFDK42JK7",
    "created": "2023-12-22T03:33:11.785Z",
    "latest_temps": [],
    "device_log": {
      "diskUsage": "0.3M/4.0M",
      "drivesettings": "{\"p\":0,\"s\":0,\"d\":0,\"ms\":0,\"f\":0,\"l\":0}",
      "date": "2024-04-06 21:19:26 UTC",
      "versionImage": "201703260554",
      "auxPort": "",
      "bleClientMAC": "xx:xx:xx:xx:xx:xx",
      "boardID": "GFDK42JK7",
      "versionUtils": "6.1.3",
      "band": "802.11bgn",
      "bleSignalLevel": -58,
      "memUsage": "1.1M/2.2M",
      "uptime": "0:00",
      "versionNode": "5.0.0",
      "tempFilter": "true",
      "deviceID": "cf7600a4-906c-4d8c-aff3-xxxxxxxxxxxx",
      "publicIP": "",
      "model": "FBXIR",
      "linkquality": "78/100",
      "nfc_tag_db": {
        "last_updated_max": 0,
        "last_updated_min": 9223372036854776000
      },
      "frequency": "2.4 GHz",
      "vBatt": 4.065030452735408,
      "internalIP": "192.168.22.131",
      "vBattPer": 0.9798841806158475,
      "onboardTemp": 78.70620424829406,
      "mode": "Managed",
      "txpower": 78,
      "commercialMode": "false",
      "version": "1.4.10",
      "signallevel": -61,
      "syncmode": false,
      "macAP": "xx:xx:xx:xx:xx:xx",
      "vBattPerRaw": 0.9798841806158475,
      "showdecimal": false,
      "macNIC": "xx:xx:xx:xx:xx:xx",
      "cpuUsage": "70%",
      "ssid": "JayAndNayWifi-2.4G",
      "versionJava": "7.6.5",
      "contrast": "7",
      "versionEspHal": "HAL: V1R2;MSP: 1.0.3;"
    },
    "last_templog": "2024-04-06T21:56:48Z",
    "last_battery_reading": 0.9798841806158475,
    "channels": [
      {
        "sessionid": 6846365,
        "alerts": [],
        "channel_label": "Instant Probe",
        "created": "2024-04-06T21:55:31Z",
        "enabled": true,
        "id": 33763441,
        "range_min_temp": 75.6,
        "channel": 1,
        "range_average_temp": 82.8,
        "range_max_temp": 91.5
      },
      {
        "sessionid": 6846365,
        "alerts": [],
        "channel_label": "External Probe",
        "created": "2024-04-06T21:55:31Z",
        "enabled": true,
        "id": 33763442,
        "channel": 2
      }
    ],
    "fbj_version": "7.6.5",
    "fbn_version": "5.0.0",
    "fbu_version": "6.1.3",
    "version": "1.4.10",
    "probe_config": "8|0|0.0|8|0|0.0",
    "last_drivelog": null,
    "channel_count": 2,
    "degreetype": 2,
    "model": "FBXIR",
    "active": true,
    "auto_session": true
  }
]
[
  {
    "uuid": "cf7600a4-906c-4d8c-aff3-xxxxxxxxxxxx",
    "id": 231004,
    "title": "Spark",
    "hardware_id": "GFDK42JK7",
    "created": "2023-12-22T03:33:11.785Z",
    "latest_temps": [],
    "device_log": {
      "tempFilter": "true",
      "syncmode": false,
      "vBatt": 4.065030452735408,
      "versionNode": "5.0.0",
      "showdecimal": false,
      "bleSignalLevel": -58,
      "publicIP": "",
      "date": "2024-04-06 21:19:26 UTC",
      "version": "1.4.10",
      "vBattPer": 0.9798841806158475,
      "uptime": "0:00",
      "diskUsage": "0.3M/4.0M",
      "ssid": "JayAndNayWifi-2.4G",
      "frequency": "2.4 GHz",
      "macAP": "xx:xx:xx:xx:xx:xx",
      "auxPort": "",
      "internalIP": "192.168.22.131",
      "commercialMode": "false",
      "versionJava": "7.6.5",
      "signallevel": -61,
      "macNIC": "xx:xx:xx:xx:xx:xx",
      "nfc_tag_db": {
        "last_updated_min": 9223372036854776000,
        "last_updated_max": 0
      },
      "memUsage": "1.1M/2.2M",
      "onboardTemp": 78.70620424829406,
      "band": "802.11bgn",
      "versionUtils": "6.1.3",
      "deviceID": "cf7600a4-906c-4d8c-aff3-c35095e16eb5",
      "mode": "Managed",
      "txpower": 78,
      "contrast": "7",
      "drivesettings": "{\"p\":0,\"s\":0,\"d\":0,\"ms\":0,\"f\":0,\"l\":0}",
      "cpuUsage": "70%",
      "versionEspHal": "HAL: V1R2;MSP: 1.0.3;",
      "linkquality": "78/100",
      "bleClientMAC": "xx:xx:xx:xx:xx:xx",
      "model": "FBXIR",
      "versionImage": "201703260554",
      "boardID": "GFDK42JK7",
      "vBattPerRaw": 0.9798841806158475
    },
    "last_templog": "2024-04-06T21:56:48Z",
    "last_battery_reading": 0.9798841806158475,
    "channels": [
      {
        "range_min_temp": 75.6,
        "enabled": true,
        "channel": 1,
        "created": "2024-04-06T21:55:31Z",
        "sessionid": 6846365,
        "id": 33763441,
        "channel_label": "Instant Probe",
        "range_average_temp": 82.8,
        "range_max_temp": 91.5,
        "alerts": []
      },
      {
        "enabled": true,
        "channel": 2,
        "created": "2024-04-06T21:55:31Z",
        "sessionid": 6846365,
        "id": 33763442,
        "channel_label": "External Probe",
        "alerts": []
      }
    ],
    "fbj_version": "7.6.5",
    "fbn_version": "5.0.0",
    "fbu_version": "6.1.3",
    "version": "1.4.10",
    "probe_config": "8|0|0.0|8|0|0.0",
    "last_drivelog": null,
    "channel_count": 2,
    "degreetype": 2,
    "model": "FBXIR",
    "active": true,
    "auto_session": true
  }
]

Here is a log after hooking up the external probe. The latest temp gets filled out.

[
  {
    "uuid": "cf7600a4-906c-4d8c-aff3-xxxxxxxxxxx",
    "id": 231004,
    "title": "Spark",
    "hardware_id": "GFDK42JK7",
    "created": "2023-12-22T03:33:11.785Z",
    "latest_temps": [
      {
        "temp": 77.5,
        "degreetype": 2,
        "created": "2024-04-06T22:04:29Z",
        "channel": 2
      }
    ],
    "device_log": {
      "nfc_tag_db": {
        "last_updated_min": 9223372036854776000,
        "last_updated_max": 0
      },
      "txpower": 78,
      "showdecimal": false,
      "syncmode": false,
      "timeZoneBT": "America/Los_Angeles",
      "memUsage": "1.1M/2.2M",
      "onboardTemp": 90.6381996213262,
      "versionUtils": "6.1.3",
      "bleClientMAC": "xx:xx:xx:xx:xx",
      "publicIP": "",
      "mode": "Managed",
      "linkquality": "72/100",
      "vBattPerRaw": 0.9861266634901156,
      "bleSignalLevel": -65,
      "versionNode": "5.0.0",
      "macAP": "xx:xx:xx:xx:xx:xx",
      "signallevel": -64,
      "boardID": "GFDK42JK7",
      "vBattPer": 0.9861266634901156,
      "auxPort": "",
      "versionImage": "201703260554",
      "model": "FBXIR",
      "versionJava": "7.6.5",
      "diskUsage": "0.3M/4.0M",
      "deviceID": "cf7600a4-906c-4d8c-aff3-xxxxxxxxxxxx",
      "commercialMode": "false",
      "uptime": "0:05",
      "ssid": "JayAndNayWifi-2.4G",
      "tempFilter": "true",
      "vBatt": 4.075268311923694,
      "frequency": "2.4 GHz",
      "drivesettings": "{\"p\":0,\"s\":0,\"d\":0,\"ms\":0,\"f\":0,\"l\":0}",
      "contrast": "7",
      "version": "1.4.10",
      "internalIP": "192.168.22.131",
      "cpuUsage": "25%",
      "versionEspHal": "HAL: V1R2;MSP: 1.0.3;",
      "macNIC": "xxx:xx:xx:xx:xx:xx:",
      "band": "802.11bgn",
      "date": "2024-04-06 22:00:22 UTC"
    },
    "last_templog": "2024-04-06T22:04:00Z",
    "last_battery_reading": 0.9861266634901156,
    "channels": [
      {
        "sessionid": 6846365,
        "alerts": [],
        "id": 33763441,
        "range_average_temp": 82.8,
        "range_min_temp": 75.6,
        "created": "2024-04-06T21:55:31Z",
        "channel_label": "Instant Probe",
        "range_max_temp": 91.5,
        "enabled": true,
        "channel": 1
      },
      {
        "sessionid": 6846365,
        "range_average_temp": 80.3,
        "created": "2024-04-06T21:55:31Z",
        "enabled": true,
        "alerts": [],
        "id": 33763442,
        "range_min_temp": 80.3,
        "last_templog": {
          "temp": 77.5,
          "degreetype": 2,
          "created": "2024-04-06T22:04:29Z",
          "channel": 2
        },
        "channel_label": "External Probe",
        "range_max_temp": 80.3,
        "current_temp": 77.5,
        "channel": 2
      }
    ],
    "fbj_version": "7.6.5",
    "fbn_version": "5.0.0",
    "fbu_version": "6.1.3",
    "version": "1.4.10",
    "probe_config": "8|0|0.0|8|0|0.0",
    "last_drivelog": null,
    "channel_count": 2,
    "degreetype": 2,
    "model": "FBXIR",
    "active": true,
    "auto_session": true
  }
]
gordlea commented 6 months ago

Awesome, thank you, i will take a look tomorrow

gordlea commented 6 months ago

So here are the first 4 readings with only relevant fields:

after 30s

{
    "last_templog": "2024-04-06T21:55:27Z",
    "channels": [{
        "channel": 1,
        "channel_label": "Instant Probe",
        "created": "2024-04-06T21:55:31Z",
        "enabled": true,
        "range_average_temp": 91.5,
        "range_max_temp": 91.5,
        "range_min_temp": 91.5
    }]
}

Here are 3 after doing 3 more instant temps

{
    "last_templog": "2024-04-06T21:56:48Z",    "channels": [{
        "channel": 1,
        "channel_label": "Instant Probe",
        "created": "2024-04-06T21:55:31Z",
        "enabled": true,
        "range_average_temp": 82.8,
        "range_max_temp": 91.5,
        "range_min_temp": 75.6
    }]
}
{
    "last_templog": "2024-04-06T21:56:48Z",
    "channels": [{
        "channel": 1,
        "channel_label": "Instant Probe",
        "created": "2024-04-06T21:55:31Z",
        "enabled": true,
        "range_average_temp": 82.8,
        "range_max_temp": 91.5,
        "range_min_temp": 75.6
    }]
}
{
    "last_templog": "2024-04-06T21:56:48Z",
    "channels": [{
        "channel": 1,
        "channel_label": "Instant Probe",
        "created": "2024-04-06T21:55:31Z",
        "enabled": true,
        "range_average_temp": 82.8,
        "range_max_temp": 91.5,
        "range_min_temp": 75.6
    }]
}

We have range_average_temp, range_max_temp and range_min_temp, but I think that basically after the first reading, there's not a way to get the actual temperature.

It may be we need to use the realtime temperature endpoint, but I was hoping to avoid that, since it will require more api calls and means that the polling speed will slow down. 😞

I wish I could talk to one of the fireboard api developers. It'd be really nice if they could up the rate limiting on the api.

When I get a chance, I will try putting in some code for the spark that will try the realtime temperature api.

gordlea commented 6 months ago

FYI I sent an email to info@fireboard.com asking if this was a bug, hopefully they get back to me.

runjmc commented 6 months ago

Sounds good.. Thanks for looking into this 👍

gordlea commented 6 months ago

So I got a reply from the fireboard devs, they have pushed up some changes to the api that might address this.

One thing to note:

One thing to keep in mind, by default the only temperature readings we retain are the ones collected via the auto-hold mechanism or when you press the button on the Spark. If you wish to retain all temperature values, you can enable "Save Temps: ALL" in the settings menu... just wanted to throw that out there.

Do you mind giving it another try and we can see what happens?

runjmc commented 6 months ago

That actually seems to work.

I changed it to Save Temps: ALL from Auto. The data looks to be showing up in homeassistant

 "last_templog": "2024-04-11T23:46:32Z",
    "last_battery_reading": 0.911147594361532,
    "channels": [
      {
        "enabled": true,
        "alerts": [],
        "id": 33866831,
        "created": "2024-04-11T23:46:32Z",
        "range_max_temp": 75,
        "range_min_temp": 75,
        "range_average_temp": 75,
        "channel_label": "Instant Probe",
        "sessionid": 6869597,
        "current_temp": 75,
        "last_templog": {
          "created": "2024-04-11T23:46:32Z",
          "channel": 1,
          "temp": 75,
          "degreetype": 2
        },
"last_templog": "2024-04-11T23:47:32Z",
    "last_battery_reading": 0.911147594361532,
    "channels": [
      {
        "sessionid": 6869597,
        "created": "2024-04-11T23:46:32Z",
        "last_templog": {
          "degreetype": 2,
          "channel": 1,
          "created": "2024-04-11T23:47:32Z",
          "temp": 92.5
        },
        "range_max_temp": 92.5,
        "alerts": [],
        "id": 33866831,
        "current_temp": 92.5,
        "channel_label": "Instant Probe",
        "channel": 1,
        "enabled": true,
        "range_min_temp": 75,
        "range_average_temp": 83.8
  "last_templog": "2024-04-11T23:48:32Z",
    "last_battery_reading": 0.911147594361532,
    "channels": [
      {
        "id": 33866831,
        "alerts": [],
        "channel": 1,
        "range_average_temp": 82.8,
        "created": "2024-04-11T23:46:32Z",
        "sessionid": 6869597,
        "last_templog": {
          "degreetype": 2,
          "channel": 1,
          "temp": 80.9,
          "created": "2024-04-11T23:48:32Z"
        },
        "current_temp": 80.9,
        "range_max_temp": 92.5,
        "channel_label": "Instant Probe",
        "range_min_temp": 75,
        "enabled": true
gordlea commented 6 months ago

Does it still work when you press the button when it's set on auto?

runjmc commented 6 months ago

With the button I see it update in home assistant within a few seconds. if I do nothing I see it update every minute or so.

gordlea commented 6 months ago

Okay great, sounds like it's working now?

runjmc commented 6 months ago

Yeah it looks good.. Thanks for all the help.

gordlea commented 6 months ago

Awesome, no problem!