dbuezas / icsee-ptz

56 stars 10 forks source link

ptz Stop not working #34

Closed LucaCraft89 closed 2 months ago

LucaCraft89 commented 7 months ago

The problem it's easy to understand, when i press the button in ha the capera moves but does not stop in anyway, and mannulay calling the stop service does not work, help me i have been going thru many configuartion panels and nothing works, i am going thru a dvr

dbuezas commented 7 months ago

Sorry to hear that. There's actually no specific stop command to stop the camera, so the integration sends does await self.cam.dvrip.ptz("DirectionUp", preset=-1), which in most cameras does the trick. Try sending DirectionUp with other preset number, maybe some other works for your specific camera

LucaCraft89 commented 7 months ago

Thanks, analyzing the calls from the website of the DVR it seems that the stop is preset -1, but I can't sand it thru home assistant, would you mind helping me figure out how to do that thru ha?

dbuezas commented 7 months ago

You can test it via Develoer Tools

Screenshot_20240213-150002

LucaCraft89 commented 7 months ago

I already tried it doesn't let me go below 0

dbuezas commented 7 months ago

Oh, you'll have to hack the code a bit then.

Don't worry if you don't know how to program, just replace the text as indicated and and you'll be able to test it. If anything breaks, just uninstall and reinstall the component and all the files in the folder will be restored

LucaCraft89 commented 7 months ago

OMG thank you soo much

LucaCraft89 commented 7 months ago

hi, @dbuezas i have changeed the line to -10 but i am still getting error

Failed to call service icsee_ptz/move. value must be at least 0 for dictionary value @ data['preset']

dbuezas commented 7 months ago

Did you restart home assistant?

LucaCraft89 commented 7 months ago

Yes, I did, even tried restarting the whole OS

dbuezas commented 7 months ago

Uhm. I don't know why that could be maybe delete and read the device?

Btw, you already know -1 doesn't work have you tried positive numbers?

LucaCraft89 commented 7 months ago

You mean deleting and adding it again?

And yes but I need it to make the movement stop since the Stop does not work

dbuezas commented 7 months ago

Yes, delete and re-add the device

LucaCraft89 commented 7 months ago

Ok I'll try