donavanbecker / homebridge-meater

The Homebridge Meater plugin allows you to access your Meater Device(s) from HomeKit with Homebridge.
https://meater.com
ISC License
5 stars 0 forks source link

Bug: Invalid Character Value for Ambient Temp #13

Open coryduclos opened 1 month ago

coryduclos commented 1 month ago

Describe the Bug

The ambient temperature only shows at a maximum of 100c in Homebridge and using the native ios home app even though the device is sending a higher temperature. This error is given:

[8/4/2024, 8:28:07 PM] [homebridge-meater] This plugin generated a warning from the characteristic 'Current Temperature': characteristic was supplied illegal value: number 192.60000000000002 exceeded maximum of 100. See https://homebridge.io/w/JtMGR for more info. [8/4/2024, 8:28:07 PM] [homebridge-meater] Error: at CurrentTemperature.Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:3016:105) at CurrentTemperature.Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2932:14) at CurrentTemperature.Characteristic.updateValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2333:20) at TemperatureSensor.Service.updateCharacteristic (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Service.ts:804:35) at Meater.updateHomeKitCharacteristics (file:///usr/local/lib/node_modules/homebridge-meater/src/device/meater.ts:219:29) at new Meater (file:///usr/local/lib/node_modules/homebridge-meater/src/device/meater.ts:137:10) at MeaterPlatform.createMeter (file:///usr/local/lib/node_modules/homebridge-meater/src/platform.ts:271:9) at processTicksAndRejections (node:internal/process/task_queues:95:5) at MeaterPlatform.configureDevices (file:///usr/local/lib/node_modules/homebridge-meater/src/platform.ts:231:9) at MeaterPlatform.discoverDevices (file:///usr/local/lib/node_modules/homebridge-meater/src/platform.ts:167:11) [8/4/2024, 8:28:07 PM] [Meater] Meater Thermometer (4788) updateCharacteristic Ambient Current Temperature: 192.6 [8/4/2024, 8:28:07 PM] [Meater] Meater Thermometer (4788) updateCharacteristic Cook Refresh Switch: true [8/4/2024, 8:28:07 PM] [Meater] uuid: 4788376e275d31b075321173121ae5aecde0ae1b36ed544384f665d8da654b94, (b1eef5b2-69b9-4173-9a10-194275cdd6c3) [8/4/2024, 8:28:07 PM] [Meater] Refreshing Meater Thermometer (4788) Status... Cooking: Off [8/4/2024, 8:28:07 PM] [Meater] Cook Refresh is off for Meater Thermometer (4788)

To Reproduce

Installed plugin for Meater and tested on thermometer while cooking.

Expected Behavior

Temperature would reflect actual temperature sent by device.

Relevant Log Output

Setup Payload:
X-HM://00242PCVYEIWP
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

    ┌────────────┐     
    │ 365-68-958 │     
    └────────────┘     

[8/4/2024, 8:28:06 PM] Homebridge v1.8.4 (HAP v0.12.2) (Homebridge 65BC) is running on port 51944.
[8/4/2024, 8:28:06 PM] 

NOTICE TO USERS AND PLUGIN DEVELOPERS
> Homebridge 2.0 is on the way and brings some breaking changes to existing plugins.
> Please visit the following link to learn more about the changes and how to prepare:
> https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2.0

[8/4/2024, 8:28:07 PM] [Meater] Launched child bridge with PID 27260
[8/4/2024, 8:28:07 PM] Registering platform 'homebridge-meater.Meater'
[8/4/2024, 8:28:07 PM] [Meater] Loaded homebridge-meater v1.1.1 child bridge successfully
[8/4/2024, 8:28:07 PM] Loaded 1 cached accessories from cachedAccessories.0ECF91C69ACC.
[8/4/2024, 8:28:07 PM] [Meater] [DEBUG] Using debugMode Logging
[8/4/2024, 8:28:07 PM] [Meater] Finished initializing platform: Meater
[8/4/2024, 8:28:07 PM] [Meater] Loading accessory from cache: Meater Thermometer (4788)
[8/4/2024, 8:28:07 PM] Publishing bridge accessory (name: Meater, publishInfo: {
  username: '0E:CF:91:C6:9A:CC',
  port: 31447,
  pincode: '***-**-***',
  category: 2,
  bind: undefined,
  mdns: undefined,
  addIdentifyingMaterial: true,
  advertiser: 'bonjour-hap'
}).
[8/4/2024, 8:28:07 PM] [Meater] Executed didFinishLaunching callback
[8/4/2024, 8:28:07 PM] [Meater] Config OK
[8/4/2024, 8:28:07 PM] Homebridge v1.8.4 (HAP v0.12.2) (Meater) is running on port 31447.
[8/4/2024, 8:28:07 PM] 

NOTICE TO USERS AND PLUGIN DEVELOPERS
> Homebridge 2.0 is on the way and brings some breaking changes to existing plugins.
> Please visit the following link to learn more about the changes and how to prepare:
> https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2.0

