-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mixing of two data points #79
Comments
In fact, I had Test setup
Results
|
Can you share the exposes that the device reports? |
0x001788010bd25a8c (Philips 9290030674) exposes: {
"date_code": "20210830",
"definition": {
"description": "Hue motion outdoor sensor",
"exposes": [
{
"access": 1,
"description": "Measured temperature value",
"name": "temperature",
"property": "temperature",
"type": "numeric",
"unit": "°C"
},
{
"access": 1,
"description": "Indicates whether the device detected occupancy",
"name": "occupancy",
"property": "occupancy",
"type": "binary",
"value_off": false,
"value_on": true
},
{
"access": 1,
"description": "Remaining battery in %",
"name": "battery",
"property": "battery",
"type": "numeric",
"unit": "%",
"value_max": 100,
"value_min": 0
},
{
"access": 1,
"description": "Measured illuminance in lux",
"name": "illuminance_lux",
"property": "illuminance_lux",
"type": "numeric",
"unit": "lx"
},
{
"access": 1,
"description": "Raw measured illuminance",
"name": "illuminance",
"property": "illuminance",
"type": "numeric"
},
{
"access": 7,
"name": "motion_sensitivity",
"property": "motion_sensitivity",
"type": "enum",
"values": [
"low",
"medium",
"high",
"very_high",
"max"
]
},
{
"access": 7,
"description": "Blink green LED on motion detection",
"name": "led_indication",
"property": "led_indication",
"type": "binary",
"value_off": false,
"value_on": true
},
{
"access": 7,
"name": "occupancy_timeout",
"property": "occupancy_timeout",
"type": "numeric",
"unit": "second",
"value_max": 65535,
"value_min": 0
},
{
"access": 1,
"description": "Link quality (signal strength)",
"name": "linkquality",
"property": "linkquality",
"type": "numeric",
"unit": "lqi",
"value_max": 255,
"value_min": 0
}
],
"model": "9290030674",
"options": [
{
"access": 2,
"description": "Sends a message after the last time no occupancy (occupancy: false) was detected. When setting this for example to [10, 60] a `{\"no_occupancy_since\": 10}` will be send after 10 seconds and a `{\"no_occupancy_since\": 60}` after 60 seconds.",
"item_type": "number",
"name": "no_occupancy_since",
"property": "no_occupancy_since",
"type": "list"
},
{
"access": 2,
"description": "Number of digits after decimal point for temperature, takes into effect on next report of device.",
"name": "temperature_precision",
"property": "temperature_precision",
"type": "numeric",
"value_max": 3,
"value_min": 0
},
{
"access": 2,
"description": "Calibrates the temperature value (absolute offset), takes into effect on next report of device.",
"name": "temperature_calibration",
"property": "temperature_calibration",
"type": "numeric"
},
{
"access": 2,
"description": "Calibrates the illuminance value (percentual offset), takes into effect on next report of device.",
"name": "illuminance_calibration",
"property": "illuminance_calibration",
"type": "numeric"
},
{
"access": 2,
"description": "Calibrates the illuminance_lux value (percentual offset), takes into effect on next report of device.",
"name": "illuminance_lux_calibration",
"property": "illuminance_lux_calibration",
"type": "numeric"
}
],
"supports_ota": true,
"vendor": "Philips"
},
"endpoints": {
"2": {
"bindings": [
{
"cluster": "genPowerCfg",
"target": {
"endpoint": 1,
"ieee_address": "0x00124b00237dfd02",
"type": "endpoint"
}
},
{
"cluster": "msIlluminanceMeasurement",
"target": {
"endpoint": 1,
"ieee_address": "0x00124b00237dfd02",
"type": "endpoint"
}
},
{
"cluster": "msTemperatureMeasurement",
"target": {
"endpoint": 1,
"ieee_address": "0x00124b00237dfd02",
"type": "endpoint"
}
},
{
"cluster": "msOccupancySensing",
"target": {
"endpoint": 1,
"ieee_address": "0x00124b00237dfd02",
"type": "endpoint"
}
}
],
"clusters": {
"input": [
"genBasic",
"genPowerCfg",
"genIdentify",
"msOccupancySensing",
"msIlluminanceMeasurement",
"msTemperatureMeasurement"
],
"output": [
"genOta",
"genBasic",
"genIdentify",
"genOnOff"
]
},
"configured_reportings": [
{
"attribute": "batteryPercentageRemaining",
"cluster": "genPowerCfg",
"maximum_report_interval": 62000,
"minimum_report_interval": 3600,
"reportable_change": 0
},
{
"attribute": "occupancy",
"cluster": "msOccupancySensing",
"maximum_report_interval": 3600,
"minimum_report_interval": 0,
"reportable_change": 0
},
{
"attribute": "measuredValue",
"cluster": "msTemperatureMeasurement",
"maximum_report_interval": 3600,
"minimum_report_interval": 10,
"reportable_change": 100
},
{
"attribute": "measuredValue",
"cluster": "msIlluminanceMeasurement",
"maximum_report_interval": 3600,
"minimum_report_interval": 10,
"reportable_change": 5
}
],
"scenes": []
}
},
"friendly_name": "MotionFrontDoor",
"ieee_address": "0x001788010bd25a8c",
"interview_completed": true,
"interviewing": false,
"manufacturer": "Signify Netherlands B.V.",
"model_id": "SML004",
"network_address": 14200,
"power_source": "Battery",
"software_build_id": "2.53.6",
"supported": true,
"type": "EndDevice"
} IMO the issue is not limited to the Philips Motions Sensor but also the Aqara ones apparently do not correctly send the raw value (practically it does not matter, since both values are the same anyway) 0x54ef44100053c862 exposes: {
"date_code": "Jun 9 2022",
"definition": {
"description": "Aqara P1 human body movement and illuminance sensor",
"exposes": [
{
"access": 1,
"description": "Indicates whether the device detected occupancy",
"name": "occupancy",
"property": "occupancy",
"type": "binary",
"value_off": false,
"value_on": true
},
{
"access": 1,
"description": "Measured illuminance in lux",
"name": "illuminance_lux",
"property": "illuminance",
"type": "numeric",
"unit": "lx"
},
{
"access": 1,
"description": "Measured illuminance in lux",
"name": "illuminance",
"property": "illuminance",
"type": "numeric",
"unit": "lx"
},
{
"access": 7,
"description": ". Press pairing button right before changing this otherwise it will fail.",
"name": "motion_sensitivity",
"property": "motion_sensitivity",
"type": "enum",
"values": [
"low",
"medium",
"high"
]
},
{
"access": 7,
"description": "Time interval for detecting actions. Press pairing button right before changing this otherwise it will fail.",
"name": "detection_interval",
"property": "detection_interval",
"type": "numeric",
"unit": "s",
"value_max": 65535,
"value_min": 2
},
{
"access": 7,
"description": "When this option is enabled then blue LED will blink once when motion is detected. Press pairing button right before changing this otherwise it will fail.",
"name": "trigger_indicator",
"property": "trigger_indicator",
"type": "binary",
"value_off": false,
"value_on": true
},
{
"access": 1,
"description": "Temperature of the device",
"name": "device_temperature",
"property": "device_temperature",
"type": "numeric",
"unit": "°C"
},
{
"access": 1,
"description": "Remaining battery in %",
"name": "battery",
"property": "battery",
"type": "numeric",
"unit": "%",
"value_max": 100,
"value_min": 0
},
{
"access": 1,
"description": "Voltage of the battery in millivolts",
"name": "voltage",
"property": "voltage",
"type": "numeric",
"unit": "mV"
},
{
"access": 1,
"description": "Link quality (signal strength)",
"name": "linkquality",
"property": "linkquality",
"type": "numeric",
"unit": "lqi",
"value_max": 255,
"value_min": 0
}
],
"model": "RTCGQ14LM",
"options": [
{
"access": 2,
"description": "Time in seconds after which occupancy is cleared after detecting it (default is \"detection_interval\" + 2 seconds). The value must be equal to or greater than \"detection_interval\", and it can also be a fraction.",
"name": "occupancy_timeout",
"property": "occupancy_timeout",
"type": "numeric",
"unit": "s",
"value_min": 0,
"value_step": 0.1
},
{
"access": 2,
"description": "Sends a message the last time occupancy (occupancy: true) was detected. When setting this for example to [10, 60] a `{\"no_occupancy_since\": 10}` will be send after 10 seconds and a `{\"no_occupancy_since\": 60}` after 60 seconds.",
"item_type": "number",
"name": "no_occupancy_since",
"property": "no_occupancy_since",
"type": "list"
},
{
"access": 2,
"description": "Calibrates the illuminance value (percentual offset), takes into effect on next report of device.",
"name": "illuminance_calibration",
"property": "illuminance_calibration",
"type": "numeric"
},
{
"access": 2,
"description": "Calibrates the device_temperature value (absolute offset), takes into effect on next report of device.",
"name": "device_temperature_calibration",
"property": "device_temperature_calibration",
"type": "numeric"
}
],
"supports_ota": true,
"vendor": "Xiaomi"
},
"endpoints": {
"1": {
"bindings": [],
"clusters": {
"input": [
"genBasic",
"genPowerCfg",
"genIdentify",
"aqaraOpple"
],
"output": [
"genIdentify",
"genOta",
"aqaraOpple"
]
},
"configured_reportings": [],
"scenes": []
}
},
"friendly_name": "MotionHallEG",
"ieee_address": "0x54ef44100053c862",
"interview_completed": true,
"interviewing": false,
"manufacturer": "LUMI",
"model_id": "lumi.motion.ac02",
"network_address": 43230,
"power_source": "Battery",
"software_build_id": "0.0.0_0006",
"supported": true,
"type": "EndDevice"
} |
Thanks for your data, I was able to discover a possible problem in the state identification. Please test this dev branch: https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/tree/dev_%2379 |
Many thanks, it looks like a definitive improvement 👍 Some questions remain: Red marked log area:
Green marked log area:
Yellow marked log area:
Blue marked log area:
Need to do some further testing but the outdoor sensors report all 0 at the moment. Will check tomorrow |
First of all, the debug and info logs shown on the screenshot of
This is RAW data coming from the Zigbee network and then Zigbee2MQTT processes it to the nice JSON.
Yes I assume so, since this is calculated by Zigbee2MQTT.
I can't tell you where your flow was triggered. |
I have watched my logs now and I'm positive that your change actually solved the issues. This is an example for the Philips Sensors:
While I fully agree with your logic, it "feels" a bit weird for me: May I propose to: Or: MQTT Whereas I like the first proposal best because it keeps the closest "naming relationship" between MQTT and Iobroker. In any case: |
This was deliberately chosen as it is also present in other adapters. |
What happened?
illuminance_lux
andilluminance
as MQTT messagesilluminance
andilluminance_raw
illuminance
valueilluminance
andilluminance_raw
First one is the raw value and second one is the lux value
Also in the adapter itself, it seems that the raw value is not updated unless the adapter is restarted:


What did you expect to happen?
Both values are updated and separated accordingly.
Is there same regex matching that is too broad?
How to reproduce it (minimal and precise)
No response
Adapter version
abc738c (current git)
Log
The text was updated successfully, but these errors were encountered: