merdok / homebridge-miot

Homebridge plugin for devices supporting the Xiaomi miot protocol
MIT License
364 stars 62 forks source link

Sensors not pulling the readings #574

Closed tst-pandit-pan closed 2 months ago

tst-pandit-pan commented 4 months ago

Describe the bug Sensors include isa.magnet.dw2hl door sensor and miaomiaoce.sensor_ht.t2 temperature sensor. I shut down my Synology NAS during the 2 week traveling and power it up again, these CN region sensors stopped getting the readings and display nothing. The gateway umi.gateway.mgl03 is working fine, controllable in Home app.

The Air Purifier in US region works fine and everything works, that is the only device in US region, all sensors in CN region not seemed to work.

Expected behavior It should display the readings.

Your config.json { "devices": [ { "name": "Living Room Gateway", "ip": "192.168.86.99", "token": "TOKEN", "deviceId": "463297727", "model": "lumi.gateway.mgl03", "pollingInterval": 10, "deepDebugLog": false, "micloud": { "username": "MY USERNAME", "password": "MY PASSCODE", "country": "cn" }, "buzzerControl": false, "ledControl": false, "childLockControl": false, "modeControl": false }, { "name": "Entrance Door", "ip": "192.168.86.99", "token": "TOKEN", "deviceId": "blt.3.196n3if7ce400", "model": "isa.magnet.dw2hl", "pollingInterval": 2, "deepDebugLog": false, "micloud": { "username": "MY USERNAME", "password": "MY PASSCODE", "country": "cn", "forceMiCloud": false }, "buzzerControl": true, "ledControl": true, "childLockControl": true, "modeControl": true }, { "name": "Balcony Temp Hum", "ip": "192.168.86.99", "token": "TOKEN", "deviceId": "blt.3.196n30qq8e800", "model": "miaomiaoce.sensor_ht.t2", "pollingInterval": 300, "deepDebugLog": false, "micloud": { "username": "MY USERNAME", "password": "MY PASSCODE", "country": "cn", "forceMiCloud": false }, "buzzerControl": true, "ledControl": true, "childLockControl": true, "modeControl": true }, { "name": "Bathroom Temp Hum", "ip": "192.168.86.99", "token": "TOKEN", "deviceId": "blt.3.196n22tg0lg00", "model": "miaomiaoce.sensor_ht.t2", "pollingInterval": 300, "deepDebugLog": false, "micloud": { "username": "MY USERNAME", "password": "MY PASSCODE", "country": "cn", "forceMiCloud": false }, "buzzerControl": true, "ledControl": true, "childLockControl": true, "modeControl": true }, { "name": "Living Room Temp Hum", "ip": "192.168.86.99", "token": "TOKEN", "deviceId": "blt.3.1am0pkeoglo00", "model": "miaomiaoce.sensor_ht.t2", "pollingInterval": 300, "deepDebugLog": false, "micloud": { "username": "MY USERNAME", "password": "MY PASSCODE", "country": "cn", "forceMiCloud": false }, "buzzerControl": true, "ledControl": true, "childLockControl": true, "modeControl": true }, { "name": "Living Room Door", "ip": "192.168.86.99", "token": "TOKEN", "deviceId": "blt.3.1ehce3ldk4k00", "model": "isa.magnet.dw2hl", "pollingInterval": 10, "deepDebugLog": false, "micloud": { "username": "MY USERNAME", "password": "MY PASSCODE", "country": "cn", "forceMiCloud": false }, "buzzerControl": true, "ledControl": true, "childLockControl": true, "modeControl": true }, { "name": "Air Purifier", "ip": "192.168.86.191", "token": "TOKEN", "deviceId": "127089388", "model": "zhimi.airpurifier.mb3", "pollingInterval": 10, "deepDebugLog": false, "micloud": { "username": "MY USERNAME", "password": "MY PASSCODE", "country": "us" }, "buzzerControl": false, "ledControl": false, "childLockControl": false, "modeControl": true, "fanLevelControl": false, "screenControl": false } ], "platform": "miot" } Debug log [2/18/2024, 8:29:47 PM] [miot] [Living Room Temp Hum] Initializing device services [2/18/2024, 8:29:47 PM] [miot] [Living Room Temp Hum] Device services: [ "temperature-humidity-sensor", "battery" ] [2/18/2024, 8:29:47 PM] [miot] [Living Room Temp Hum] Initializing device properties [2/18/2024, 8:29:47 PM] [miot] [Living Room Temp Hum] Device properties: [ "temperature-humidity-sensor:temperature", "temperature-humidity-sensor:relative-humidity", "battery:battery-level" ] [2/18/2024, 8:29:47 PM] [miot] [Living Room Temp Hum] Initializing device actions [2/18/2024, 8:29:47 PM] [miot] [Living Room Temp Hum] Successfully created a TemperatureHumiditySensor device! It is a Unknown temperature humidity sensor device. [2/18/2024, 8:29:47 PM] [miot] [Living Room Temp Hum] Initializing accessory! [2/18/2024, 8:29:47 PM] [miot] [Living Room Temp Hum] Accessory successfully initialized! [2/18/2024, 8:29:47 PM] [miot] [Living Room Temp Hum] Registering 1 accessories! [2/18/2024, 8:29:47 PM] [miot] [Living Room Temp Hum] Everything looks good! Initiating property polling! Screenshots

Screenshot 2024-02-18 at 8 37 10 PM

Additional context I guess there is something related to one account different regions? I am not sure if one Xiaomi account can use 2 regions at the same time or not. But I have been using this for 3 weeks and no problem happened but after 2 weeks of powering off Homebridge.

merdok commented 4 months ago

It should work fine with different regions. If the setup was working like that before then I guess the hub which you are using stopped reporting the values to the cloud. You would need to verify that.

tst-pandit-pan commented 4 months ago

As you see from the screenshots on my iPhone, I disabled Bluetooth and WiFi so the data should be from the cloud. But you see there the data is there and everything is on Xiaomi's server. Very much appreciate your attention.

imageimageimage

merdok commented 4 months ago

Then I guess you would need to use the cli tools to access the properties directly from the device using the terminal m, that way we can if the correct values are reported.

tst-pandit-pan commented 4 months ago

I see your point, how can I do that? Very much appreciated for your response.

merdok commented 4 months ago

Please check the README, there are example commands.