[8/4/2024, 8:28:07 PM] [Meater] Device statusCode: 200
[8/4/2024, 8:28:07 PM] [Meater] Device: {"status":"OK","statusCode":200,"data":{"devices":[{"id":"4788376e275d31b075321173121ae5aecde0ae1b36ed544384f665d8da654b94","temperature":{"internal":98.5,"ambient":212},"cook":{"id":"55e812d9b5b5e375af0372b4267a4cfa496a93d4c0901aa76870f665ceef336e","name":"Other","state":"Ready For Resting","temperature":{"target":98.4,"peak":98.5},"time":{"elapsed":14796,"remaining":701}},"updated_at":1722817674}]},"meta":{}}
[8/4/2024, 8:28:07 PM] [Meater] Device StatusCode: 200
[8/4/2024, 8:28:07 PM] [Meater] Found 1 Devices
[8/4/2024, 8:28:07 PM] [Meater] No Meater Device Config: undefined
[8/4/2024, 8:28:07 PM] [Meater] Plugin Version: 1.1.1
[8/4/2024, 8:28:07 PM] [Meater] Restoring existing accessory from cache: Meater Thermometer (4788) DeviceID: 4788376e275d31b075321173121ae5aecde0ae1b36ed544384f665d8da654b94
[8/4/2024, 8:28:07 PM] [Meater] [DEBUG] Lock: Meater Thermometer (4788) Using Debug Mode Logging: debugMode
[8/4/2024, 8:28:07 PM] [Meater] Configure serviceLabel Service
[8/4/2024, 8:28:07 PM] [Meater] Configure InternalTemperature Service
[8/4/2024, 8:28:07 PM] [Meater] Configure AmbientTemperature Service
[8/4/2024, 8:28:07 PM] [homebridge-meater] This plugin generated a warning from the characteristic 'Current Temperature': characteristic was supplied illegal value: number 192.60000000000002 exceeded maximum of 100. See https://homebridge.io/w/JtMGR for more info.
[8/4/2024, 8:28:07 PM] [homebridge-meater] Error: 
    at CurrentTemperature.Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:3016:105)
    at CurrentTemperature.Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2932:14)
    at CurrentTemperature.Characteristic.setValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2234:20)
    at TemperatureSensor.Service.setCharacteristic (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Service.ts:767:35)
    at new Meater (file:///usr/local/lib/node_modules/homebridge-meater/src/device/meater.ts:113:8)
    at MeaterPlatform.createMeter (file:///usr/local/lib/node_modules/homebridge-meater/src/platform.ts:271:9)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at MeaterPlatform.configureDevices (file:///usr/local/lib/node_modules/homebridge-meater/src/platform.ts:231:9)
    at MeaterPlatform.discoverDevices (file:///usr/local/lib/node_modules/homebridge-meater/src/platform.ts:167:11)
    at HomebridgeAPI.<anonymous> (file:///usr/local/lib/node_modules/homebridge-meater/src/platform.ts:72:9)
[8/4/2024, 8:28:07 PM] [Meater] Configure cookRefresh Service
[8/4/2024, 8:28:07 PM] [Meater] Meater Thermometer (4788) updateCharacteristic Internal Current Temperature: 50.9
[8/4/2024, 8:28:07 PM] [homebridge-meater] This plugin generated a warning from the characteristic 'Current Temperature': characteristic was supplied illegal value: number 192.60000000000002 exceeded maximum of 100. See https://homebridge.io/w/JtMGR for more info.
[8/4/2024, 8:28:07 PM] [homebridge-meater] Error: 
    at CurrentTemperature.Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:3016:105)
    at CurrentTemperature.Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2932:14)
    at CurrentTemperature.Characteristic.updateValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2333:20)
    at TemperatureSensor.Service.updateCharacteristic (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Service.ts:804:35)
    at Meater.updateHomeKitCharacteristics (file:///usr/local/lib/node_modules/homebridge-meater/src/device/meater.ts:219:29)
    at new Meater (file:///usr/local/lib/node_modules/homebridge-meater/src/device/meater.ts:137:10)
    at MeaterPlatform.createMeter (file:///usr/local/lib/node_modules/homebridge-meater/src/platform.ts:271:9)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at MeaterPlatform.configureDevices (file:///usr/local/lib/node_modules/homebridge-meater/src/platform.ts:231:9)
    at MeaterPlatform.discoverDevices (file:///usr/local/lib/node_modules/homebridge-meater/src/platform.ts:167:11)
[8/4/2024, 8:28:07 PM] [Meater] Meater Thermometer (4788) updateCharacteristic Ambient Current Temperature: 192.6
[8/4/2024, 8:28:07 PM] [Meater] Meater Thermometer (4788) updateCharacteristic Cook Refresh Switch: true
[8/4/2024, 8:28:07 PM] [Meater] uuid: 4788376e275d31b075321173121ae5aecde0ae1b36ed544384f665d8da654b94, (b1eef5b2-69b9-4173-9a10-194275cdd6c3)
[8/4/2024, 8:28:07 PM] [Meater] Refreshing Meater Thermometer (4788) Status... Cooking: Off
[8/4/2024, 8:28:07 PM] [Meater] Cook Refresh is off for Meater Thermometer (4788)

Config for homebridge-meater

{
    "bridge": {
        "name": "xxx",
        "username": "xxx",
        "port": 51944,
        "pin": "365-68-958",
        "advertiser": "bonjour-hap"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        },
        {
            "name": "Meater",
            "credentials": {
                "email": "xxx.com",
                "password": "xxx",
                "token": xxx
                "notice": "Keep your tokens a secret!"
            },
            "platform": "Meater",
            "_bridge": {
                "username": "xxx",
                "port": 31447
            }
        }
    ]
}

Screenshots

No response

Device and Model

Meater 2 plus/Macbook/Iphone

Node.js Version

latest

Homebridge Version

latest

Homebridge Meater Plugin Version

lastest (not beta)

Homebridge UI Version

Lastest

Operating System

macOS