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

Fix ZBmini default domain - switch instead of light #1195

Closed
vaasu117 opened this issue Jul 12, 2023 · 9 comments
Closed

Fix ZBmini default domain - switch instead of light #1195

vaasu117 opened this issue Jul 12, 2023 · 9 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@vaasu117
Copy link

Hi,
I have two ZBmini which are showing up as light in Home Assistant. Also, control toggle for this light entity is flaky. However, when I use Homekit Bridge and use it in Apple Home, controls are perfect.
I think the issue rests with the device being recognised as a light instead of a switch.

Many Thanks.

@qq273681448
Copy link

upload the Diagnostics,I can try to fix it.

@javbot
Copy link

javbot commented Sep 23, 2023

upload the Diagnostics,I can try to fix it.

I'm also having problems with my ZBMINIs.
The enitity is light.sonoff_a4800XXXXX

Is there a way to change it from a light to a switch from a config file?

@AlexxIT AlexxIT added the diagnostics Waiting device diagnostics label Oct 15, 2023
@AlexxIT
Copy link
Owner

AlexxIT commented Oct 15, 2023

Show device diagnostics

@qq273681448
Copy link

qq273681448 commented Oct 15, 2023 via email

@MironJajtic
Copy link

Hi,

I have several ZBMINI and S26R2ZB sockets and all of them are not working properly via HA. I can turn on/off the switch but the state is not displayed correctly.
For example, if I turn them "on" via Ewelink app, state in HA will show correctly as "on", then I can turn them off via HA, but state in HA returns back to "on" 1-2 seconds later, while the physically switch is still turned off and shows as "off" in the Ewelink app. Now since the state is displayed incorrectly in HA, I can't turn them back on via HA because they are already in the "on" state in HA (while physically is turned off), the only way to turn them "on" now is through the Ewelink app or if I quickly toggle it off->on via HA.

Diagnostic:

  "integration_manifest": {
    "domain": "sonoff",
    "name": "Sonoff",
    "codeowners": [
      "@AlexxIT"
    ],
    "config_flow": true,
    "dependencies": [
      "http",
      "zeroconf"
    ],
    "documentation": "https://github.com/AlexxIT/SonoffLAN",
    "iot_class": "local_push",
    "issue_tracker": "/api/sonoff/4a132910-bf18-4e7e-9eae-6e2b0067cc42",
    "requirements": [
      "pycryptodome>=3.6.6"
    ],
    "version": "3.5.4",
    "is_built_in": false
  },
  "data": {
    "version": "a4a8c5f",
    "cloud_auth": true,
    "config": {
      "reload": "always"
    },
    "options": {
      "mode": "cloud",
      "debug": true,
      "homes": 1
    },
    "errors": [],
    "device": {
      "uiid": 1256,
      "params": {
        "bindInfos": "***",
        "subDevId": "cb8ebbfeff8d79e01256",
        "parentid": "1001f810c6",
        "switch": "off"
      },
      "model": "ZCL_HA_DEVICEID_ON_OFF_LIGHT",
      "online": true,
      "local": null,
      "localtype": null,
      "host": null,
      "deviceid": "a48007dbda"
    }
  }

Logs when device is turned on and on/off via HA:

2024-01-08 11:50:33 [D] a48007dbda => Cloud4 | {'switch': 'on'} | 1704711033000
2024-01-08 11:50:34 [D] a48007dbda => Cloud4 | 1704711034000

2024-01-08 11:50:37 [D] a48007dbda => Cloud4 | {'switch': 'on'} | DDoS | DDoS | DDoS | 1704711037005
2024-01-08 11:50:38 [D] a48007dbda => Cloud4 | {'switch': 'off'} | 1704711038000
2024-01-08 11:50:38 [D] a48007dbda => Cloud4 | DDoS | 1704711038001
2024-01-08 11:50:38 [D] a48007dbda => Cloud4 | 1704711038002

And logs when manually switched on/off via Ewelink mobile app:

