AlexxIT / SonoffLAN

Control Sonoff Devices with eWeLink (original) firmware over LAN and/or Cloud from Home Assistant
https://github.com/AlexxIT/Blog
MIT License
2.73k stars 415 forks source link

GK-200mp2-B Ptz doesn't work #1187

Open atlaspl opened 1 year ago

atlaspl commented 1 year ago

I have looked for other similar posts, there are many similar problems, but I didn't find the solution. And also if I have tried different ways to make work ptz I wasn't able to do it.

I tried in developer tools:

    service: sonoff.send_command
    data:
      device: '??????'  #I use the 6 numbers in the middle of the id of my cam EWLK-??????-XXXXX surronded by quotes, 
      cmd: left

No log in the loogbook.

JokeRsevilla commented 1 year ago

hello! same problem with GK-200MP2B

AlexxIT commented 1 year ago

PTZ control is broken since some firmware update

MichalKs commented 1 year ago

For me (same camera) it does not work also. Is there a plan for the solution? Is it possible to downgrade firmware to make it work? Which version should I use?

bigsem89 commented 1 year ago

same issue...

felipebraz commented 9 months ago

Same here

ddean6232 commented 1 month ago

Still not working... Any solutions?

{ "home_assistant": { "installation_type": "Home Assistant OS", "version": "2024.9.0", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.12.4", "docker": true, "arch": "aarch64", "timezone": "America/Edmonton", "os_name": "Linux", "os_version": "6.6.31-haos-raspi", "supervisor": "2024.09.1", "host_os": "Home Assistant OS 13.1", "docker_version": "26.1.4", "chassis": "embedded", "run_as_root": true }, "custom_components": { "sonoff": { "documentation": "https://github.com/AlexxIT/SonoffLAN", "version": "3.8.0", "requirements": [ "pycryptodome>=3.6.6" ] }, "hacs": { "documentation": "https://hacs.xyz/docs/configuration/start", "version": "2.0.1", "requirements": [ "aiogithubapi>=22.10.1" ] }, "webrtc": { "documentation": "https://github.com/AlexxIT/WebRTC", "version": "v3.5.2", "requirements": [] } }, "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/b7f15804-506d-4e53-b0e5-9470f56ddda9", "requirements": [ "pycryptodome>=3.6.6" ], "version": "3.8.0", "is_built_in": false }, "setup_times": {}, "data": { "version": "79ecd72", "cloud_auth": true, "config": null, "options": { "mode": "cloud", "debug": true, "homes": 1 }, "errors": [ { "name": "homeassistant.helpers.script.websocket_api_script", "message": [ "websocket_api script: Error executing script. Unexpected error for call_service at pos 1: a bytes-like object is required, not 'NoneType'" ], "level": "ERROR", "source": [ "helpers/script.py", 525 ], "timestamp": 1726428751.4234247, "exception": "Traceback (most recent call last):\n File \"/usr/src/homeassistant/homeassistant/helpers/script.py\", line 525, in _async_step\n await getattr(self, handler)()\n File \"/usr/src/homeassistant/homeassistant/helpers/script.py\", line 763, in _async_call_service_step\n response_data = await self._async_run_long_action(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/src/homeassistant/homeassistant/helpers/script.py\", line 726, in _async_run_long_action\n return await long_task\n ^^^^^^^^^^^^^^^\n File \"/usr/src/homeassistant/homeassistant/core.py\", line 2761, in async_call\n response_data = await coro\n ^^^^^^^^^^\n File \"/usr/src/homeassistant/homeassistant/core.py\", line 2804, in _execute_service\n return await target(service_call)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/config/custom_components/sonoff/init.py\", line 158, in send_command\n await cameras.send(deviceid, params[\"cmd\"])\n File \"/config/custom_components/sonoff/core/ewelink/camera.py\", line 160, in send\n self.sendto(device.init_data, device)\n File \"/config/custom_components/sonoff/core/ewelink/camera.py\", line 130, in sendto\n self.sock.sendto(data, device.addr)\nTypeError: a bytes-like object is required, not 'NoneType'", "count": 3, "first_occurred": 1726428751.4135487 }, { "name": "homeassistant.components.websocket_api.http.connection", "message": [ "[546923927952] Error handling message: Unknown error (unknown_error) Darren Dean (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36)" ], "level": "ERROR", "source": [ "custom_components/sonoff/core/ewelink/camera.py", 130 ], "timestamp": 1726428751.4390566, "exception": "Traceback (most recent call last):\n File \"/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py\", line 28, in _handle_async_response\n await func(hass, connection, msg)\n File \"/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py\", line 816, in handle_execute_script\n script_result = await script_obj.async_run(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/src/homeassistant/homeassistant/helpers/script.py\", line 1795, in async_run\n return await asyncio.shield(create_eager_task(run.async_run()))\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/src/homeassistant/homeassistant/helpers/script.py\", line 463, in async_run\n await self._async_step(log_exceptions=False)\n File \"/usr/src/homeassistant/homeassistant/helpers/script.py\", line 527, in _async_step\n self._handle_exception(\n File \"/usr/src/homeassistant/homeassistant/helpers/script.py\", line 557, in _handle_exception\n raise exception\n File \"/usr/src/homeassistant/homeassistant/helpers/script.py\", line 525, in _async_step\n await getattr(self, handler)()\n File \"/usr/src/homeassistant/homeassistant/helpers/script.py\", line 763, in _async_call_service_step\n response_data = await self._async_run_long_action(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/src/homeassistant/homeassistant/helpers/script.py\", line 726, in _async_run_long_action\n return await long_task\n ^^^^^^^^^^^^^^^\n File \"/usr/src/homeassistant/homeassistant/core.py\", line 2761, in async_call\n response_data = await coro\n ^^^^^^^^^^\n File \"/usr/src/homeassistant/homeassistant/core.py\", line 2804, in _execute_service\n return await target(service_call)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/config/custom_components/sonoff/init.py\", line 158, in send_command\n await cameras.send(deviceid, params[\"cmd\"])\n File \"/config/custom_components/sonoff/core/ewelink/camera.py\", line 160, in send\n self.sendto(device.init_data, device)\n File \"/config/custom_components/sonoff/core/ewelink/camera.py\", line 130, in sendto\n self.sock.sendto(data, device.addr)\nTypeError: a bytes-like object is required, not 'NoneType'", "count": 3, "first_occurred": 1726428751.4292014 } ], "device": { "uiid": 87, "params": { "partnerDevice": { "ezVedioSerial": "EWLK-xxxxxx-HMMLL", "partnerInfo": [ { "thirdPartyDeviceId": "EWLK-xxxxxx-HMMLL", "chipid": "EWLK-xxxxxx-HMMLL", "model": "GK-200MP2B", "vendor": "GK-200MP2B", "thirdPartyName": "eWeLink Camera", "addType": 2 } ], "p2pPasswd": "xxxxxxxxxxxxxxxx" }, "romVersion": "41220220712", "version": 7, "rssi": -44, "fwVersion": "41220220712", "infraredSetting": 0, "timeZone": -6, "motionStatus": 2, "cmd": "up" }, "model": "GK-200MP2B", "online": true, "local": null, "localtype": null, "host": null, "deviceid": "xxxxxxxxxxxx" } } } ``