Skip to content
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

[Bug] Specific grouped devices with scenes In z2m do not survive restarts #832

Open
1 task done
anjos opened this issue Feb 24, 2024 · 8 comments
Open
1 task done
Labels
bug Something isn't working stale

Comments

@anjos
Copy link

anjos commented Feb 24, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I have an issue with this plugin where I loose some of my grouped devices between restarts of this plugin.

It does not happen to all grouped devices. Those with scenes in z2m seem to be more affected than other grouped devices, however I have not yet understood why.

If I delete and recreate the group in z2m (and re-program all scenes), then it works - homebridge-z2m can detect the grouped device and correctly expose it to the Home App. After the next reboot, select group devices (always the same few) are gone again and I have to redo it once more.

Any ideas on where to look for issues?

Related devices

Grouped devices containing z2m scenes.

Related Devices

No response

Steps To Reproduce

As narrated above, however I understand I'm providing limited information. Please let me know how to complement it.

Expected behavior

Grouped devices should survive reboots of this plugin.

Device entry

[{"definition":null,"disabled":false,"endpoints":{"1":{"bindings":[],"clusters":{"input":["genBasic","genIdentify","genOnOff","genTime","genOta","26","lightingColorCtrl"],"output":["genBasic","genIdentify","genGroups","genScenes","genOnOff","genLevelCtrl","genPollCtrl","lightingColorCtrl","msIlluminanceMeasurement","msTemperatureMeasurement","msRelativeHumidity","msOccupancySensing","ssIasZone","haMeterIdentification","haApplianceStatistics","haElectricalMeasurement","seMetering","touchlink","manuSpecificUbisysDimmerSetup","manuSpecificSamsungAccelerometer"]},"configured_reportings":[],"scenes":[]},"242":{"bindings":[],"clusters":{"input":[],"output":["greenPower"]},"configured_reportings":[],"scenes":[]}},"friendly_name":"Coordinator","ieee_address":"0xe0798dfffec7aedd","interview_completed":true,"interviewing":false,"network_address":0,"supported":true,"type":"Coordinator"},{"date_code":"20230912","definition":{"description":"Hue white ambiance GU10","exposes":[{"features":[{"access":7,"description":"On/off state of this light","label":"State","name":"state","property":"state","type":"binary","value_off":"OFF","value_on":"ON","value_toggle":"TOGGLE"},{"access":7,"description":"Brightness of this light","label":"Brightness","name":"brightness","property":"brightness","type":"numeric","value_max":254,"value_min":0},{"access":7,"description":"Color temperature of this light","label":"Color temp","name":"color_temp","presets":[{"description":"Coolest temperature supported","name":"coolest","value":153},{"description":"Cool temperature (250 mireds / 4000 Kelvin)","name":"cool","value":250},{"description":"Neutral temperature (370 mireds / 2700 Kelvin)","name":"neutral","value":370},{"description":"Warm temperature (454 mireds / 2200 Kelvin)","name":"warm","value":454},{"description":"Warmest temperature supported","name":"warmest","value":454}],"property":"color_temp","type":"numeric","unit":"mired","value_max":454,"value_min":153},{"access":7,"description":"Color temperature after cold power on of this light","label":"Color temp startup","name":"color_temp_startup","presets":[{"description":"Coolest temperature supported","name":"coolest","value":153},{"description":"Cool temperature (250 mireds / 4000 Kelvin)","name":"cool","value":250},{"description":"Neutral temperature (370 mireds / 2700 Kelvin)","name":"neutral","value":370},{"description":"Warm temperature (454 mireds / 2200 Kelvin)","name":"warm","value":454},{"description":"Warmest temperature supported","name":"warmest","value":454},{"description":"Restore previous color_temp on cold power on","name":"previous","value":65535}],"property":"color_temp_startup","type":"numeric","unit":"mired","value_max":454,"value_min":153}],"type":"light"},{"access":7,"category":"config","description":"Controls the behavior when the device is powered on after power loss. If you get an `UNSUPPORTED_ATTRIBUTE` error, the device does not support it.","label":"Power-on behavior","name":"power_on_behavior","property":"power_on_behavior","type":"enum","values":["off","on","toggle","previous"]},{"access":2,"label":"Effect","name":"effect","property":"effect","type":"enum","values":["blink","breathe","okay","channel_change","candle","finish_effect","stop_effect","stop_hue_effect"]},{"access":1,"category":"diagnostic","description":"Link quality (signal strength)","label":"Linkquality","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"8718696598283","options":[{"access":2,"description":"Controls the transition time (in seconds) of on/off, brightness, color temperature (if applicable) and color (if applicable) changes. Defaults to `0` (no transition).","label":"Transition","name":"transition","property":"transition","type":"numeric","value_min":0},{"access":2,"description":"When enabled colors will be synced, e.g. if the light supports both color x/y and color temperature a conversion from color x/y to color temperature will be done when setting the x/y color (default true).","label":"Color sync","name":"color_sync","property":"color_sync","type":"binary","value_off":false,"value_on":true},{"access":2,"description":"State actions will also be published as 'action' when true (default false).","label":"State action","name":"state_action","property":"state_action","type":"binary","value_off":false,"value_on":true}],"supports_ota":true,"vendor":"Philips"},"description":"Ceiling light at office (closest to window)","disabled":false,"endpoints":{"11":{"bindings":[],"clusters":{"input":["genBasic","genIdentify","genGroups","genScenes","genOnOff","genLevelCtrl","touchlink","manuSpecificPhilips2","lightingColorCtrl"],"output":["genOta"]},"configured_reportings":[],"scenes":[]},"242":{"bindings":[],"clusters":{"input":["greenPower"],"output":["greenPower"]},"configured_reportings":[],"scenes":[]}},"friendly_name":"Office Ceiling light 3","ieee_address":"0x0017880104dd706c","interview_completed":true,"interviewing":false,"manufacturer":"Signify Netherlands B.V.","model_id":"LTW013","network_address":18096,"power_source":"Mains (single phase)","software_build_id":"1.108.7","supported":true,"type":"Router"},{"date_code":"20230912","definition":{"description":"Hue white ambiance GU10","exposes":[{"features":[{"access":7,"description":"On/off state of this light","label":"State","name":"state","property":"state","type":"binary","value_off":"OFF","value_on":"ON","value_toggle":"TOGGLE"},{"access":7,"description":"Brightness of this light","label":"Brightness","name":"brightness","property":"brightness","type":"numeric","value_max":254,"value_min":0},{"access":7,"description":"Color temperature of this light","label":"Color temp","name":"color_temp","presets":[{"description":"Coolest temperature supported","name":"coolest","value":153},{"description":"Cool temperature (250 mireds / 4000 Kelvin)","name":"cool","value":250},{"description":"Neutral temperature (370 mireds / 2700 Kelvin)","name":"neutral","value":370},{"description":"Warm temperature (454 mireds / 2200 Kelvin)","name":"warm","value":454},{"description":"Warmest temperature supported","name":"warmest","value":454}],"property":"color_temp","type":"numeric","unit":"mired","value_max":454,"value_min":153},{"access":7,"description":"Color temperature after cold power on of this light","label":"Color temp startup","name":"color_temp_startup","presets":[{"description":"Coolest temperature supported","name":"coolest","value":153},{"description":"Cool temperature (250 mireds / 4000 Kelvin)","name":"cool","value":250},{"description":"Neutral temperature (370 mireds / 2700 Kelvin)","name":"neutral","value":370},{"description":"Warm temperature (454 mireds / 2200 Kelvin)","name":"warm","value":454},{"description":"Warmest temperature supported","name":"warmest","value":454},{"description":"Restore previous color_temp on cold power on","name":"previous","value":65535}],"property":"color_temp_startup","type":"numeric","unit":"mired","value_max":454,"value_min":153}],"type":"light"},{"access":7,"category":"config","description":"Controls the behavior when the device is powered on after power loss. If you get an `UNSUPPORTED_ATTRIBUTE` error, the device does not support it.","label":"Power-on behavior","name":"power_on_behavior","property":"power_on_behavior","type":"enum","values":["off","on","toggle","previous"]},{"access":2,"label":"Effect","name":"effect","property":"effect","type":"enum","values":["blink","breathe","okay","channel_change","candle","finish_effect","stop_effect","stop_hue_effect"]},{"access":1,"category":"diagnostic","description":"Link quality (signal strength)","label":"Linkquality","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"8718696598283","options":[{"access":2,"description":"Controls the transition time (in seconds) of on/off, brightness, color temperature (if applicable) and color (if applicable) changes. Defaults to `0` (no transition).","label":"Transition","name":"transition","property":"transition","type":"numeric","value_min":0},{"access":2,"description":"When enabled colors will be synced, e.g. if the light supports both color x/y and color temperature a conversion from color x/y to color temperature will be done when setting the x/y color (default true).","label":"Color sync","name":"color_sync","property":"color_sync","type":"binary","value_off":false,"value_on":true},{"access":2,"description":"State actions will also be published as 'action' when true (default false).","label":"State action","name":"state_action","property":"state_action","type":"binary","value_off":false,"value_on":true}],"supports_ota":true,"vendor":"Philips"},"description":"Ceiling light at office (closest to door)","disabled":false,"endpoints":{"11":{"bindings":[],"clusters":{"input":["genBasic","genIdentify","genGroups","genScenes","genOnOff","genLevelCtrl","touchlink","manuSpecificPhilips2","lightingColorCtrl"],"output":["genOta"]},"configured_reportings":[],"scenes":[]},"242":{"bindings":[],"clusters":{"input":["greenPower"],"output":["greenPower"]},"configured_reportings":[],"scenes":[]}},"friendly_name":"Office Ceiling light 1","ieee_address":"0x0017880104951663","interview_completed":true,"interviewing":false,"manufacturer":"Signify Netherlands B.V.","model_id":"LTW013","network_address":5946,"power_source":"Mains (single phase)","software_build_id":"1.108.7","supported":true,"type":"Router"},{"date_code":"20230912","definition":{"description":"Hue white ambiance GU10","exposes":[{"features":[{"access":7,"description":"On/off state of this light","label":"State","name":"state","property":"state","type":"binary","value_off":"OFF","value_on":"ON","value_toggle":"TOGGLE"},{"access":7,"description":"Brightness of this light","label":"Brightness","name":"brightness","property":"brightness","type":"numeric","value_max":254,"value_min":0},{"access":7,"description":"Color temperature of this light","label":"Color temp","name":"color_temp","presets":[{"description":"Coolest temperature supported","name":"coolest","value":153},{"description":"Cool temperature (250 mireds / 4000 Kelvin)","name":"cool","value":250},{"description":"Neutral temperature (370 mireds / 2700 Kelvin)","name":"neutral","value":370},{"description":"Warm temperature (454 mireds / 2200 Kelvin)","name":"warm","value":454},{"description":"Warmest temperature supported","name":"warmest","value":454}],"property":"color_temp","type":"numeric","unit":"mired","value_max":454,"value_min":153},{"access":7,"description":"Color temperature after cold power on of this light","label":"Color temp startup","name":"color_temp_startup","presets":[{"description":"Coolest temperature supported","name":"coolest","value":153},{"description":"Cool temperature (250 mireds / 4000 Kelvin)","name":"cool","value":250},{"description":"Neutral temperature (370 mireds / 2700 Kelvin)","name":"neutral","value":370},{"description":"Warm temperature (454 mireds / 2200 Kelvin)","name":"warm","value":454},{"description":"Warmest temperature supported","name":"warmest","value":454},{"description":"Restore previous color_temp on cold power on","name":"previous","value":65535}],"property":"color_temp_startup","type":"numeric","unit":"mired","value_max":454,"value_min":153}],"type":"light"},{"access":7,"category":"config","description":"Controls the behavior when the device is powered on after power loss. If you get an `UNSUPPORTED_ATTRIBUTE` error, the device does not support it.","label":"Power-on behavior","name":"power_on_behavior","property":"power_on_behavior","type":"enum","values":["off","on","toggle","previous"]},{"access":2,"label":"Effect","name":"effect","property":"effect","type":"enum","values":["blink","breathe","okay","channel_change","candle","finish_effect","stop_effect","stop_hue_effect"]},{"access":1,"category":"diagnostic","description":"Link quality (signal strength)","label":"Linkquality","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"8718696598283","options":[{"access":2,"description":"Controls the transition time (in seconds) of on/off, brightness, color temperature (if applicable) and color (if applicable) changes. Defaults to `0` (no transition).","label":"Transition","name":"transition","property":"transition","type":"numeric","value_min":0},{"access":2,"description":"When enabled colors will be synced, e.g. if the light supports both color x/y and color temperature a conversion from color x/y to color temperature will be done when setting the x/y color (default true).","label":"Color sync","name":"color_sync","property":"color_sync","type":"binary","value_off":false,"value_on":true},{"access":2,"description":"State actions will also be published as 'action' when true (default false).","label":"State action","name":"state_action","property":"state_action","type":"binary","value_off":false,"value_on":true}],"supports_ota":true,"vendor":"Philips"},"description":"Ceiling light at office (middle)","disabled":false,"endpoints":{"11":{"bindings":[],"clusters":{"input":["genBasic","genIdentify","genGroups","genScenes","genOnOff","genLevelCtrl","touchlink","manuSpecificPhilips2","lightingColorCtrl"],"output":["genOta"]},"configured_reportings":[],"scenes":[]},"242":{"bindings":[],"clusters":{"input":["greenPower"],"output":["greenPower"]},"configured_reportings":[],"scenes":[]}},"friendly_name":"Office Ceiling light 2","ieee_address":"0x0017880104dd52a6","interview_completed":true,"interviewing":false,"manufacturer":"Signify Netherlands B.V.","model_id":"LTW013","network_address":17815,"power_source":"Mains (single phase)","software_build_id":"1.108.7","supported":true,"type":"Router"},{"date_code":"20230606","definition":{"description":"Hue white and color ambiance LightStrip plus","exposes":[{"features":[{"access":7,"description":"On/off state of this light","label":"State","name":"state","property":"state","type":"binary","value_off":"OFF","value_on":"ON","value_toggle":"TOGGLE"},{"access":7,"description":"Brightness of this light","label":"Brightness","name":"brightness","property":"brightness","type":"numeric","value_max":254,"value_min":0},{"access":7,"description":"Color temperature of this light","label":"Color temp","name":"color_temp","presets":[{"description":"Coolest temperature supported","name":"coolest","value":153},{"description":"Cool temperature (250 mireds / 4000 Kelvin)","name":"cool","value":250},{"description":"Neutral temperature (370 mireds / 2700 Kelvin)","name":"neutral","value":370},{"description":"Warm temperature (454 mireds / 2200 Kelvin)","name":"warm","value":454},{"description":"Warmest temperature supported","name":"warmest","value":500}],"property":"color_temp","type":"numeric","unit":"mired","value_max":500,"value_min":153},{"access":7,"description":"Color temperature after cold power on of this light","label":"Color temp startup","name":"color_temp_startup","presets":[{"description":"Coolest temperature supported","name":"coolest","value":153},{"description":"Cool temperature (250 mireds / 4000 Kelvin)","name":"cool","value":250},{"description":"Neutral temperature (370 mireds / 2700 Kelvin)","name":"neutral","value":370},{"description":"Warm temperature (454 mireds / 2200 Kelvin)","name":"warm","value":454},{"description":"Warmest temperature supported","name":"warmest","value":500},{"description":"Restore previous color_temp on cold power on","name":"previous","value":65535}],"property":"color_temp_startup","type":"numeric","unit":"mired","value_max":500,"value_min":153},{"access":7,"description":"Color of this light in the CIE 1931 color space (x/y)","features":[{"access":7,"label":"X","name":"x","property":"x","type":"numeric"},{"access":7,"label":"Y","name":"y","property":"y","type":"numeric"}],"label":"Color (X/Y)","name":"color_xy","property":"color","type":"composite"},{"access":7,"description":"Color of this light expressed as hue/saturation","features":[{"access":7,"label":"Hue","name":"hue","property":"hue","type":"numeric"},{"access":7,"label":"Saturation","name":"saturation","property":"saturation","type":"numeric"}],"label":"Color (HS)","name":"color_hs","property":"color","type":"composite"}],"type":"light"},{"access":7,"category":"config","description":"Controls the behavior when the device is powered on after power loss. If you get an `UNSUPPORTED_ATTRIBUTE` error, the device does not support it.","label":"Power-on behavior","name":"power_on_behavior","property":"power_on_behavior","type":"enum","values":["off","on","toggle","previous"]},{"access":2,"label":"Effect","name":"effect","property":"effect","type":"enum","values":["blink","breathe","okay","channel_change","candle","fireplace","colorloop","finish_effect","stop_effect","stop_hue_effect"]},{"access":1,"category":"diagnostic","description":"Link quality (signal strength)","label":"Linkquality","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"915005106701","options":[{"access":2,"description":"Controls the transition time (in seconds) of on/off, brightness, color temperature (if applicable) and color (if applicable) changes. Defaults to `0` (no transition).","label":"Transition","name":"transition","property":"transition","type":"numeric","value_min":0},{"access":2,"description":"When enabled colors will be synced, e.g. if the light supports both color x/y and color temperature a conversion from color x/y to color temperature will be done when setting the x/y color (default true).","label":"Color sync","name":"color_sync","property":"color_sync","type":"binary","value_off":false,"value_on":true},{"access":2,"description":"State actions will also be published as 'action' when true (default false).","label":"State action","name":"state_action","property":"state_action","type":"binary","value_off":false,"value_on":true}],"supports_ota":true,"vendor":"Philips"},"description":"Light bar under the office window","disabled":false,"endpoints":{"11":{"bindings":[],"clusters":{"input":["genBasic","genIdentify","genGroups","genScenes","genOnOff","genLevelCtrl","touchlink","lightingColorCtrl","manuSpecificUbisysDimmerSetup"],"output":["genOta"]},"configured_reportings":[],"scenes":[]},"242":{"bindings":[],"clusters":{"input":["greenPower"],"output":["greenPower"]},"configured_reportings":[],"scenes":[]}},"friendly_name":"Office Window light bar","ieee_address":"0x00178801044b8ea0","interview_completed":true,"interviewing":false,"manufacturer":"Philips","model_id":"LST002","network_address":13487,"power_source":"Mains (single phase)","software_build_id":"1.108.5","supported":true,"type":"Router"},{"date_code":"20211118","definition":{"description":"TRADFRI control outlet","exposes":[{"features":[{"access":7,"description":"On/off state of the switch","label":"State","name":"state","property":"state","type":"binary","value_off":"OFF","value_on":"ON","value_toggle":"TOGGLE"}],"type":"switch"},{"access":7,"category":"config","description":"Controls the behavior when the device is powered on after power loss. If you get an `UNSUPPORTED_ATTRIBUTE` error, the device does not support it.","label":"Power-on behavior","name":"power_on_behavior","property":"power_on_behavior","type":"enum","values":["off","on","toggle","previous"]},{"access":1,"category":"diagnostic","description":"Link quality (signal strength)","label":"Linkquality","name":"linkquality","property":"linkquality","type":"numeric","unit":"lqi","value_max":255,"value_min":0}],"model":"E1603/E1702/E1708","options":[{"access":2,"description":"State actions will also be published as 'action' when true (default false).","label":"State action","name":"state_action","property":"state_action","type":"binary","value_off":false,"value_on":true}],"supports_ota":true,"vendor":"IKEA"},"description":"Table reading light switch","disabled":false,"endpoints":{"1":{"bindings":[{"cluster":"genOn

Status update

For all grouped devices, I can only see `online` marked on MQTT explorer.

Messages from this plugin

Messages concerning one of the group that disappears on restarts:


## I recreated the group "Entrance" on zigbee2mqtt, I can see the group is online
## at MQTT explorer.  homebridge-z2m picks it up and presents it to the Home App.
[2/21/2024, 4:52:02 PM] [homebridge-z2m] Connected to MQTT server
[2/21/2024, 4:52:02 PM] [homebridge-z2m] Using Zigbee2MQTT v1.35.3 (identified via zigbee2mqtt/bridge/info)
[2/21/2024, 4:52:02 PM] [homebridge-z2m] New accessory: Entrance
...
## Here, I restarted the child bridge containing the plugin, group "Entrance"
## is now gone from the Home app
[2/22/2024, 11:38:38 AM] [homebridge-z2m] Connected to MQTT server
[2/22/2024, 11:38:38 AM] [homebridge-z2m] Using Zigbee2MQTT v1.35.3 (identified via zigbee2mqtt/bridge/info)
...
[2/22/2024, 11:38:38 AM] [homebridge-z2m] New accessory: Entrance


### This plugin

1.9.3

### Homebridge

1.7.0

### Zigbee2MQTT

1.35.3 commit: fe0742a

### Homebridge Config UI X (if applicable)

_No response_
@anjos anjos added the bug Something isn't working label Feb 24, 2024
@itavero
Copy link
Owner

itavero commented Feb 24, 2024

Just to clarify: are you missing the group or the devices within that group?

Did you set anything specific related to groups in your plugin configuration?

@anjos
Copy link
Author

anjos commented Feb 24, 2024

The group. I did not set anything specific to the missing groups.

@anjos
Copy link
Author

anjos commented Feb 25, 2024

Here is some extra information: deleting and recreating the groups does not work anymore - even if I use a different group id. Frankly, I'm a bit lost.

Some of the groups actually survive the reboot, but are not shown as lights on the Home app, but have a "house icon" instead.

@itavero
Copy link
Owner

itavero commented Feb 25, 2024

In the logs it should show which exposes information is used for a group when Homebridge starts (might have to enable debug logs for that).
Can you check those logs?

It might be that one of the devices in the group has erroneous/incorrect exposes information.
Only properties supported by all devices in the group will normally be used, unless you specify the information by hand in the plugin configuration.

@anjos
Copy link
Author

anjos commented Feb 26, 2024

Thanks for pointing me somewhere, @itavero - I'll check the plugin logs and come back when I understand this better.

@anjos
Copy link
Author

anjos commented Feb 29, 2024

That was right on the money, @itavero - all affected groups contain plugs (either from Ikea or Philips Hue). The presence of the plug may be affecting the exposure as you suggested.

I enabled debug logs in homebridge using the asterisk * setting.

The Ikea TRADFRI plugs show this JSON (click me)
  {
    "date_code": "20211118",
    "definition": {
      "description": "TRADFRI control outlet",
      "exposes": [
        {
          "features": [
            {
              "access": 7,
              "description": "On/off state of the switch",
              "label": "State",
              "name": "state",
              "property": "state",
              "type": "binary",
              "value_off": "OFF",
              "value_on": "ON",
              "value_toggle": "TOGGLE"
            }
          ],
          "type": "switch"
        },
        {
          "access": 7,
          "category": "config",
          "description": "Controls the behavior when the device is powered on after power loss. If you get an `UNSUPPORTED_ATTRIBUTE` error, the device does not support it.",
          "label": "Power-on behavior",
          "name": "power_on_behavior",
          "property": "power_on_behavior",
          "type": "enum",
          "values": ["off", "on", "toggle", "previous"]
        },
        {
          "access": 1,
          "category": "diagnostic",
          "description": "Link quality (signal strength)",
          "label": "Linkquality",
          "name": "linkquality",
          "property": "linkquality",
          "type": "numeric",
          "unit": "lqi",
          "value_max": 255,
          "value_min": 0
        }
      ],
      "model": "E1603/E1702/E1708",
      "options": [
        {
          "access": 2,
          "description": "State actions will also be published as 'action' when true (default false).",
          "label": "State action",
          "name": "state_action",
          "property": "state_action",
          "type": "binary",
          "value_off": false,
          "value_on": true
        }
      ],
      "supports_ota": true,
      "vendor": "IKEA"
    },
    "description": "Table reading light switch",
    "disabled": false,
    "endpoints": {
      "1": {
        "bindings": [
          {
            "cluster": "genOnOff",
            "target": {
              "endpoint": 1,
              "ieee_address": "0xe0798dfffec7aedd",
              "type": "endpoint"
            }
          }
        ],
        "clusters": {
          "input": [
            "genBasic",
            "genIdentify",
            "genGroups",
            "genScenes",
            "genOnOff",
            "genLevelCtrl",
            "touchlink",
            "64636"
          ],
          "output": ["genOta", "genPollCtrl", "touchlink"]
        },
        "configured_reportings": [
          {
            "attribute": "onOff",
            "cluster": "genOnOff",
            "maximum_report_interval": 65000,
            "minimum_report_interval": 0,
            "reportable_change": 1
          }
        ],
        "scenes": []
      },
      "242": {
        "bindings": [],
        "clusters": {
          "input": [],
          "output": ["greenPower"]
        },
        "configured_reportings": [],
        "scenes": []
      }
    },
    "friendly_name": "Office Reading light plug",
    "ieee_address": "0x086bd7fffe81e91d",
    "interview_completed": true,
    "interviewing": false,
    "manufacturer": "IKEA of Sweden",
    "model_id": "TRADFRI control outlet",
    "network_address": 62438,
    "power_source": "Mains (single phase)",
    "software_build_id": "2.3.089",
    "supported": true,
    "type": "Router"
  },
The Philips Hue plugs have show this JSON (click me)
  {
    "date_code": "20230403",
    "definition": {
      "description": "Hue smart plug - CH",
      "exposes": [
        {
          "features": [
            {
              "access": 7,
              "description": "On/off state of the switch",
              "label": "State",
              "name": "state",
              "property": "state",
              "type": "binary",
              "value_off": "OFF",
              "value_on": "ON",
              "value_toggle": "TOGGLE"
            }
          ],
          "type": "switch"
        },
        {
          "access": 1,
          "category": "diagnostic",
          "description": "Link quality (signal strength)",
          "label": "Linkquality",
          "name": "linkquality",
          "property": "linkquality",
          "type": "numeric",
          "unit": "lqi",
          "value_max": 255,
          "value_min": 0
        }
      ],
      "model": "9290024426",
      "options": [
        {
          "access": 2,
          "description": "State actions will also be published as 'action' when true (default false).",
          "label": "State action",
          "name": "state_action",
          "property": "state_action",
          "type": "binary",
          "value_off": false,
          "value_on": true
        }
      ],
      "supports_ota": true,
      "vendor": "Philips"
    },
    "description": "Table reading light switch",
    "disabled": false,
    "endpoints": {
      "11": {
        "bindings": [
          {
            "cluster": "genOnOff",
            "target": {
              "endpoint": 1,
              "ieee_address": "0xe0798dfffec7aedd",
              "type": "endpoint"
            }
          }
        ],
        "clusters": {
          "input": [
            "genBasic",
            "genIdentify",
            "genGroups",
            "genScenes",
            "genOnOff",
            "genLevelCtrl",
            "touchlink",
            "manuSpecificSamsungAccelerometer"
          ],
          "output": ["genOta"]
        },
        "configured_reportings": [
          {
            "attribute": "onOff",
            "cluster": "genOnOff",
            "maximum_report_interval": 65000,
            "minimum_report_interval": 0,
            "reportable_change": 1
          }
        ],
        "scenes": []
      },
      "242": {
        "bindings": [],
        "clusters": {
          "input": [],
          "output": ["greenPower"]
        },
        "configured_reportings": [],
        "scenes": []
      }
    },
    "friendly_name": "David Reading light plug",
    "ieee_address": "0x001788010d7fdc8f",
    "interview_completed": true,
    "interviewing": false,
    "manufacturer": "Philips",
    "model_id": "LOM006",
    "network_address": 28757,
    "power_source": "Mains (single phase)",
    "software_build_id": "1.104.2",
    "supported": true,
    "type": "Router"
  },

Nothing strikes me as faulty. Of course, other smart lights (bulbs) expose more information, however it would make sense that at least the ON/OFF functionality works across all devices.

For information, here is the "exposes" information for some of the lights in groups containing these plugs (click me)
      "exposes": [
        {
          "features": [
            {
              "access": 7,
              "description": "On/off state of this light",
              "label": "State",
              "name": "state",
              "property": "state",
              "type": "binary",
              "value_off": "OFF",
              "value_on": "ON",
              "value_toggle": "TOGGLE"
            },
            {
              "access": 7,
              "description": "Brightness of this light",
              "label": "Brightness",
              "name": "brightness",
              "property": "brightness",
              "type": "numeric",
              "value_max": 254,
              "value_min": 0
            },
            {
              "access": 7,
              "description": "Color temperature of this light",
              "label": "Color temp",
              "name": "color_temp",
              "presets": [
                {
                  "description": "Coolest temperature supported",
                  "name": "coolest",
                  "value": 250
                },
                {
                  "description": "Cool temperature (250 mireds / 4000 Kelvin)",
                  "name": "cool",
                  "value": 250
                },
                {
                  "description": "Neutral temperature (370 mireds / 2700 Kelvin)",
                  "name": "neutral",
                  "value": 370
                },
                {
                  "description": "Warm temperature (454 mireds / 2200 Kelvin)",
                  "name": "warm",
                  "value": 454
                },
                {
                  "description": "Warmest temperature supported",
                  "name": "warmest",
                  "value": 454
                }
              ],
              "property": "color_temp",
              "type": "numeric",
              "unit": "mired",
              "value_max": 454,
              "value_min": 250
            },
            {
              "access": 7,
              "description": "Color temperature after cold power on of this light",
              "label": "Color temp startup",
              "name": "color_temp_startup",
              "presets": [
                {
                  "description": "Coolest temperature supported",
                  "name": "coolest",
                  "value": 250
                },
                {
                  "description": "Cool temperature (250 mireds / 4000 Kelvin)",
                  "name": "cool",
                  "value": 250
                },
                {
                  "description": "Neutral temperature (370 mireds / 2700 Kelvin)",
                  "name": "neutral",
                  "value": 370
                },
                {
                  "description": "Warm temperature (454 mireds / 2200 Kelvin)",
                  "name": "warm",
                  "value": 454
                },
                {
                  "description": "Warmest temperature supported",
                  "name": "warmest",
                  "value": 454
                },
                {
                  "description": "Restore previous color_temp on cold power on",
                  "name": "previous",
                  "value": 65535
                }
              ],
              "property": "color_temp_startup",
              "type": "numeric",
              "unit": "mired",
              "value_max": 454,
              "value_min": 250
            }
          ],
          "type": "light"
        },
        {
          "access": 2,
          "description": "Triggers an effect on the light (e.g. make light blink for a few seconds)",
          "label": "Effect",
          "name": "effect",
          "property": "effect",
          "type": "enum",
          "values": [
            "blink",
            "breathe",
            "okay",
            "channel_change",
            "finish_effect",
            "stop_effect"
          ]
        },
        {
          "access": 7,
          "category": "config",
          "description": "Controls the behavior when the device is powered on after power loss. If you get an `UNSUPPORTED_ATTRIBUTE` error, the device does not support it.",
          "label": "Power-on behavior",
          "name": "power_on_behavior",
          "property": "power_on_behavior",
          "type": "enum",
          "values": ["off", "on", "toggle", "previous"]
        },
        {
          "access": 7,
          "category": "config",
          "description": "Advanced color behavior",
          "features": [
            {
              "access": 2,
              "description": "Controls whether color and color temperature can be set while light is off",
              "label": "Execute if off",
              "name": "execute_if_off",
              "property": "execute_if_off",
              "type": "binary",
              "value_off": false,
              "value_on": true
            }
          ],
          "label": "Color options",
          "name": "color_options",
          "property": "color_options",
          "type": "composite"
        },
        {
          "access": 1,
          "category": "diagnostic",
          "description": "Link quality (signal strength)",
          "label": "Linkquality",
          "name": "linkquality",
          "property": "linkquality",
          "type": "numeric",
          "unit": "lqi",
          "value_max": 255,
          "value_min": 0
        }
      ],

Would you have any follow-up remarks and tips to get this working? Thanks!

@itavero
Copy link
Owner

itavero commented Mar 1, 2024

So you have a switch and a light in the same group?
I can imagine that they do not really have overlapping exposes information, even though they do have similar properties.

The Homebridge logs should also show the exposes information used for the group (or perhaps an error if it failed to determine it).

Either way, the solution will probably be to manually specify the exposes information to be used for this group (e.g. take the one from the light and remove pretty much everything except the state or something like that).

Copy link

stale bot commented Apr 22, 2024

It appears that this issue did not have an update in quite some time. Please check if you can provide any additional information to help resolve this issue. If there isn't any activity in the next two weeks, this issue will be closed automatically. Thank you for your contributions!

@stale stale bot added the stale label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

2 participants