jlusiardi / homekit_python

A python implementation to work as both HomeKit controller and accessory.
Apache License 2.0
220 stars 41 forks source link

Request denied due to insufficient privileges #245

Closed ulrichpa closed 2 months ago

ulrichpa commented 1 year ago

Hi, I was had a successfull integration of my velux gateway and was able to control my windows. I was follwing the description here. However, I had to re-setup my openhab system and now I'm struggling to get the homekit integration running.

I can run the homekit.discover with the following output:

/home/openhabian/.local/lib/python3.9/site-packages/zeroconf/_services/browser.py:178: FutureWarning: <homekit.zeroconf_impl.CollectingListener object at 0xb5aa1418> has no update_service method. Provide one (it can be empty if you don't care about the updates), it'll become mandatory. warnings.warn( Name: VELUX gateway._hap._tcp.local. Url: http_impl://192.168.1.134:5001 Configuration number (c#): 9 Feature Flags (ff): Supports HAP Pairing (Flag: 1) Device ID (id): 35:8C:C3:41:1E:D9 Model Name (md): VELUX Gateway Protocol Version (pv): 1.1 State Number (s#): 1 Status Flags (sf): Accessory has been paired. (Flag: 0) Category Identifier (ci): Bridge (Id: 2)

So obviously the the gateway is still paired. But if I run the homekit.identify command I get the following error: /home/openhabian/.local/lib/python3.9/site-packages/zeroconf/_services/browser.py:178: FutureWarning: <homekit.zeroconf_impl.CollectingListener object at 0xb5a8f3d0> has no update_service method. Provide one (it can be empty if you don't care about the updates), it'll become mandatory. warnings.warn( identify failed because: Request denied due to insufficient privileges. (-70401).

Any Ideas what is going on here? Any suggestions?

Many thanks

jlusiardi commented 1 year ago

Hi,

by " I had to re-setup my openhab system" you mean you started over from scratch and did not backup the file containing the HomeKit Pairing data? If so, you have to unpair the VELUX Gateway Device first (should be in the documentation on how to do that). Than repairing it to openhab should work again.

Greetings Joachim

ulrichpa commented 1 year ago

Hi @jlusiardi

many thanks for your help. You are correct, I reinstalled openhabian from scratch and unfortunately I did not backup the file with the homekit pairing data... I tried to unpair the VELUX gateway already but the following error occurs:

openhabian@openhabian:~ $ python3 -m homekit.remove_pairing -f velux -a velux "velux" is no known alias

Any Ideas?

jlusiardi commented 1 year ago

No you need to unpair the device on the device side. This should be explained in the documentation given you from Velux.

ulrichpa commented 1 year ago

Thanks for the hint @jlusiardi , I 'll give it a try right now. Reporting once succeeded

ulrichpa commented 1 year ago

Window Control is working again, thank you very much for your (extremly fast) help @jlusiardi .

Another Question that popped up already before. As I said, running the command to open the windows in the openhab console works well. However, if I try to set ap an execute item running the command, it says

Exec [OUTPUT]: 'Could not open "velux" because it does not exist'

I installed everything under sudo and also run the exec command under sudo. Any ideas?

jlusiardi commented 2 months ago

I don't really know openhab. I'll close this ticket here ;)