Sky Q box switch

Looking a little deeper I’ve found this in the HA logs…

## Log Details (ERROR)

Fri Mar 15 2019 22:27:37 GMT+0000 (GMT)

Error running command: `/config/skyq.py {{command}}`, return code: 1

NoneType: None

Completely forgot to mention that you have to change the port in the sky.py file:

Thanks for that Jonny,

Could you possibly confirm the service data you are passing to the script?

Also any idea about the logs posted above?

Thanks so much!

WD

I am doing the same thing you are:

{“command”:“power”}

I only use it for power at the moment, haven’t had time to add the channels in yet.

I’m not really sure about the logs, I set it up as above and it worked first time!

Works perfectly here, many thanks!!!

Im struggling to get this to work - even on the cmd line:

pi@hassbian:~ $ sudo python3  /home/homeassistant/.homeassistant/custom_components/sky/skyq.py {135}
  File "/home/homeassistant/.homeassistant/custom_components/sky/skyq.py", line 89
    print "no parameters"
                        ^
SyntaxError: Missing parentheses in call to 'print'
pi@hassbian:~ $

and from home assistant when i try to run the service from the services i get:

Failed to call service shell_command/cmd_skyq_chno. [Errno 8] Exec format error 

Any ideas? I assume I’m running it on the cli wrong?

Thanks in advance

It’s a python 2 script, and your arguments aren’t formatted correctly. Try either

python  /home/homeassistant/.homeassistant/custom_components/sky/skyq.py chno 135

or just

/home/homeassistant/.homeassistant/custom_components/sky/skyq.py chno 135

Thanks all for the above. Relatively new to HA and been playing about well with the config and lovelace yaml’s, however all of the above has just blown my mind. any chance someone could call out the required steps of what code needs to go where ? i’m using a Pi3?

thanks in advanced

I keep getting an error when running the command.
‘Return code 127’
Does anyone know how to fix this?
Thanks in Advance

2 Likes

Would be great if someone could create a task so that you could get a misplaced remote control to beep.
This can be done by pressing the button on the front of the sky box for 5 seconds. If it could be added to HA it would be a killer feature.

having problems with this and wondering if someone can help, the web page works and updates the status in real time so I think there may be something needing altered in the value template… but I know nothing about it to be able to make a change.

here is what I have in my binary_sensors.yaml

- platform: rest
  resource: http://192.168.0.13:9006/as/system/information 
  name: SkyQ Lounge Power Status
  device_class: power
  value_template: ‘{% if (value_json.activeStandby == False) %}on{% else %}off{% endif %}’

as this is 4 years old I’m guessing it needs o be updated but like I said I have no idea how… any help please?

thankyou in advance

Unsure what exactly your issue is based on your comments. I have recently used some of the content above without issue, below is currently working for me.

Thanks for your reply, the issue is that the state does not update in home assistant. The sensor shows up with a state of “off” but remains off when I turn on the sky q box.
If I navigate to the resource url directly then the attribute the sensor is “reading” does indeed change to show the real-time state of the sky q box.

I noticed that you have it as a sensor, while above it is a binary_sensor so I tried both, however I have the same result, the only difference I can see is in the binary_sensor the state shows as off and in the sensor it shows as ‘off’ (notice the inverted commas).

I an to use this to turn my TV off with the sky q box using my broadlink rm Pro.

Any help is appreciated, thank you

Robin, I ran a test and agree with you, the binary_sensor does not work for me either in HA.

I’m not familiar enough with binary_sensor to explain why this is. The documentation suggests this should work. Can you explain the value of a binary over standard sensor?

Perhaps the solution is we use the media player instead of using the rest call.

All I can suggest is using the standard sensor, it works perfectly for me. :wink: