Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

object has no attribute 'debug' #18

Open
Ropuh opened this issue Feb 5, 2023 · 1 comment
Open

object has no attribute 'debug' #18

Ropuh opened this issue Feb 5, 2023 · 1 comment

Comments

@Ropuh
Copy link

Ropuh commented Feb 5, 2023

Can you tell me what is wrong? Port and pin are correct from hb setting.

opiz:~:# python3 hs.py -l
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/homescript/init.py", line 45, in getAccessories
interfaces.append({'iid':i['iid'],'description': i['description'],'maxValue': i['maxValue'],'minValue': i['minValue'],'minStep': i['minStep'], 'value': i['value']})
KeyError: 'minStep'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "hs.py", line 56, in
hs = homescript.HomeScript(HOSTNAME,PORT,AUTH, args.debug, sys.argv)
File "/usr/local/lib/python3.7/dist-packages/homescript/init.py", line 24, in init
self.getAccessories()
File "/usr/local/lib/python3.7/dist-packages/homescript/init.py", line 51, in getAccessories
if self.debug:
AttributeError: 'HomeScript' object has no attribute 'debug'
opiz:~:#
`

@a-mahr
Copy link

a-mahr commented Sep 16, 2023

This appears to be a duplicate of #16

I was experiencing this when my hs.py file had the __PORT__ set to the port I access Homebridge UI from.
It seems you can actually only control a single bridge OR child bridge from a single hs.py file at a time (rather than all accessories across all child bridges), since each child bridge has its own port.

Locate the port in your config for the child bridge you are trying to control, then try from there.

Note that you can look at the <body> tag of the response to curl -X PUT http://<host>:<childBridgePort>/accessories --header "authorization: <homeBridgeAuthKey>". If you get a response, and it has a very long head with the <body> tag containing only a few scripts and no accessories, that's a pretty good sign that your hs.py file is crashing because it found no accessories on the host/port/auth supplied.

Ideally, your response should look like a json object describing your accessories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants