Just wanted to say thanks for scenegen - brilliant. Not had time to play with it fully but first try worked great.
Excellent - glad to hear it is useful to others
I’m having some issues with this, but I am hoping that using the map option might help. I think my problem is that I am pulling the Hue lights from both the Wink Hub and the Hue Hub. Even though I have the Wink Hub lights hidden, Scenegen was using them instead of the proper lights and it resulted in colors that were completely off from what I expected. I’ll let you know how it works out with the map later on today.
Also if you get a chance could you fix the API password logic to account for special characters like “!”?
Let me know how it works out - if it continues to be a problem I should be able to figure out how to get scenegen to honor the hidden attribute.
Regarding the password - what errors are you getting? It is likely a shell issue you can fix by putting the password in single or double quotes.
I don’t remember the error off hand but I’ll try the quotes, thanks.
I figured out my problem - I wasn’t specifying the color method. Duh. Using map helped get rid of the hidden items; I forgot to use the index so I had to delete a few lights, but I’ll remember that next time.
I haven’t changed my password because I’m still struggling with encryption and don’t want to add any variables but I’ll try that soon and get back to you with the error.
Glad you got this working at least - hopefully someone can help you with the SSL piece
Yeah, once you do it right, it’s sweet. I just set up one of my presets on the Hue app and then “gen” it. I copied the command down so I can copy and paste it each time I want to generate scenes. I just did four of them in a few minutes where it would have taken me 30 minutes at least.
I also renamed my scenes to be a bit more Alexa friendly. I have haaska running and if I ever get the SSL thing worked out, I’m going to try my hand at intents. I gave another look at you Friday afternoon post and the docs and I’m not as put off as I was before.
Thanks again for this great program!
I’d be interested to hear any tips on how you got hasska to work for you - I probably gave up too easily. Glad 'genning is working for you!
I followed the steps in @brusc’s video, but Ben left some stuff out. When you set up AWS and the other services, you have to stop the video and if you full screen it, you can see the stuff he forgot to mention. Also, he uses a test example that he said he would put below the video, but he must have forgotten so once again, I paused the screen and copied it. It’s only one or two fields, but they make the difference.
Yeah… sorry about that. The HAASKA video isn’t the greatest. I did it retrospectively which is never a good idea. Sorry if I missed some things. You can definitely pause to pick up the missing info. The info on the HAASKA page is also great, too, so check that for a second source.
The link to the test is in this github issue linked below the vid. I might have added it later so sorry if it wasn’t there when you needed it, @rpitera.
@aimc, let me know if you need any help! Happy to do what I can. Sorry HAASKA is such a pain… I blame Amazon for that one. Maybe Google Home will do a little better… if they ever put out an API…
Thanks brusc -
Yes Hasska itself is awesome, it’s just the Amazon piece that is less than stellar. I have about 15 lights and as many scenes and Alexa just could never pick the right one. I have a lot more control with the second method so I will stick with it for now at least.
Hi,
I try to figure out what the standard light recipes are from my hue’s (read/concentrate/relax/stimulate) and I try to use scenegen. But I am not getting further. Can someone please give me some clues?
this is what I get now:
./scenegen.py http://192.168.1.12:8123
name: My New Scene
entities:
Traceback (most recent call last):
File “./scenegen.py”, line 94, in
main()
File “./scenegen.py”, line 88, in main
output_attrs(state, args)
File “./scenegen.py”, line 25, in output_attrs
parts = state[“entity_id”].split(".")
TypeError: string indices must be integers
Working fine for me - it would seem that there is something unexpected in your Home Assistant state - or at least something I haven’t come across on my system. If you would help me debug I’ll try and get a fix out to you.
Could you add this line to scenegen.py at line 25:
print(state)
So it looks exactly like this:
def output_attrs(state, args):
print(state)
parts = state["entity_id"].split(".")
type = parts[0]
Make sure there are spaces in front of the print not tabs. Then run it and send me the output, either here or via a PM,
Thanks!
@bart - Another user ran into this and helped me debug it - you probably didn’t specify your password. If that is not it, I am just about to release a new version with better error reporting.
Just pushed a new version with improved error checking after @MikeCranium graciously helped me track down an error that should have been obvious if my code checked for it!
Version 1.1
- Add better error checking for Home Assistant errors
Thanks! I didn’t had time to try. Am on holiday now.
Would be great if you put in your readme a short explanation for install for noobs. I found out I had to clone your git and then something else (which I now forgot).
And with password you mean the Api key?
Next week I am going to test it.
Thanks for the feedback, I’ll see what I can do
EDIT: Done!
Version 1.2
- Add installation instructions
After installation according your GitHub page, I had to : sudo chmod 755 scenegen.py , and then it did work!!! Thanks!! Very useful for the hue lights
Cool! I’ll add that step to the instructions.