The only entity I have enabled on the overview is the binary sensor, not the switch. I’m not using the switch as it doesn’t actually do anything. Also, the turn_on and turn_off service code for the switch (script.sky_q_living_room_power) doesn’t actually work as there is no working script associated with turning on and off the box yet. I put it there as a placeholder for if & when a working switch should be created. Sorry, I should have mentioned that before but was writing in haste and now have a bit of time to look into it. You can do away with the switch code altogether and just use the binary sensor because basically all it’s doing is the following -
Checking the webpage you have defined, checking if ‘activeStandby’ is set to False, if it is, the sensor is to be ON meaning the SkyQ is on. If it is set to True, then the SkyQ is off.
I’m using Lovalace now but before, in my ‘groups.yaml’ file (the file that tells everything where it should be presented), I had this -
frontroom:
name: Living Room
entities:
light.front_room_light
media_player.front_room_tv
binary_sensor.skyq_living_room_power_status
media_player.apple_tv
remote.apple_tv
media_player.playstation_4
media_player.lounge
If you are now using Lovelace then, I have for the same room - (appreciate theres a lot more in there than needed for Sky but just so you see it in context)
title: Living Room
cards:
- type: entities
title: Lighting
entities:
- light.front_room_light
- type: entities
title: Switches
entities:
- binary_sensor.skyq_living_room_power_status
- remote.apple_tv
- type: media-control
title: Front Room TV
entity: media_player.front_room_tv
- type: media-control
title: Front Room AppleTV
entity: media_player.apple_tv
- type: media-control
title: Playstation 4
entity: media_player.playstation_4
- type: media-control
title: Sonos System
entity: media_player.lounge
Okay! This is starting to make sense now! Thanks for all of your help!
binary_sensor:
- platform: rest
resource: http://192.168.0.3:9006/as/system/information/
name: SkyQ Living Room Power Status
device_class: power
value_template: ‘{% if (value_json.activeStandby == False) %}on{% else %}off{% endif %}’
I now have this in my configuration.yaml and this is giving me a status on the home screen but this does not seem to responding to SkyQs actual status
You should notice the activeStandby entry change from true to false when the box is off (standby) and on. If the box is powered down completely then the page will be unavailable and the sensor will fail to connect. The box needs to be on standby and not totally off. My sensor doesn’t update instantly, it takes at least 15 seconds maybe more to poll the box and change from off to on etc.
So ive found that the following at least gives me a status of the skybox although not ‘perfect’
Sensor:
- platform: rest
resource: http://192.168.0.3:9006/as/system/information
name: SkyQ Living Room Power Status
device_class: power
value_template: ‘{% if (value_json.activeStandby == False) %}on{% else %}off{% endif %}’
I have a Harmony Hub and use this to control the skyQ box via the IR interface, with the rest interface this provides just enough functionality to do what I require. AFAIK the media player component for the skyQ box has been abandoned?
Yep! I just spotted that they’ve changed the SKYQ Port to match the SKY+HD one on the nodered pallete.
This is awesome! Thanks a lot!
Edit: @cameron sorry, how would I make a button or similar in the front end (lovelace) to start the inject (or whatever is required) in NodeRed?
I’m still a newbie with nodered, and the only automations I’ve made so far dont require interactions (light brightness changes etc).
Feel free to PM if you dont want to go off topic.
Has anyone created a custom media player or similar that has the SkyQ controls such as the navigation pad on it ?
up, down, left righ, enter as buttons ?