rroller / dahua

Dahua Camera and Doorbell Home Assistant Integration
MIT License
382 stars 73 forks source link

Service call to play audio tone #294

Open Sian-Lee-SA opened 1 year ago

Sian-Lee-SA commented 1 year ago

I had just received the IPC-HDW3649H-AS-PV-ANZ today and deployed your integration and things seem good, the Light Alarm (red blue) works and the siren (although I had to restart Home Assistant for this switch to show) so kudos on all that!

As I continue to play around with the device and it's webpage, I've succesfully uploaded custom "Alarm Tones" and played them via the web interface. My request would to have a service call where I could play these tones (depending on name, id or whatever) directly from Home Assistant.

I figured I could implement this by reviewing your code and cross reference with the network tab on the browser but would appreciate if this was native to your integration.

image

FWIW: The siren seems to use the alarm.wav file

Sian-Lee-SA commented 1 year ago

Just got this working in using Node-Red and triggering via Home Assistant Event using RPC.

I noticed you have the rpc being worked on in your integration but don't really see it being used. If you do expand on this then I'm happy to send my flow if needed.