Is it possible to control Sky HD box?
Moderator: leecollings
- leecollings
- Posts: 167
- Joined: Tuesday 30 June 2015 18:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: United Kingdom
- Contact:
Is it possible to control Sky HD box?
Hi everyone, this is my first post. I don't like being the new person!
My name's Lee, and I'm from the UK. I'm looking at using Domoticz to mainly control my LightwaveRF doorbell.
I'd like it to do some extra stuff such as send notifications to my iPhone, and iPad (and Mac if possible).
But I'd also like it to send a Pause command to our Sky box. I managed to do this from my Macbook using a python script from lgladdy, but since then he has advised me to use a much quicker method found here: https://github.com/dalhundal/sky-plus-hd
My question is, is this possible to set as an action when the doorbell is pressed?
My name's Lee, and I'm from the UK. I'm looking at using Domoticz to mainly control my LightwaveRF doorbell.
I'd like it to do some extra stuff such as send notifications to my iPhone, and iPad (and Mac if possible).
But I'd also like it to send a Pause command to our Sky box. I managed to do this from my Macbook using a python script from lgladdy, but since then he has advised me to use a much quicker method found here: https://github.com/dalhundal/sky-plus-hd
My question is, is this possible to set as an action when the doorbell is pressed?
- 1bigwink
- Posts: 11
- Joined: Wednesday 17 June 2015 21:07
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Wiltshire, UK
- Contact:
Re: Is it possible to control Sky HD box?
Hi Lee, Welcome from another newbie! The answer to your question is a BIG yes - and you can do lots more too! If you're not familiar with writing scripts then check out the wiki (and forum) for using Domoticz's 'Blockly' wysiwyg events interface
I'm using a Mac too and there are some great ways in Domoticz to force alerts - e.g. email, Twitter etc and even 'push' notifications to Android and iOS devices.
Lots of info on the forums if you search but any questions then feel free to ask, there are tonnes of people on this forum who are more than happy to help
I'm using a Mac too and there are some great ways in Domoticz to force alerts - e.g. email, Twitter etc and even 'push' notifications to Android and iOS devices.
Lots of info on the forums if you search but any questions then feel free to ask, there are tonnes of people on this forum who are more than happy to help
1x RasPi, RFXtrx433e, v5 Aeon ZWave, MD210R Door Contacts, MC335R PIRs, MD326 Siren, 25 x MiLight RGBW Bulb (4 x WiFi Contoller), 12 IP Cam, Fibaro FGS221, 5x433mhz venetian blind, 433mhz TV ceiling lift.
Next: Touchscreen + frontpage.html
Next: Touchscreen + frontpage.html
- leecollings
- Posts: 167
- Joined: Tuesday 30 June 2015 18:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: United Kingdom
- Contact:
Re: Is it possible to control Sky HD box?
Hey,
I'm not sure I'm going to be using that block interface, as it just doesn't seem to be very easy to understand.
I believe all I need to do, is included the files that I linked to, and then create a script file that includes those files, and then has the pause command.
My problem is, I have no idea exactly how to do this. If you're able to maybe just provide me with an excerpt of code to explain this, I would appreciate it.
I'm not sure I'm going to be using that block interface, as it just doesn't seem to be very easy to understand.
I believe all I need to do, is included the files that I linked to, and then create a script file that includes those files, and then has the pause command.
My problem is, I have no idea exactly how to do this. If you're able to maybe just provide me with an excerpt of code to explain this, I would appreciate it.
- leecollings
- Posts: 167
- Joined: Tuesday 30 June 2015 18:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: United Kingdom
- Contact:
Re: Is it possible to control Sky HD box?
Just to give an update on this...
I've been talking to a guy called Dal who has written a node.js script to control Sky HD boxes from the terminal, and he's been helping me compile a script for Domoticz to run a 'daemon' like service in the background that opens the connection with the sky box, and for a script to send a pause action that will hopefully be triggered when the doorbell is pressed.
So far, I'm able to send commands via the terminal to pause the box, and it seems to be working well. At present, the delay between sending the command, and the box pausing is about 10 seconds (this is because each command has to connect to the box though).
Once the daemon is set up, this should be instantaneous. I will hopefully be testing the pause script from a dummy doorbell set up in Domoticz (As I don't have an RF interface for it yet), and will see how that goes.
The script itself is rather lightweight, and I will be sharing a blog post on how to set it up once it's all completed at www.leecollings.co if anyone's interested?
I've been talking to a guy called Dal who has written a node.js script to control Sky HD boxes from the terminal, and he's been helping me compile a script for Domoticz to run a 'daemon' like service in the background that opens the connection with the sky box, and for a script to send a pause action that will hopefully be triggered when the doorbell is pressed.
So far, I'm able to send commands via the terminal to pause the box, and it seems to be working well. At present, the delay between sending the command, and the box pausing is about 10 seconds (this is because each command has to connect to the box though).
Once the daemon is set up, this should be instantaneous. I will hopefully be testing the pause script from a dummy doorbell set up in Domoticz (As I don't have an RF interface for it yet), and will see how that goes.
The script itself is rather lightweight, and I will be sharing a blog post on how to set it up once it's all completed at www.leecollings.co if anyone's interested?
- 1bigwink
- Posts: 11
- Joined: Wednesday 17 June 2015 21:07
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Wiltshire, UK
- Contact:
Re: Is it possible to control Sky HD box?
Hi Lee,
You would need to create a virtual switch in Domoticz, via 'Setup > Hardware'. Add a type 'Dummy' - when it appears in the list you can then click 'Create Virtual Sensors' add a 'Switch' sensor. Now in 'Setup > Devices' it should appear - click the green arrow to add it to the Switches tab.
Now on the 'Switches' tab click on the 'Edit' button of your virtual switch. Here you can add an 'On action' script file, which is ran whenever the button is pressed. There's tonnes of info in the Wiki about Scripts (as well as plenty of examples in the forums); https://www.domoticz.com/wiki/Scripts - also explains how you can use Perl, Bash, PHP etc. I'd probably be inclined to set the 'Switch type' to 'Doorbell' on the edit switch screen, so that it doesn't retain and On/Off status. Also theres some great custom icons here you could use; https://www.domoticz.com/wiki/Custom_ic ... binterface
RE your doorbell notificactions you can create similar 'On Action' scripts on your doorbell button, or if you click the 'Notiifcations' button on the doorbell switch then you can send notifications (emails, iOS/Android push, Tweets etc). These would first need to be set up in 'Setup > Settings > Notifications' though. For iOS devices I suggest you try setting up Prowl.
You would need to create a virtual switch in Domoticz, via 'Setup > Hardware'. Add a type 'Dummy' - when it appears in the list you can then click 'Create Virtual Sensors' add a 'Switch' sensor. Now in 'Setup > Devices' it should appear - click the green arrow to add it to the Switches tab.
Now on the 'Switches' tab click on the 'Edit' button of your virtual switch. Here you can add an 'On action' script file, which is ran whenever the button is pressed. There's tonnes of info in the Wiki about Scripts (as well as plenty of examples in the forums); https://www.domoticz.com/wiki/Scripts - also explains how you can use Perl, Bash, PHP etc. I'd probably be inclined to set the 'Switch type' to 'Doorbell' on the edit switch screen, so that it doesn't retain and On/Off status. Also theres some great custom icons here you could use; https://www.domoticz.com/wiki/Custom_ic ... binterface
RE your doorbell notificactions you can create similar 'On Action' scripts on your doorbell button, or if you click the 'Notiifcations' button on the doorbell switch then you can send notifications (emails, iOS/Android push, Tweets etc). These would first need to be set up in 'Setup > Settings > Notifications' though. For iOS devices I suggest you try setting up Prowl.
1x RasPi, RFXtrx433e, v5 Aeon ZWave, MD210R Door Contacts, MC335R PIRs, MD326 Siren, 25 x MiLight RGBW Bulb (4 x WiFi Contoller), 12 IP Cam, Fibaro FGS221, 5x433mhz venetian blind, 433mhz TV ceiling lift.
Next: Touchscreen + frontpage.html
Next: Touchscreen + frontpage.html
- leecollings
- Posts: 167
- Joined: Tuesday 30 June 2015 18:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: United Kingdom
- Contact:
Re: Is it possible to control Sky HD box?
I've noticed something, even though the switch is set to Doorbell, in the logs it only ever shows 'On' commands. Is this how it's supposed to work? Or the 'Doorbell' type of switch meant to set it to Off straight away after it's been pressed?
- 1bigwink
- Posts: 11
- Joined: Wednesday 17 June 2015 21:07
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Wiltshire, UK
- Contact:
Re: Is it possible to control Sky HD box?
Yes exactly - being a doorbell the tat will always be on, unless momentarily when activated. For mine only the 'On' command actually works for the purposes of scripts.
1x RasPi, RFXtrx433e, v5 Aeon ZWave, MD210R Door Contacts, MC335R PIRs, MD326 Siren, 25 x MiLight RGBW Bulb (4 x WiFi Contoller), 12 IP Cam, Fibaro FGS221, 5x433mhz venetian blind, 433mhz TV ceiling lift.
Next: Touchscreen + frontpage.html
Next: Touchscreen + frontpage.html
- C4rtm4N
- Posts: 49
- Joined: Saturday 07 February 2015 21:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: UK
- Contact:
Re: Is it possible to control Sky HD box?
Lee
Did you ever get the script finished or could you share the work in progress version here so others who share an interest could also contribute?
Did you ever get the script finished or could you share the work in progress version here so others who share an interest could also contribute?
- leecollings
- Posts: 167
- Joined: Tuesday 30 June 2015 18:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: United Kingdom
- Contact:
Re: Is it possible to control Sky HD box?
No I never got the script finished. As the guy who was helping me, came to a halt and kindly said the reason it wouldn't run on startup, was an issue in the script itself. So it's kind of fallen on the back burner. I will definitely try to package it all up, and put it on here to see if anyone can add anything to it though.
- C4rtm4N
- Posts: 49
- Joined: Saturday 07 February 2015 21:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: UK
- Contact:
Re: Is it possible to control Sky HD box?
That would be great as with the popularity of Sky here in the UK there could be many takers.
Personally I'm interested in being able to turn the Sky box on & off. I can turn my TV off remotely but it doesn't support WOL; turning the Sky box on with the remote or the Sky app does trigger the TV to turn on however, hence my questions.
I have to admit that I can't get Dal's skyplus code to install onto my Pi so I fear that I may struggle with your script also.
Personally I'm interested in being able to turn the Sky box on & off. I can turn my TV off remotely but it doesn't support WOL; turning the Sky box on with the remote or the Sky app does trigger the TV to turn on however, hence my questions.
I have to admit that I can't get Dal's skyplus code to install onto my Pi so I fear that I may struggle with your script also.
- leecollings
- Posts: 167
- Joined: Tuesday 30 June 2015 18:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: United Kingdom
- Contact:
Re: Is it possible to control Sky HD box?
Okay, I'm not sure exactly what the best way to start this is, so what I've done is just ZIPed up the entire folder that contains the scripts that were being used on my Pi. Being a novice, I wasn't sure exactly how this all worked, but I believe this is a NODE_JS script, running under the Forever service?
The problem that I w as having, was that although the scripts worked, I needed to use the Forever service to keep he listener script running in the background, so the Sky box is always connected. Otherwise, each 'Pause' command would take up to 10 seconds to take effect (as it would need to connect to the box each time).
My problem was that the forever script could never be run, and always exited with error code 0.
If anyone can look at this, and see if they can get anywhere, I'd love to hear about it. I'll be happy to help with any questions or info, as much as I can!
In my switches, under the Doorbell switch, the following script file is being run with every 'ON' command: script:///home/pi/domoticz/scripts/sky-plus-hd/tools/mqtt/pause.sh
https://drive.google.com/folderview?id= ... sp=sharing
The problem that I w as having, was that although the scripts worked, I needed to use the Forever service to keep he listener script running in the background, so the Sky box is always connected. Otherwise, each 'Pause' command would take up to 10 seconds to take effect (as it would need to connect to the box each time).
My problem was that the forever script could never be run, and always exited with error code 0.
If anyone can look at this, and see if they can get anywhere, I'd love to hear about it. I'll be happy to help with any questions or info, as much as I can!
In my switches, under the Doorbell switch, the following script file is being run with every 'ON' command: script:///home/pi/domoticz/scripts/sky-plus-hd/tools/mqtt/pause.sh
https://drive.google.com/folderview?id= ... sp=sharing
- leecollings
- Posts: 167
- Joined: Tuesday 30 June 2015 18:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: United Kingdom
- Contact:
Re: Is it possible to control Sky HD box?
Has anyone on here had experience setting up forever services to run background tasks? I think that's the problem I'm having at the moment.
I can happily work with someone and allow SSH access to my Pi if you think you could get it up and running. I was able to run the background script manually, and then trigger the Sky box to pause when the doorbell command was activated, so I know it all works.
I just need some general help in running the background service using Forever. (or if you think there's a better way to run the daemon, then I'd be happy to hear it).
I can happily work with someone and allow SSH access to my Pi if you think you could get it up and running. I was able to run the background script manually, and then trigger the Sky box to pause when the doorbell command was activated, so I know it all works.
I just need some general help in running the background service using Forever. (or if you think there's a better way to run the daemon, then I'd be happy to hear it).
- leecollings
- Posts: 167
- Joined: Tuesday 30 June 2015 18:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: United Kingdom
- Contact:
Re: Is it possible to control Sky HD box?
Does anyone have any ideas on how I can get this script working? I'd love any input at all!
- leecollings
- Posts: 167
- Joined: Tuesday 30 June 2015 18:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: United Kingdom
- Contact:
Re: Is it possible to control Sky HD box?
Hey, is there anyone that can help me with looking at a node.js script (I think). I just need someone who knows about linux file systems, and SSH. I'm getting quite desperate now!
- C4rtm4N
- Posts: 49
- Joined: Saturday 07 February 2015 21:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: UK
- Contact:
Re: Is it possible to control Sky HD box?
Hi Lee
I can't get Dal's actual code to run correctly on my Pi but I have to admit that I haven't tried again since a couple of days after you sent me everything. I'll look at it again at the weekend as I really want the on/off functionality working but I'm by no means an expert.
I can't get Dal's actual code to run correctly on my Pi but I have to admit that I haven't tried again since a couple of days after you sent me everything. I'll look at it again at the weekend as I really want the on/off functionality working but I'm by no means an expert.
- leecollings
- Posts: 167
- Joined: Tuesday 30 June 2015 18:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: United Kingdom
- Contact:
Re: Is it possible to control Sky HD box?
I think I might be looking at a slightly less complex alternative, by getting a LAN IR blaster, and using that to send an IR signal to the Sky box instead.
- leecollings
- Posts: 167
- Joined: Tuesday 30 June 2015 18:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: United Kingdom
- Contact:
Re: Is it possible to control Sky HD box?
Hi all, just felt I needed to update this, as the Sky control script is now working, although it has a bit of a delay until it's fired by Domoticz, but I think this is the door switch itself sending the command late.
I'll post a better update when I Get the time of what's changed, and how it works.
I'll post a better update when I Get the time of what's changed, and how it works.
- leecollings
- Posts: 167
- Joined: Tuesday 30 June 2015 18:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: United Kingdom
- Contact:
Re: Is it possible to control Sky HD box?
So, now there's a much more simpler solution to controlling your Sky box via the LAN interface in Domoticz (or any terminal).
https://www.npmjs.com/package/sky-remote-cli - This page has some pretty clear instructions on how to get it installed on your Pi.
Following this, I created a simple script to run as the 'On' action of my doorbell switch that looks like this
#!/bin/bash
sky-remote-cli 10.0.0.5 pause &
The slight niggle at the moment is when the doorbell is pressed, there seems to be a few seconds until this script is run. Although I think this may be the way the LightwaveRF doorbell button works, as it seems to be the same amount of delay as to when any paired lights are operated.
https://www.npmjs.com/package/sky-remote-cli - This page has some pretty clear instructions on how to get it installed on your Pi.
Following this, I created a simple script to run as the 'On' action of my doorbell switch that looks like this
#!/bin/bash
sky-remote-cli 10.0.0.5 pause &
The slight niggle at the moment is when the doorbell is pressed, there seems to be a few seconds until this script is run. Although I think this may be the way the LightwaveRF doorbell button works, as it seems to be the same amount of delay as to when any paired lights are operated.
- leecollings
- Posts: 167
- Joined: Tuesday 30 June 2015 18:09
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: United Kingdom
- Contact:
Re: Is it possible to control Sky HD box?
Thought I'd just share this link with everyone, in case they want to look at doing the same.
I've created a short blog item on my own website, to easily explain how to get Sky HD commands working over a network.
http://www.leecollings.co/sky-hd-contro ... n-network/
I've created a short blog item on my own website, to easily explain how to get Sky HD commands working over a network.
http://www.leecollings.co/sky-hd-contro ... n-network/
-
- Posts: 7
- Joined: Wednesday 21 December 2016 10:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Is it possible to control Sky HD box?
I've just tried this and it works great. Thanks a lot!
Who is online
Users browsing this forum: No registered users and 1 guest