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

Sonoff ZigBee Bridge and Ikea Blinds #972

Closed
49jan opened this issue Sep 12, 2022 · 11 comments
Closed

Sonoff ZigBee Bridge and Ikea Blinds #972

49jan opened this issue Sep 12, 2022 · 11 comments
Labels
enhancement New feature or request
Milestone

Comments

@49jan
Copy link

49jan commented Sep 12, 2022

First of all, thank you very much for all the work so far and the great integration.

I recently connected Ikea blinds to the Sonoff ZigBee bridge. I connected 3 shades without any problem and I also manage them via the android application eWeLink.
blind_eWelink

I want to connect blinds to HomeAssistant and operate them with HA automation. However, the blinds were imported to HA as a sensor. I see the appropriate properties in the sensor attributes.
Blind_atributes

Any chance of this being supported?

@AlexxIT AlexxIT added the enhancement New feature or request label Sep 12, 2022
@AlexxIT
Copy link
Owner

AlexxIT commented Sep 12, 2022

You need to download device diagnostics

@49jan
Copy link
Author

49jan commented Sep 12, 2022

Device diagnostics:

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2022.7.6",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.10.5",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Prague",
    "os_name": "Linux",
    "os_version": "5.15.45",
    "supervisor": "2022.08.6",
    "host_os": "Home Assistant OS 8.2",
    "docker_version": "20.10.14",
    "chassis": "vm",
    "run_as_root": true
  },
  "custom_components": {
    "hacs": {
      "version": "1.26.2",
      "requirements": [
        "aiogithubapi>=22.2.4"
      ]
    },
    "ecovent": {
      "version": "0.0.9",
      "requirements": []
    },
    "xiaomi_cloud_map_extractor": {
      "version": "v2.2.0",
      "requirements": [
        "pillow",
        "pybase64",
        "python-miio",
        "requests",
        "pycryptodome"
      ]
    },
    "sonoff": {
      "version": "3.2.0",
      "requirements": [
        "pycryptodome>=3.6.6"
      ]
    }
  },
  "integration_manifest": {
    "domain": "sonoff",
    "name": "Sonoff",
    "config_flow": true,
    "documentation": "https://github.com/AlexxIT/SonoffLAN",
    "issue_tracker": "https://github.com/AlexxIT/SonoffLAN/issues",
    "codeowners": [
      "@AlexxIT"
    ],
    "dependencies": [
      "http",
      "zeroconf"
    ],
    "requirements": [
      "pycryptodome>=3.6.6"
    ],
    "version": "3.2.0",
    "iot_class": "local_push",
    "is_built_in": false
  },
  "data": {
    "version": "38856d1",
    "cloud_auth": true,
    "config": null,
    "options": {},
    "errors": [
      {
        "name": "custom_components.sonoff.core.ewelink.cloud",
        "message": [
          "Cloud ERROR: {'error': 504, 'reason': 'Request Timeout', 'deviceid': '1001130887', 'apikey': 'ba43faca-ea91-4f0f-b3e3-5b65893464cf', 'sequence': '1662997453005'}"
        ],
        "level": "WARNING",
        "source": [
          "custom_components/sonoff/core/ewelink/cloud.py",
          342
        ],
        "timestamp": 1662997459.3095431,
        "exception": "",
        "count": 1,
        "first_occurred": 1662997459.3095431
      }
    ],
    "device": {
      "uiid": 1514,
      "params": {
        "subDevId": "7f9518xxxxxxxxxx",
        "parentid": "100xxxxxxx",
        "battery": 50,
        "trigTime": "1662924107256",
        "curPercent": 100,
        "motorDir": "forward",
        "motorClb": "normal",
        "curtainAction": "open"
      },
      "model": "NON-OTA-GL(1514)",
      "online": true,
      "localtype": null,
      "deviceid": "a48003470a"
    }
  }
}

@AlexxIT
Copy link
Owner

AlexxIT commented Sep 24, 2022

Ok, thanks! You need to enable debug logs and collect responses on all actions (up/down/stop/etc).

@49jan
Copy link
Author

49jan commented Sep 24, 2022

Did you mean through the eWeLink android app? Can I ask you for more guidance on how to do this as I am new to this?

@AlexxIT
Copy link
Owner

AlexxIT commented Sep 24, 2022

Yes. You need to control your device from mobile app. And collect debug logs:
https://github.com/AlexxIT/SonoffLAN#debug-page

@49jan
Copy link
Author

49jan commented Sep 25, 2022

Is this what you need?

Action: Close

2022-09-25 12:11:33 [D] a480034705 <= Cloud3 | {'curtainAction': 'close'} | 1664100692905
2022-09-25 12:11:40 [D] a480034705 <= Cloud3 | {'curPercent': 18} | None
2022-09-25 12:11:44 [D] a480034705 <= Cloud3 | {'curPercent': 29} | None
2022-09-25 12:11:47 [D] a480034705 <= Cloud3 | {'curPercent': 40} | None
2022-09-25 12:11:51 [D] a480034705 <= Cloud3 | {'curPercent': 51} | None
2022-09-25 12:11:54 [D] a480034705 <= Cloud3 | {'curPercent': 62} | None
2022-09-25 12:11:58 [D] a480034705 <= Cloud3 | {'curPercent': 73} | None
2022-09-25 12:12:02 [D] a480034705 <= Cloud3 | {'curPercent': 84} | None
2022-09-25 12:12:05 [D] a480034705 <= Cloud3 | {'curPercent': 95} | None

