merdok / homebridge-miot

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

Support for Qingping Air Monitor #496

Closed matt1aw closed 10 months ago

matt1aw commented 12 months ago

image

Device model cgllc.airmonitor.s1

Device name Qingping Air Monitor

Does the device require a MiCloud connection? Do not know

Anything special about the device? Does it already work with the plugin with a limited scope (can be controlled using the auto created switch)? No, though Air Quality Sensor, Carbon Dioxide Sensor, Temperature Sensor, Humidity Sensor & Battery Service accessories are generated, the readings or status seems to be wrong or show as 0 or 1

Homebridge Log


[13/07/2023, 16:15:52] [miot] Initializing devices
[13/07/2023, 16:15:52] [miot] [空氣檢測儀MIOT] Got device configuration, initializing device with name: 空氣檢測儀MIOT
[13/07/2023, 16:15:53] [miot] [空氣檢測儀MIOT] Model known: cgllc.airmonitor.s1!
[13/07/2023, 16:15:53] [miot] [空氣檢測儀MIOT] Initializing device!
[13/07/2023, 16:15:54] [miot] [空氣檢測儀MIOT] Using module class for device type AirMonitor, indentified by miot spec! Not all features might work!
[13/07/2023, 16:15:54] [miot] [空氣檢測儀MIOT] Initializing device services
[13/07/2023, 16:15:54] [miot] [空氣檢測儀MIOT] Device services: [
  "environment",
  "battery"
]
[13/07/2023, 16:15:54] [miot] [空氣檢測儀MIOT] Initializing device properties
[13/07/2023, 16:15:54] [miot] [空氣檢測儀MIOT] Device properties: [
  "environment:relative-humidity",
  "environment:pm2.5-density",
  "environment:temperature",
  "environment:co2-density",
  "environment:tvoc-density",
  "battery:battery-level",
  "battery:charging-state"
]
[13/07/2023, 16:15:54] [miot] [空氣檢測儀MIOT] Initializing device actions
[13/07/2023, 16:15:54] [miot] [空氣檢測儀MIOT] Successfully created a AirMonitor device! It is a Unknown air monitor device.
[13/07/2023, 16:15:54] [miot] [空氣檢測儀MIOT] Initializing accessory!
[13/07/2023, 16:15:54] [miot] [空氣檢測儀MIOT] Accessory successfully initialized!
[13/07/2023, 16:15:54] [miot] [空氣檢測儀MIOT] Registering 1 accessories!
[13/07/2023, 16:15:54] [miot] [空氣檢測儀MIOT] Everything looks good! Initiating property polling!
[13/07/2023, 16:15:54] [miot] [空氣檢測儀MIOT] Device found! Setting up miot device from local connection!
[13/07/2023, 16:15:54] [miot] [空氣檢測儀MIOT] Connected to device: cgllc.airmonitor.s1
[13/07/2023, 16:15:54] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:15:54] [miot] [空氣檢測儀MIOT] Doing initial property fetch.
[13/07/2023, 16:15:55] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:15:55] [miot] [空氣檢測儀MIOT] Starting property polling.
[13/07/2023, 16:16:06] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:16:16] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:16:26] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:16:36] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:16:46] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:16:56] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:17:06] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:17:16] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:17:26] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:17:36] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:17:45] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:17:46] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:17:46] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:17:48] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:17:52] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:17:56] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:18:06] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:18:16] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:18:26] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:18:36] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:18:42] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:18:43] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:18:46] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.
[13/07/2023, 16:18:46] [homebridge-miot] This plugin generated a warning from the characteristic 'VOC Density': characteristic was supplied illegal value: number 0 exceeded minimum of 1. See https://homebridge.io/w/JtMGR for more info.```
merdok commented 12 months ago

it might be a micloud only device. You need specify your micloud credentials and set the forceMiCloud flag to true in the config and check if that helps.

matt1aw commented 12 months ago

MiCloud credentials and forceMiCloud flag have been set, only a Switch accessory is generated this time.

Homebridge Log


[14/07/2023, 09:09:20] [miot] Initializing devices
[14/07/2023, 09:09:20] [miot] [空氣檢測儀MIOT] Got device configuration, initializing device with name: 空氣檢測儀MIOT
[14/07/2023, 09:09:20] [miot] [空氣檢測儀MIOT] Model known: cgllc.airmonitor.s1  !
[14/07/2023, 09:09:20] [miot] [空氣檢測儀MIOT] Initializing device!
[14/07/2023, 09:09:22] [miot] [空氣檢測儀MIOT] Fetching device miot spec by model: cgllc.airmonitor.s1   
[14/07/2023, 09:09:25] [miot] [空氣檢測儀MIOT] Initializing device services
[14/07/2023, 09:09:25] [miot] [空氣檢測儀MIOT] Device services: [
  "generic-switch"
]
[14/07/2023, 09:09:25] [miot] [空氣檢測儀MIOT] Initializing device properties
[14/07/2023, 09:09:25] [miot] [空氣檢測儀MIOT] Device properties: [
  "generic:on"
]
[14/07/2023, 09:09:25] [miot] [空氣檢測儀MIOT] Initializing device actions
[14/07/2023, 09:09:25] [miot] [空氣檢測儀MIOT] Device not supported! Using a generic device with limited properties! Consider requesting device support!
[14/07/2023, 09:09:25] [miot] [空氣檢測儀MIOT] Initializing accessory!
[14/07/2023, 09:09:25] [miot] [空氣檢測儀MIOT] Accessory successfully initialized!
[14/07/2023, 09:09:25] [miot] [空氣檢測儀MIOT] Registering 1 accessories!
[14/07/2023, 09:09:25] [miot] [空氣檢測儀MIOT] Everything looks good! Initiating property polling!
[14/07/2023, 09:09:25] [miot] [空氣檢測儀MIOT] Log in to MiCloud!
[14/07/2023, 09:09:26] [miot] [空氣檢測儀MIOT] Successfully connected to MiCloud! Setting up miot device from MiCloud connection!
[14/07/2023, 09:09:27] [miot] [空氣檢測儀MIOT] Connected to device: cgllc.airmonitor.s1
[14/07/2023, 09:09:27] [miot] [空氣檢測儀MIOT] Doing initial property fetch.
[14/07/2023, 09:09:27] [miot] [空氣檢測儀MIOT] Starting property polling.```
merdok commented 12 months ago

Then you have a typo somewhere probably in your model.

matt1aw commented 12 months ago

You are right... There are some spaces in the model. I will further check the status of the accessories later. Many thanks anyway!