2024-01-08 11:40:05 [D] a48007dbda <= Cloud3 | {'switch': 'on'} | 1704710404547
2024-01-08 11:40:09 [D] a48007dbda <= Cloud3 | {'switch': 'off'} | 1704710408414

The same is for Sonoff Socket Plug Zigbee device (S26R2ZB DE):
Diagnostic:

  "integration_manifest": {
    "domain": "sonoff",
    "name": "Sonoff",
    "codeowners": [
      "@AlexxIT"
    ],
    "config_flow": true,
    "dependencies": [
      "http",
      "zeroconf"
    ],
    "documentation": "https://github.com/AlexxIT/SonoffLAN",
    "iot_class": "local_push",
    "issue_tracker": "/api/sonoff/4a132910-bf18-4e7e-9eae-6e2b0067cc42",
    "requirements": [
      "pycryptodome>=3.6.6"
    ],
    "version": "3.5.4",
    "is_built_in": false
  },
  "data": {
    "version": "a4a8c5f",
    "cloud_auth": true,
    "config": {
      "reload": "always"
    },
    "options": {
      "mode": "cloud",
      "debug": true,
      "homes": 1
    },
    "errors": [],
    "device": {
      "uiid": 1009,
      "params": {
        "bindInfos": "***",
        "subDevId": "3a5be729004b12001009",
        "parentid": "1001f810c6",
        "fwVersion": "2.0.1",
        "switch": "off"
      },
      "model": "ZCL_HA_DEVICEID_MAINS_POWER_OUTLET",
      "online": true,
      "local": null,
      "localtype": null,
      "host": null,
      "deviceid": "a48007c4ff"
    }
  }

Logs when device is turned on and on/off via HA:

2024-01-08 11:44:34 [D] a48007c4ff => Cloud4 | {'switch': 'on'} | 1704710674000
2024-01-08 11:44:35 [D] a48007c4ff => Cloud4 | 1704710675000

2024-01-08 11:44:38 [D] a48007c4ff => Cloud4 | {'switch': 'on'} | 1704710678000
2024-01-08 11:44:38 [D] a48007c4ff => Cloud4 | 1704710678001
2024-01-08 11:44:39 [D] a48007c4ff => Cloud4 | {'switch': 'off'} | 1704710679000
2024-01-08 11:44:39 [D] a48007c4ff => Cloud4 | 1704710679001

And logs when device is turned on/off via Ewelink mobile app:

2024-01-08 11:43:52 [D] a48007c4ff <= Cloud3 | {'switch': 'on'} | 1704710631519
2024-01-08 11:43:53 [D] a48007c4ff <= Cloud3 | {'switch': 'off'} | 1704710632687

@qq273681448
Copy link

qq273681448 commented Jan 8, 2024 via email

@AlexxIT AlexxIT self-assigned this Feb 13, 2024
@AlexxIT AlexxIT changed the title ZBmini shows up as Light instead of Switch (Bug report) \ZBmini shows up as Light instead of Switch (Bug report) Feb 14, 2024
@AlexxIT AlexxIT changed the title \ZBmini shows up as Light instead of Switch (Bug report) Fix ZBmini default domain - switch instead of light Feb 14, 2024
@AlexxIT AlexxIT added bug Something isn't working and removed diagnostics Waiting device diagnostics labels Feb 14, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Feb 14, 2024

@MironJajtic some cloud bug. I don't know how to fix it.
2024-01-08 11:50:34 [D] a48007dbda => Cloud4 | 1704711034000
is query for new device state. But without response.

@AlexxIT AlexxIT added this to the v3.5.5 milestone Feb 14, 2024
@qq273681448
Copy link

qq273681448 commented Feb 14, 2024 via email

@AlexxIT
Copy link
Owner

AlexxIT commented Feb 16, 2024

@AlexxIT AlexxIT closed this as completed Feb 16, 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
Projects
None yet
Development

No branches or pull requests

5 participants