Comments (6)
Perhaps your API key isn't valid anymore. Try deleting the .python_hue file and doing the registration/button push again
from phue.
I think I've figured it out. I'm not totally sure what happened to make it stop working but giving the bridge a username as part of the bridge init (which in phue.py says is optional, and is not used in examples). In the past whenever there was an update I would just get an error telling me to push the button and then it would work, this time I actually had to put in the username. Did some API change or is this just my computers being weird?
from phue.
It's probably because your api key got deleted in the bridge after the update.
you should be getting an error message however.... I'll look into it.
Does it work now without providing a username ?
lecaude.com
studioimaginaire.com
Le 2014-07-12 à 03:18, Charlie [email protected] a écrit :
I think I've figured it out. I'm not totally sure what happened to make it stop working but giving the bridge a username as part of the bridge init (which in phue.py says is optional, and is not used in examples). In the past whenever there was an update I would just get an error telling me to push the button and then it would work, this time I actually had to put in the username. Did some API change or is this just my computers being weird?
—
Reply to this email directly or view it on GitHub.
from phue.
I actually changed the bridge init method because I didnt want to go though and change all my scripts.
# def __init__(self, ip=None, username=None):
def __init__(self, ip=None, username="newdeveloper"):
when I change back to username=None, I get the error above. I remember throwing in some prints to debug what might be the problem (wish I had logged them!) and remember seeing somewhere that it was trying to interact with the bridge using some seemingly random username (along the lines of /api/asd6sdf6876sdf/...). I dont know if this helps at all but it would explain the error above since it a random username would be invalid. I actually figured out it was a username issue originally by printing the light object from the error above (before crashing) and got this output:
{u'error': {u'type': 1, u'description': u'unauthorized user', u'address': u'/lights'}}
I dont know if that helps at all... I'm not much of a python developer, I mostly work with AVR micros so this is mostly just me fumbling around.
from phue.
Having this same issue, after not running my script for a long time
debug info:
>>> b.get_api()
[{u'error': {u'type': 1, u'description': u'unauthorized user', u'address': u'/'}}]
from phue.
That worked, thanks! I just had to push the button again too. Otherwise, I got this error:
Traceback (most recent call last): File "<pyshell#4>", line 1, in <module> b = phue.Bridge('192.168.1.76') File "C:\Python27\lib\site-packages\phue.py", line 427, in __init__ self.connect() File "C:\Python27\lib\site-packages\phue.py", line 551, in connect self.register_app() File "C:\Python27\lib\site-packages\phue.py", line 519, in register_app 'The link button has not been pressed in the last 30 seconds.') PhueRegistrationException
from phue.
Related Issues (20)
- ConnectionResetError: [Errno 54] Connection reset by peer HOT 2
- Python Hue Config File Location HOT 4
- Phue --host error
- Syntax error on "is not" operator usage on Python 3.9 HOT 1
- Proposing a PR to fix a few small typos
- No route to host HOT 4
- new 40 second delay? HOT 1
- Wrong Color HOT 1
- get_ip_address method isnt working
- Log level for scoped logger set wrong
- release 1.2 HOT 4
- use unittest.mock instead of mock HOT 1
- Timing out HOT 1
- schedule gets accesoires
- Stop the entertainment stream
- Is the smart plug supported? HOT 1
- How do scenes work?
- TypeError: list indices must be integers or slices, not str HOT 4
- set_light vs set_group : discrepancy
- occasional socket.error: [Errno 111] Connection refused requiring physical reboot?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phue.