question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: SwitchBot Meter not parsing Temperature

See original GitHub issue

Describe The Bug

SwitchBot Meter not parsing Temperature but is able to parse Humidity

To Reproduce

Add Meter config and enable

Expected behavior

Be able to parse both Temperature and Humidity values. Be able to display values.

Relevant log output

Switchbot BridgeSwitchBot[DEBUG] SwitchBot Meter BatteryLevel: 100, StatusLowBattery: 0
2/11/2022, 9:05:37 amSwitchbot BridgeSwitchBot[DEBUG] Meter: SwitchBot Meter Humidity: 65%
2/11/2022, 9:05:37 amSwitchbot BridgeSwitchBot[DEBUG] Meter: SwitchBot Meter Temperature: [object Object]°c
2/11/2022, 9:05:37 amSwitchbot BridgeSwitchBot[DEBUG] Meter: SwitchBot Meter updateCharacteristic CurrentRelativeHumidity: 65
2/11/2022, 9:05:37 amSwitchbot BridgeSwitchBot[DEBUG] Meter: SwitchBot Meter updateCharacteristic CurrentTemperature: [object Object]
2/11/2022, 9:05:37 amSwitchbot BridgeSwitchBot[DEBUG] Meter: SwitchBot Meter updateCharacteristic BatteryLevel: 100
2/11/2022, 9:05:37 amSwitchbot BridgeSwitchBot[DEBUG] Meter: SwitchBot Meter updateCharacteristic StatusLowBattery: 0
2/11/2022, 9:05:37 amSwitchbot BridgeERROR[Switchbot Bridge 7F57@Switch Meter 2F@@Current Temperature] characteristic value expected valid finite number and received "[object Object]" (object)

Config for homebridge-switchbot

{
    "platform": "SwitchBot",
    "name": "SwitchBot",
    "credentials": {
        "notice": "Keep your token a secret!",
        "openToken": "<blah>",
        "token": "<blah>",
        "secret": "<blah>"
    },
    "options": {
        "devices": [
            {
                "configDeviceName": "SwitchBot Meter",
                "configDeviceType": "Meter",
                "connectionType": "BLE",
                "scanDuration": 300,
                "bot": {
                    "deviceType": "fan",
                    "allowPush": true
                },
                "deviceId": "<blah>",
                "lock": {
                    "hide_contactsensor": false
                },
                "external": false,
                "meter": {
                    "hide_temperature": false
                }
            }
        ],
        "logging": "standard"
    }
}

Screenshots

No response

Device & Model

SwitchBot Meter (Firmware v2.6)

Node.js Version

16.17.0

NPM Version

8.15.0

Homebridge Version

1.5

Homebridge Switchbot Plugin Version

2.2.2

Homebridge Config UI X Plugin Version

No response

Operating System

Raspbian GNU/Linux 11 (bullseye)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:21

github_iconTop GitHub Comments

1reaction
lukeskywlkrcommented, Nov 11, 2022

Hi everyone I have the same problem. It seems that the temperature field is an object that contains both Celsius and Fahrenheit values as you can see from this log extract:

[11/11/2022, 18:42:39] [SwitchBot] [DEBUG] Meter: Temp&Hum model: T, modelName: WoSensorTH, temperature: 21.6, humidity: 55, battery: 100
[11/11/2022, 18:42:39] [SwitchBot] [DEBUG] Meter: Temp&Hum connected: true
[11/11/2022, 18:42:39] [SwitchBot] [DEBUG] Meter: Temp&Hum BLEparseStatus
[11/11/2022, 18:42:39] [SwitchBot] [DEBUG] Temp&Hum BatteryLevel: 100, StatusLowBattery: 0
[11/11/2022, 18:42:39] [SwitchBot] [DEBUG] Meter: Temp&Hum Humidity: 55%
[11/11/2022, 18:42:39] [SwitchBot] [DEBUG] Meter: Temp&Hum Temperature: [object Object]°c
[11/11/2022, 18:42:39] [SwitchBot] [DEBUG] Meter: Temp&Hum updateCharacteristic CurrentRelativeHumidity: 55
[11/11/2022, 18:42:39] [@switchbot/homebridge-switchbot] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "[object Object]" (object). See https://homebridge.io/w/JtMGR for more info.
0reactions
henrulincommented, Dec 8, 2022

Yay thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

SwitchBot Meter gives a wrong temperature/themo data or ...
SwitchBot Meter gives a wrong temperature/themo data or false read. ... 1. Please make sure that you have the latest version of the...
Read more >
Problem with Android App when graphing the temperature ...
The data displayed by Meter in the app chart requires the app to actively request data from the device and is not updated...
Read more >
Bug: SwitchBots Not Triggering in Home App #173 - GitHub
Install SwitchBot Plugin, Configure Token, Try to execute SwitchBots in Home app - failes. Expected behavior. Should trigger SwitchBots in Home ...
Read more >
SwitchBot Meter Temperature & Humidity (Thermometer ...
The SwitchBot integration for Home Assistant does not support SwitchBot Meter Temperature & Humidity Sensors.
Read more >
SwitchBot Meter - Review - YouTube
More info: https://www. switch-bot.com/products/ switchbot -meterTwitter: https://www.twitter.com/imsammyttvFacebook: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found