Open darkbluedad opened 2 years ago
To make the code more elegant I'm using a consistent 5 character prefix for the ID for appliance/scenes so I can check the first 5 characters of endpointId to select the Port.
port = int(environ['PORT']) zzzzz = endpointId[:5] if zzzzz == 'study': port = int(environ['PORTSTUDY']) s.connect((environ['HOST'], port))
Just realised that I can use wake-up scenes to avoid having to use sky’s sleep function. I can run an Alexa routine to power down the boxes overnight and wake them again in the morning.
Haven't tested it or anything, but this commit might help. Obviously you need to add your skybox-002 in appliances again. It won't work for any 'scenes' eg netflix, spotify etc, as then the endpointId becomes the scene name. If you wanted them, you could add them in appliances as well, with a different applianceId, and different friendly name. Then you could edit the code to something like:
if endpointID == 'skybox-002' or endpointID == 'skyq-netflix-2':
Hope that helps, let me know if it works.
Originally posted by @ndg63276 in https://github.com/ndg63276/alexa-sky-hd/issues/11#issuecomment-581611034