Scenegen returning nothing

Hi

Recently installed Scenegen on Ubuntu, however when I run it I get no errors, I only get the below.

Is there a log I can look at anywhere?

user@IB-HA:~/scenegen$ ./scenegen.py https://my.hass.instance:8123 -k myapikey
name: My New Scene
entities:

No logs, but it should just work. What entities do you actually have? It only works with lights and switches.

I have around 10 lights, 3 or 4 switches.

Not sure what is going on - if there was an error you would get a stack trace, if there is no error you should get a scene with every light and switch included. I just checked and it works fine for me, I’m on Ubuntu too. What type of lights and switches are you using?

I’m using Phillips Hue lights, as well as a couple of custom defined lights. Switches are MQTT switches and a couple of template switches.

Is there any kind of way I could see what steps it’s taking to come to an empty config? Even if it’s not erroring out I’d be interested to see what’s going on.

There isn’t any built in debugging but checking what gets returned from HASS would be a good first step.

You could add a line to print it out after line 82:

states = get_states(args.url, args.key)
print(states)

Thanks for the suggestion. I added print(states) under that line, however I get the following:

[]
name: My New Scene
entities:

So it would appear I’m getting no states at all.

I’m running this on the same Ubuntu machine that is running my HA… that shouldn’t make any difference should it?

Yes, that definitely explains why you are seeing no output - it doesn’t matter if it is on the same machine or another.

What version and flavor of home assistant are you running?

Hi, sorry I thought I’d replied to this.

Hass.io on an Ubuntu server.

Hi,

I’m having the same problem. I’ve tried adding in the python lines you recommended and get the same result:
[]
name: My New Scene
entities:

I’m afraid I’m running Wemo, Phillips Hue and Ikea Tradfri all at once.

I’m running Home Assistant on hassbian 4.14.98-v7+ and I’ll miss scenegen if I can’t get it working. It’s been invaluable since I’ve had Home Assistant running.

1 Like

I’m still struggling with this too. Being able to run scenegen would be the icing atop my home assistant cake!