#Using the service calls shouldn’t be _

1 messages · Page 1 of 1 (latest)

wary scaffold
#

The problem is, each time I call reolink.ptz_move, it moves it to the end stop in that direction

#

No stop signs, actually with speed limits, but unless anyone calls the service with the stop command button, it will keep going.

#

So right now I'm putting together scripts that call that after 500ms.

#

And since I don't want to do four scripts per camera, I am looking into passing the direction and the device in by parameter and then finding the entity using a template.

#

The problem being me having not the slightest idea what that parameter of type device will contain.

livid axle
#

Don’t use device. Use the camera entity (so, entity type field).

wary scaffold
#

The problem is that there isn't ONE entity, there's a whole 59 for the one camera I've added so far.

#

PTZ is modelled as an even dozen buttons.

livid axle
#

The PTZ move service takes a single entity.

#

You don’t need to pass a device. Just pass the camera.[whatever] entity.

wary scaffold
#

yes, one of the buttons, which determines the direction 😉

#

It's insane, but in a loony bin, they don't vote for the sanest for president.

livid axle
#

Ahhhh, gotcha.

#

Ok, so what about just using PTZ presets?

wary scaffold
#

Wouldn't work, because of the zoom function. That requires more control than a preset could provide.

livid axle
#

Ah, gotcha it… You love complicating shit 😉 lmao

wary scaffold
#

Yeeees, I do have a bit of a talent for finding the most complicated shit, haven't I?