Action: Open

2022-09-25 12:13:11 [D] a480034705 <= Cloud3 | {'curtainAction': 'open'} | 1664100790915
2022-09-25 12:13:16 [D] a480034705 <= Cloud3 | {'curPercent': 85} | None
2022-09-25 12:13:19 [D] a480034705 <= Cloud3 | {'curPercent': 75} | None
2022-09-25 12:13:25 [D] a480034705 <= Cloud3 | {'curPercent': 64} | None
2022-09-25 12:13:27 [D] a480034705 <= Cloud3 | {'curPercent': 53} | None
2022-09-25 12:13:30 [D] a480034705 <= Cloud3 | {'curPercent': 43} | None
2022-09-25 12:13:33 [D] a480034705 <= Cloud3 | {'curPercent': 33} | None
2022-09-25 12:13:37 [D] a480034705 <= Cloud3 | {'curPercent': 22} | None
2022-09-25 12:13:40 [D] a480034705 <= Cloud3 | {'curPercent': 11} | None
2022-09-25 12:13:44 [D] a480034705 <= Cloud3 | {'curPercent': 0} | None

Action: Pause

2022-09-25 12:16:05 [D] a480034705 <= Cloud3 | {'curtainAction': 'pause'} | 1664100964748

Action: Close/Open to percent (set to 48%)

2022-09-25 12:20:44 [D] a480034705 <= Cloud3 | {'openPercent': 48} | 1664101244129
2022-09-25 12:20:48 [D] a480034705 <= Cloud3 | {'curPercent': 10} | None
2022-09-25 12:20:52 [D] a480034705 <= Cloud3 | {'curPercent': 21} | None
2022-09-25 12:20:56 [D] CLOUD True => True
2022-09-25 12:20:59 [D] a480034705 <= Cloud3 | {'curPercent': 43} | None

I also noticed that the battery returns a value of 50 when fully charged.

@AlexxIT
Copy link
Owner

AlexxIT commented Sep 25, 2022

Yes, thanks! I don't see any information that means the end of the action. Did you copy the whole log?

@49jan
Copy link
Author

49jan commented Sep 25, 2022

I think that is all. Here is the whole log:

