My Scene Workflow

Hi There,
I have been trying to use the scene generator, but I ran into the following issue:

I tried this:

./scenegen.py https://192.168.1.99:8123

Then I tried this:

./scenegen.py https://192.168.1.99:8123 -k MyKey

An I got the same error:

ssl.CertificateError: hostname ‘192.168.1.99’ doesn’t match 'MyDomain.duckdns.org

It seems that it does not like something with the letsencrypt.

My configuration is fine since I am able to use haaska and, I can access my HASS from the outside using encryption and locally too.

Any ideas?

Are you running it from outside the pi? I would try it without https.

If you are using SSL you have to use the duck DNS name not just the IP address - that is the way SSL works.

Sorry I should have stated that I tried to run it like that first, but I got a timeout error:
./scenegen.py https://MyDomain.duckdns.org -k MyKey

(File “/usr/lib/python3/dist-packages/urllib3/util/connection.py”, line 78, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out )

And since I am trying to run this command internally from the same RPI that has my HASS, I gave it a try with no luck.
Thanks!

That may be a problem with your router forwarding then.

I tried this today since I’m just startingout with scenes but I keep getting the following error:
pi@raspberrypi:~/scenegen $ ./scenegen.py http://localhost:8123
-bash: ./scenegen.py: Permission denied

If i try and run it with sudo I instead get:
sudo: ./scenegen.py: command not found

@rpitera
Struggled for a while, but finally get to the part to create the .yaml, and get the following:

“-bash: scenes/my_scenes.yaml: No such file or directory”

After running:

“$ ./scenegen.py http:// -k > scenes/my_scene.yaml”

I tried creating the my_scene.yaml in the scenes directory manually, but same response.

If I run: "$ ./scenegen.py https:// -k " I get the output list displayed.

Am I misunderstanding the process or what is actually supposed to happen?

An ideas?

I haven’t used SceneGen in awhile, but I remember writing down the command line so I wouldn’t forget it:

sudo ./scenegen.py http://192.168.1.181:8123 -k API_PASSWORD -m map.cfg -c xy_color

Not sure if this helps you. @aimc is on the road at the moment but once he gets back I’m sure he’ll check in.

If you are able to get the output displayed, then you should be able to copy it from the screen and paste it into a yaml file though. Does this work?

“$ ./scenegen.py http:// -k > /scenes/my_scene.yaml”

Did you actually specify a full URL?

I think so since he said that when he runs it without redirecting the output he gets a valid output on the screen.

I’m thinking it’s his path statement.

@rpitera
Hey guy’s,
Yes I did, as bellow.
./scenegen.py http://192.168.200.210:8123 -k XUNXINSUN > scenes/my_scenes.yaml

Got the following.
-bash: scenes/my_scenes.yaml: No such file or directory

Before you guy’s go crazy trying to figure this out, what exactly is supposed to happen after running the command?

P.S. I created the directory and .yaml manually

You should get a long list of your lights as well as the attributes for each. It’ll be in a YAML format ready for copy and paste into a scene file.

In a .yaml file or within putty?

If you’re not specifying a redirect to a file, then in Putty right on the screen.

Do you have a scenes subdirectory in the directory you are running from?

That’s what I get.

With: ./scenegen.py http://192.168.200.210:8123 -k XUNXINSUN , I get the list in putty.

With: ./scenegen.py http://192.168.200.210:8123 -k XUNXINSUN > scenes/my_scenes.yaml

I get: -bash: scenes/my_scenes.yaml: No such file or directory

Yes, I created the /scenes directory in the /.homeassistant directory.

But you aren’t running it from the /.homeassistant directory so it doesn’t know how to find the scenes directory. You need to use a full path name.

1 Like

I see, the scenes directory should be created in the scenegen directory since that’s where
i’m executing the command.

Guess what?

That actually worked, I now have a brand new shiny “my_scenes.yaml” file in the scenes directory.

1 Like