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

Siren on Tapo C120 / C325WB not working #713

Closed
jeros45 opened this issue Nov 26, 2024 · 15 comments
Closed

Siren on Tapo C120 / C325WB not working #713

jeros45 opened this issue Nov 26, 2024 · 15 comments
Labels
Enhancement New feature or request Fixed Bug has been fixed.

Comments

@jeros45
Copy link

jeros45 commented Nov 26, 2024

Description

Hello,
I have the same problem described on this issue : #678
The bug was fixed on 5.6.2 version, but I have the problem with 5.8.1 version (but with another camera model).

I tried to remove and reconfigure the camera in Home Assistant, but the issue persists.

Reproduction Steps

1: Go to Settings
2: Click in Devices & services
3: Click on Tapo: Cameras Control
4: Click on the device
5: Click on "Manual alarm start"

Expected behavior

The siren should have been triggered on the camera

If applicable, add error logs.

File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2802, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2845, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1007, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/button/init.py", line 132, in _async_press_action
await self.async_press()
File "/config/custom_components/tapo_control/button.py", line 121, in async_press
await self._hass.async_add_executor_job(self._controller.startManualAlarm)
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pytapo/init.py", line 1714, in startManualAlarm
return self.performRequest(
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pytapo/init.py", line 619, in performRequest
return self.performRequest(requestData, loginRetryCount + 1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pytapo/init.py", line 621, in performRequest
raise Exception(
Exception: Error: Parameter to get/do does not exist, Response: {"error_code": -40106}

Device Firmware

1.1.7 Build 240529 Rel.57938n

Integration Version

5.8.1

Using stream component

Yes

Does camera work via official integrations?

Yes

Camera has all attributes filled out in developer tools

Yes

HASS Environment

Raspberry Pi 4

Search for similar issues

Yes

Additional information

The siren of the camera works when I use the Tapo application, in
1: Settings
2: Alarm
3: Kind of song

image

@JurajNyiri
Copy link
Owner

Could you please test if it works in 5.6.2?

@jeros45
Copy link
Author

jeros45 commented Nov 26, 2024

Hello,

I tried to downgrade to 5.6.2 version, delete and add again the camera, I have the same issue :

File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2802, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2845, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1007, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/button/__init__.py", line 132, in _async_press_action await self.async_press() File "/config/custom_components/tapo_control/button.py", line 125, in async_press await self._hass.async_add_executor_job(self._controller.startManualAlarm) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pytapo/__init__.py", line 1697, in startManualAlarm return self.performRequest( ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pytapo/__init__.py", line 621, in performRequest raise Exception( Exception: Error: Parameter to get/do does not exist, Response: {"error_code": -40106}

@JurajNyiri
Copy link
Owner

When you click the play sound in the app does it play on camera?

@jeros45
Copy link
Author

jeros45 commented Nov 26, 2024

Yes when I click on the play button the camera plays the siren.
I didn't enable the debug mode on camera, if you need more information :)

@JurajNyiri JurajNyiri changed the title Siren on Tapo C235WB not working Siren on Tapo C/120 C235WB not working Nov 27, 2024
@JurajNyiri JurajNyiri changed the title Siren on Tapo C/120 C235WB not working Siren on Tapo C120 / C235WB not working Nov 27, 2024
@JurajNyiri
Copy link
Owner

What does a siren switch do? Does it work?

@jeros45
Copy link
Author

jeros45 commented Nov 27, 2024

Hello,
The switch doesn't work, I have this error :

File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 245, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2802, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2845, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1007, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/siren/__init__.py", line 124, in async_handle_turn_on_service
    await siren.async_turn_on(
  File "/config/custom_components/tapo_control/siren.py", line 113, in async_turn_on
    raise Exception("Camera does not support triggering the siren.")
Exception: Camera does not support triggering the siren.

@JurajNyiri
Copy link
Owner

JurajNyiri commented Nov 28, 2024

That means all currently found and documented methods (2) on how to trigger the siren do not work. We will need to find the correct request that an app issues in order to implement this.

@JurajNyiri JurajNyiri added Help wanted Extra attention is needed Enhancement New feature or request labels Nov 28, 2024
@PetePeter
Copy link

my c720 siren also did not work.i dont really care much for that feature but can do a packet capture if you wish

@JurajNyiri
Copy link
Owner

@PetePeter yes that would be useful then I can implement a third call

@PetePeter
Copy link

PetePeter commented Nov 28, 2024

great I'll collect it tomorrow while wfh during lunch break along with the other one for the light.

does the packet capture need decryption or something? otherwise ill pass to you whatever my router picks up verbatim

@JurajNyiri
Copy link
Owner

JurajNyiri commented Nov 28, 2024

JurajNyiri/pytapo#128

This is the call as shown on screenshot above. This way it will only play the alarm for a few seconds though, which is different to other (unsupported on some cameras) methods and will require a (repeat) automation in Home Assistant.

@JurajNyiri
Copy link
Owner

Work is in progress at #716

@jeros45
Copy link
Author

jeros45 commented Nov 28, 2024

Hello,
Thanks for your help :)
Do you want capture network for the C325WB ?

@jeros45 jeros45 changed the title Siren on Tapo C120 / C235WB not working Siren on Tapo C120 / C325WB not working Nov 28, 2024
@JurajNyiri
Copy link
Owner

Fixed in https://github.com/JurajNyiri/HomeAssistant-Tapo-Control/releases/tag/5.8.2.

Siren (switch) will still not trigger siren if not supported, but manual start and stop should be working and depending on camera it might keep on going or stop automatically after a few seconds.

@JurajNyiri JurajNyiri added Fixed Bug has been fixed. and removed Help wanted Extra attention is needed labels Nov 28, 2024
@jeros45
Copy link
Author

jeros45 commented Nov 28, 2024

Thanks you very very much, the 5.8.2 works ! You are the best 💪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Fixed Bug has been fixed.
Projects
None yet
Development

No branches or pull requests

3 participants