2022-09-25 12:07:46 [D] 10013dfeb1 <= Local3 | {'sledOnline': 'off', 'configure': [{'startup': 'off', 'outlet': 0}, {'startup': 'off', 'outlet': 1}, {'startup': 'off', 'outlet': 2}, {'startup': 'off', 'outlet': 3}], 'pulses': [{'pulse': 'off', 'width': 1000, 'outlet': 0}, {'pulse': 'off', 'width': 1000, 'outlet': 1}, {'pulse': 'on', 'width': 1000, 'outlet': 2}, {'pulse': 'off', 'width': 1000, 'outlet': 3}], 'switches': [{'switch': 'off', 'outlet': 0}, {'switch': 'off', 'outlet': 1}, {'switch': 'off', 'outlet': 2}, {'switch': 'off', 'outlet': 3}]} | 68
2022-09-25 12:10:26 [D] a480034705 <= Cloud3 | {'openPercent': 27} | 1664100625462
2022-09-25 12:10:31 [D] a480034705 <= Cloud3 | {'curPercent': 29} | None
2022-09-25 12:10:36 [D] a480034705 <= Cloud3 | {'curtainAction': 'open'} | 1664100635933
2022-09-25 12:10:40 [D] a480034705 <= Cloud3 | {'curPercent': 18} | None
2022-09-25 12:10:44 [D] a480034705 <= Cloud3 | {'curPercent': 7} | None
2022-09-25 12:11:33 [D] a480034705 <= Cloud3 | {'curtainAction': 'close'} | 1664100692905
2022-09-25 12:11:40 [D] a480034705 <= Cloud3 | {'curPercent': 18} | None
2022-09-25 12:11:44 [D] a480034705 <= Cloud3 | {'curPercent': 29} | None
2022-09-25 12:11:47 [D] a480034705 <= Cloud3 | {'curPercent': 40} | None
2022-09-25 12:11:51 [D] a480034705 <= Cloud3 | {'curPercent': 51} | None
2022-09-25 12:11:54 [D] a480034705 <= Cloud3 | {'curPercent': 62} | None
2022-09-25 12:11:58 [D] a480034705 <= Cloud3 | {'curPercent': 73} | None
2022-09-25 12:12:02 [D] a480034705 <= Cloud3 | {'curPercent': 84} | None
2022-09-25 12:12:05 [D] a480034705 <= Cloud3 | {'curPercent': 95} | None
2022-09-25 12:12:57 [D] CLOUD True => True
2022-09-25 12:13:11 [D] a480034705 <= Cloud3 | {'curtainAction': 'open'} | 1664100790915
2022-09-25 12:13:16 [D] a480034705 <= Cloud3 | {'curPercent': 85} | None
2022-09-25 12:13:19 [D] a480034705 <= Cloud3 | {'curPercent': 75} | None
2022-09-25 12:13:25 [D] a480034705 <= Cloud3 | {'curPercent': 64} | None
2022-09-25 12:13:27 [D] a480034705 <= Cloud3 | {'curPercent': 53} | None
2022-09-25 12:13:30 [D] a480034705 <= Cloud3 | {'curPercent': 43} | None
2022-09-25 12:13:33 [D] a480034705 <= Cloud3 | {'curPercent': 33} | None
2022-09-25 12:13:37 [D] a480034705 <= Cloud3 | {'curPercent': 22} | None
2022-09-25 12:13:40 [D] a480034705 <= Cloud3 | {'curPercent': 11} | None
2022-09-25 12:13:44 [D] a480034705 <= Cloud3 | {'curPercent': 0} | None
2022-09-25 12:14:29 [D] a480035238 <= Cloud3 | {'battery': 49, 'trigTime': '1663595943149'} | None
2022-09-25 12:15:38 [D] CLOUD True => True
2022-09-25 12:15:56 [D] a480034705 <= Cloud3 | {'curtainAction': 'close'} | 1664100955998
2022-09-25 12:16:01 [D] a480034705 <= Cloud3 | {'curPercent': 10} | None
2022-09-25 12:16:04 [D] a480034705 <= Cloud3 | {'curPercent': 21} | None
2022-09-25 12:16:05 [D] a480034705 <= Cloud3 | {'curtainAction': 'pause'} | 1664100964748
2022-09-25 12:16:39 [D] a480034705 <= Cloud3 | {'openPercent': 27} | 1664100998707
2022-09-25 12:16:39 [D] a480034705 <= Cloud3 | {'openPercent': 49} | 1664100998729
2022-09-25 12:16:41 [D] a480034705 <= Cloud3 | {'curPercent': 31} | None
2022-09-25 12:16:45 [D] a480034705 <= Cloud3 | {'curPercent': 42} | None
2022-09-25 12:18:22 [D] a480034705 <= Cloud3 | {'battery': 49, 'trigTime': '1662923663752'} | None
2022-09-25 12:18:27 [D] a480034705 <= Cloud3 | {'openPercent': 16} | 1664101106217
2022-09-25 12:18:33 [D] a480034705 <= Cloud3 | {'curPercent': 32} | None
2022-09-25 12:18:36 [D] a480034705 <= Cloud3 | {'curPercent': 21} | None
2022-09-25 12:19:33 [D] a4800352d5 <= Cloud3 | {'curPercent': 0} | None
2022-09-25 12:19:54 [D] a48002add5 <= Cloud3 | {'battery': 100, 'trigTime': '1663928236119'} | None
2022-09-25 12:20:17 [D] a480034705 <= Cloud3 | {'curtainAction': 'open'} | 1664101217054
2022-09-25 12:20:20 [D] a480034705 <= Cloud3 | {'curPercent': 10} | None
2022-09-25 12:20:23 [D] a480034705 <= Cloud3 | {'curPercent': 0} | None
2022-09-25 12:20:44 [D] a480034705 <= Cloud3 | {'openPercent': 48} | 1664101244129
2022-09-25 12:20:48 [D] a480034705 <= Cloud3 | {'curPercent': 10} | None
2022-09-25 12:20:52 [D] a480034705 <= Cloud3 | {'curPercent': 21} | None
2022-09-25 12:20:56 [D] CLOUD True => True
2022-09-25 12:20:59 [D] a480034705 <= Cloud3 | {'curPercent': 43} | None
2022-09-25 12:24:18 [D] 100135711e <= Local3 | {'sledOnline': 'off', 'configure': [{'startup': 'off', 'outlet': 0}, {'startup': 'off', 'outlet': 1}, {'startup': 'off', 'outlet': 2}, {'startup': 'off', 'outlet': 3}], 'pulses': [{'pulse': 'off', 'width': 1000, 'outlet': 0}, {'pulse': 'off', 'width': 1000, 'outlet': 1}, {'pulse': 'off', 'width': 1000, 'outlet': 2}, {'pulse': 'off', 'width': 1000, 'outlet': 3}], 'switches': [{'switch': 'off', 'outlet': 0}, {'switch': 'off', 'outlet': 1}, {'switch': 'on', 'outlet': 2}, {'switch': 'off', 'outlet': 3}]} | 68

@AlexxIT AlexxIT added this to the v3.4.0 milestone Sep 25, 2022
@AlexxIT
Copy link
Owner

AlexxIT commented Sep 25, 2022

You can check master version. I can't set right state like opening and closing, because don't know when action ends. But you can control your cover.

@49jan
Copy link
Author

49jan commented Sep 25, 2022

I verify the master version and it works perfectly. Thanks!

@AlexxIT
Copy link
Owner

AlexxIT commented Sep 27, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants