home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.84k stars 28.95k forks source link

Reolink E1 Zoom camera siren does not sound #118185

Open SmartHome-AIG opened 1 month ago

SmartHome-AIG commented 1 month ago

The problem

The siren of my multiple Reolink E1 Zoom cameras has stopped sounding when clicking on the SIREN entity. I don't know when it stopped working.

What version of Home Assistant Core has the issue?

core-2024.5.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Reolink

Link to integration documentation on our website

https://www.home-assistant.io/integrations/reolink

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 month ago

Hey there @starkillerog, mind taking a look at this issue as it has been labeled with an integration (reolink) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `reolink` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign reolink` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


reolink documentation reolink source (message by IssueLinks)

starkillerOG commented 1 month ago

Please enable debug loging, click the siren play entity, wait 1 minute, disable debug logging and post the resulting log.txt here. https://www.home-assistant.io/docs/configuration/troubleshooting/#enabling-debug-logging

starkillerOG commented 1 month ago

Please also download the diagnostics of one of the not working E1 zooms: https://www.home-assistant.io/docs/configuration/troubleshooting/#download-diagnostics

SmartHome-AIG commented 1 month ago

Good night. First of all, thank you for the quick response. Here are the requested files. I hope they'll be useful.

config_entry-reolink-xxxxxxxxxxxxxxx.json home-assistant_reolink_2024-05-26T20-06-18.136Z.log

starkillerOG commented 3 weeks ago

@SmartHome-AIG sorry for my late response, so during this test you did not hear anything from the siren? The API returns a 200 OK, so from the API side everything seems to working. The volume is set to 40%, so that should be enough to at least hear something.

If you go into the reolink app and sound the siren there, does it then work?

Could you try the siren.turn_on service with the duration set?

service: siren.turn_on
target:
  entity_id: siren.doorbell_siren
data:
  duration: "3"
  volume_level: 0.9
SmartHome-AIG commented 3 weeks ago

Good night.

Using the official Reolink app, the sirens sound.

I have tried launching the service as you suggest and yes, this is how they sound, so at least I will be able to program them for a possible intrusion.

The strange thing is when I click on the entity siren.cam_siren, nothing at all.

Captura 2024-06-15 22 01 41

Captura 2024-06-15 22 02 00

By the way, thank you very much for taking the time for me. And thank you very much for your contribution to Home Assistant.

Greetings

starkillerOG commented 3 weeks ago

Thanks for the additional info.

Hmmm that is intresting, so your camera does not support turning on the siren indefinetly (altough the API does respond with OK), but when using the amount of times it should sound it works perfectly fine.

Will look into if I can figure out a supported feature flag that would indicate this.

starkillerOG commented 3 weeks ago

If you appreciate the reolink integration and want to support its development, please consider sponsering the upstream library or purchase Reolink products through this affiliate link.

starkillerOG commented 2 weeks ago

@SmartHome-AIG one additional test:

If you turn on the siren using the service with for example duration: "20" (a long time) and then go to the siren entity and press the stop/turn off button, does it actually stop the siren or does it continue playing the 20 times?

(You can temporarily lower the camera volume to not annoy anyone with this test).

SmartHome-AIG commented 1 week ago

Good afternoon.

I have tried to do what I was suggested. Activate the siren using the service for about 30 seconds, and try to turn it off using the power off entity. There has been no luck. The siren has continued sounding until time runs out. I have also tried turning it off with the "siren.turn_off" service. It hasn't worked either.

It seems, as far as the siren is concerned, we can only turn it on (with the service), not turn it off.

If you need me to do more tests, just ask.

Greetings

starkillerOG commented 1 week ago

@SmartHome-AIG thank you for testing. In that case I do not see an easy fix for this, there is one last longshot I would like to try. Are you able to run the following python script:

import logging
import asyncio
from reolink_aio import api

_LOGGER = logging.getLogger(__name__)
logging.basicConfig(level="DEBUG")

IP = '192.168.1.FILL_THIS_IN'
username = 'FILL_THIS_IN'
password = 'FILL_THIS_IN'

async def asyncio_demo(loop):
    host = api.Host(host=IP, username=username, password=password)

    body = [
        {
            "cmd": "AudioAlarmPlay",
            "action": 0,
            "param": {
                "alarm_mode": "manual",
                "manual_switch": 1,
                "channel": 0,
            },
        }
    ]

    print(await host.send(body))

    await host.logout()

if __name__ == "__main__":
    loop = asyncio.new_event_loop()
    asyncio.set_event_loop(loop)
    loop.run_until_complete(asyncio_demo(loop))

The actual command that is beeing used by HomeAssistant has "alarm_mode": "manul", that is according to their API docs and also works on all of my cams. However Reolink made a typo in that command (in their firmware), so maybe they fixed the typo and it is now "manual" instead of "manul".

I tried again but my cams respond with a parameter error when I send "manual" and work when sending "manul".......

But we can try it out on your cam.

starkillerOG commented 1 week ago

Of course fill in the IP, username and password. then save as a test.py file on your PC. Then in command line run python "path/to/where/you/saved/the/file/test.py"

you may need to install the reolink-aio module: pip3 install --upgrade reolink-aio

SmartHome-AIG commented 5 days ago

Good night.

It seems that it happens to me like you, that it gives me "param error" with "manual" I attach here the console outputs with the 2 possibilities:

Greetings

starkillerOG commented 1 day ago

@SmartHome-AIG unfortunately in this case it seems to be an issue with the firmware of the camera. Could you please contact Reolink support, explain the issue and ask if they can fix the [{'cmd': 'AudioAlarmPlay', 'action': 0, 'param': {'alarm_mode': 'manul', 'manual_switch': 1, 'channel': 0}}] command? https://support.reolink.com/requests/

1 last thing you could try is remove the "channel": 0 from the command. so run this script:

import logging
import asyncio
from reolink_aio import api

_LOGGER = logging.getLogger(__name__)
logging.basicConfig(level="DEBUG")

IP = '192.168.1.FILL_THIS_IN'
username = 'FILL_THIS_IN'
password = 'FILL_THIS_IN'

async def asyncio_demo(loop):
    host = api.Host(host=IP, username=username, password=password)

    body = [
        {
            "cmd": "AudioAlarmPlay",
            "action": 0,
            "param": {
                "alarm_mode": "manul",
                "manual_switch": 1,
            },
        }
    ]

    print(await host.send(body))

    await host.logout()

if __name__ == "__main__":
    loop = asyncio.new_event_loop()
    asyncio.set_event_loop(loop)
    loop.run_until_complete(asyncio_demo(loop))