Hi all,
I would like to us my presets in an automation. I found this site GitHub - fwestenberg/reolink_dev: Home Assistant Reolink addon where it explains you have to use a call service to address the ptz presets. The only thing I am struggling with is that I don’t know exactly that to put in the service data field. Could someone explain it to me with an example?
Thanks!
Aaron
PS I am making the automation visually, not in yaml.
service: reolink_dev.ptz_control
target:
entity_id: camera.reolink_e1_zoom_1
data:
preset: HOME
I get this error:
Failed to call service reolink_dev.ptz_control. expected int for dictionary value @ data[‘preset’]. Got None required key not provided @ data[‘command’]. Got None
Hi, I´m using this thread, since the topic is similar, yet the challange is a bit different. Still hoping for some help:
I integrated my Reolink Camera with the now available official integration (and not the github version from above). All works fine. When using the YAML code to go for presets though, it says: " … Service not found".
Could it be, that the services are not (yet) realized in the officially supported integration?
Thanks, Peter
@PBloomberg There is no ptz_control service in the official integration, instead there is a select entity for the presets.
Therefore use the select.select_option service to move the camera to any of the configured presets.
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.
Hi @starkillerOG I’m new to this and trying to work out how to use select in an automation.
I have found the entity I want to use select.my_cam_ptz_preset but I don’t understand how to use that in an automation to make the camera turn to preset 1 for example.
I can’t see any documentation on the official Reolink integration that I understand on this topic.
Hi @neast25,
There is no Reolink documentation for this since this is general for all select entities of all integrations, but this is how you set it up:
In HA go to ‘Settings’ → ‘Automations’ → select the automation you want to edit or create a new one → under actions select ‘call service’ → use the ‘select.select_option’ as the service → chose as entity the ‘select.my_cam_ptz_preset’ → as option type the ptz preset that you want the camera to move to.
Under the ‘Developer Tools’ in Homeassistant you can find the list of available ptz presets that you can use, under ‘states’ find the ‘select.my_cam_ptz_preset’ and look at the ‘options’ list.
Note that the option in the automation must match exactly one of these available options.
@starkillerOG
Thanks for this guidance
I have managed to get my cameras to turn to a preset position by following your guidance on the use of select.select_option using a Scripts instead of Automations then by adding a card by entity (name of script) to Lovelace dashboard.
Thanks again for your help
You could also just add the ‘select.my_cam_ptz_preset’ entity to a type: entities lovelace card. That will give you a dropdown menu, if you select any of the presets from the dropdown, the camera schould move to the position you selected.
But if you prefer buttons, indeed creating a script will work.
However it can be done simpler if you just want to add it to the frontend as a button using the button card:
Yeah, I noticed that option via the default card for a camera, but in my case I want to control multiple cameras (all internal ones when I am in the property) to the wall on one action and stop them recording so the script allows me to do that in one action by clicking run. Well at least the PTZ preset part for now, I will add the record part later.
I am also considering other ways to trigger the action such as presence detection or webhook from another service or a physical button too. But all that is for another day, now I am playing about with layouts to make a nice layout for the sub streams and controls on a single view.
Yes, In that case a script makes perfect sense!
Probably GPS tracking of the phones of all family members using the official HomeAssistant app is the nicest way to automatically “turn off” your cameras.
However if you consider that as too privacy invasive, tracking wifi connections of the same phone to your router using a HomeAssistant integration for your router is a good alternative.
Hi @starkillerOG I’m trying to add a shortcut to a webrtc camera card.
a shortcut to move the camera to a preset.
for example to make the camera turn to preset 1.
Hi, It seems I don’t have the “select.my_cam_ptz_preset” entity. Searched for PTZ or Preset, nothing related came up. I am on latest HA and have everything configured and working regarding the Reolink side of things, and I get the camera feed in HA. Presets are working in the Reolink app.