Arming / disarming the Mini camera does not work
alistairuk opened this issue · comments
Describe the bug
Arming and disarming a Mini (owl) camera thought the library does not work.
To Reproduce
Steps to reproduce the behavior:
- Install everything and get the library working with everything else
- Arm the system
- Try and arm or disarm a mini camera ( though blinkpy/camera.py line 279 )
- Refresh the app to see if the change has actually happened
Expected behavior
The individual camera will be activated or deactivated (depending on the value parameter) and the "running man" icon will reflect this in the app after refreshing (exiting and reloading) the app.
blinkpy
version (not needed if filling out Home Assistant version):
https://github.com/fronzbot/blinkpy/blob/5337c2ea982ab3d6580fe7e48097f07882ceff90/blinkpy/camera.py
Log Output/Additional Information
I have also simulated this call outside the library and the "enabled" parameter appears to be a read-only. It reflects the setting but does not change it. Changing the device name using this method works so the call is otherwise good. My hypothesis is this setting is included in the GET for convenience, but a different API call that we do not yet know is used to change the setting.
Odd, I just confirmed this is working fine for me. Two questions:
- You used the command
blink.cameras['<camera name>'].arm = True
to arm, correct? - Is your mini attached to a sync module or standalone?
Odd indeed. Very odd.
-
Yes I believe I did. I have since moved on to testing with curl (I will paste some notes below) but will double check.
-
The mini is attached to a sync module. The camera firmware is 9.84 and the sync module is on 4.5.0.
As it works for you I am going to assume it is something different about my setup. I will try and set it up differently and see if I can get it to work and narrow down what it making it not work. I will report back with any findings.
For reference I have ended up testing with the following curl commands.
To view the current configuration (works) :
curl -H "token-auth: xxxxxxxxxxxxxxxxxxxxxx" https://rest-e006.immedia-semi.com/api/v1/accounts/xxxxxx/networks/xxxxxx/owls/xxxxxx/config
To disable the camera (does not work) :
curl -H "token-auth: xxxxxxxxxxxxxxxxxxxxxx" -d "enabled=false" https://rest-e006.immedia-semi.com/api/v1/accounts/xxxxxx/networks/xxxxxx/owls/xxxxxx/config
To change the camera name (works) :
curl -H "token-auth: xxxxxxxxxxxxxxxxxxxxxx" -d "name=Test Camera Newname" https://rest-e006.immedia-semi.com/api/v1/accounts/xxxxxx/networks/xxxxxx/owls/xxxxxx/config
I have tracked the issue not to the owl calls at though, but the authentication. I had customised the DEFAULT_USER_AGENT and
DEVICE_ID and one of these was causing the issue. I now use the original user agent and a shorter device ID and it now works. So not a blinkpy issue after all. Just another Blink oddity. Thanks for the response and sorry for the interruption.
No worries, glad you figured it out!