Ziggo Horizonbox support

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

rickwilleme
Posts: 53
Joined: Wednesday 16 December 2015 15:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.6792
Location: Landgraaf, The Netherlands
Contact:

Ziggo Horizonbox support

Post by rickwilleme »

Hi there,

This is for the Dutch people out here.
Is there a way of controlling the Ziggo Horizonbox via Domoticz?

Thanks,
Rick
Raspberry Pi ~ Fibaro Dimmer (Z-Wave) ~ Several KAKU switches and dimmers (433 MHz) ~ Amazon Echo ~ Somfy RTS ~ Sony TV ~ Kodi/XBMC ~ Essent E-Thermostaat (ICY) ~ Cresta thermostat ~ Wundermap Weather ~ Smoke detectors
daandamhuis
Posts: 19
Joined: Tuesday 19 January 2016 10:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.4608
Location: 's-Hertogenbosch
Contact:

Re: Ziggo Horizonbox support

Post by daandamhuis »

As far as i know, it can't not be done. I have searched, but I didn't find anything useful like an API or something. Beside that I know there are two versions, the SMT-G7400 and the newer SMT-G7401 (Different CPU's). :(
RPi Model 2: Domoticz Server (Beta)
RPi Model B+: Smart Meter Slave (Stable)
Particle Photon (2x): Prototyping, Controlling LEDS and gathering Sensor data for Domoticz
Arduino Uno R3: with CC2500 Shield for Philips LivingColor Lights 1st Gen.
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: Ziggo Horizonbox support

Post by stlaha2007 »

Like daandamhuis already said, API unknown right now.

Have on at how controlled with android app however havent got time enough to get sniffing the packets.

Like the idea of controlling it another way, but its difficult to get details how to do that.

Grtz,
Stephan
rickwilleme
Posts: 53
Joined: Wednesday 16 December 2015 15:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.6792
Location: Landgraaf, The Netherlands
Contact:

Re: Ziggo Horizonbox support

Post by rickwilleme »

Yeah, also searched for it, but was unable to find it.
@stlaha2007: Do you think that sniffing the packets will do the job?
Raspberry Pi ~ Fibaro Dimmer (Z-Wave) ~ Several KAKU switches and dimmers (433 MHz) ~ Amazon Echo ~ Somfy RTS ~ Sony TV ~ Kodi/XBMC ~ Essent E-Thermostaat (ICY) ~ Cresta thermostat ~ Wundermap Weather ~ Smoke detectors
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: Ziggo Horizonbox support

Post by stlaha2007 »

Have seperate (v)lans so most traffic here will be dedicated between app and horizonbox.

At least will give some insight on which tcp/udp port commands will be received by horizonbox. And lucky can decode known/given commands.

Already tried on android phone by looking at connections. But need to setup a wireshark in same vlan to get better results. Cant tell or do that now.

Busy rearranging/seperating/optimizing network and pi's.
Perhaps you can do?

Grtz,
Stephan
knetsooj
Posts: 4
Joined: Saturday 05 March 2016 11:34
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Ziggo Horizonbox support

Post by knetsooj »

I'm not sure if this is any useful but saw that this openHAB binding was available.
https://github.com/openhab/openhab/wiki ... ox-binding

maybe someone can extract some useful information out of it.
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: Ziggo Horizonbox support

Post by stlaha2007 »

Nice to know. However on the github couldnt find the source for it...

Gonna have a look into it with a dedicated VM or spare pi soon.

Thanks

Grtz,
Stephan
niceandeasy
Posts: 102
Joined: Thursday 28 January 2016 22:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: NL
Contact:

Re: Ziggo Horizonbox support

Post by niceandeasy »

People who would like to sniff for how to control this Horizon box or whatever app-controlled gadget that works via wifi, this might be useful...

https://play.google.com/store/apps/deta ... sslcapture

This app sniffs the network traffic of an Android device, by starting a VPN to itself, so it can record the traffic while forwarding it to it's destination. So, no root needed. Also, no extra WLANs, VLANs and sniffer-setups needed.
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: Ziggo Horizonbox support

Post by stlaha2007 »

Also nice. However because of this Horizonbox misbehaviour in a normal network eg trying to be THE gateway, while having dual-wan or not responding to traffic coming in thru a routed network. I have 1 VLAN with a dhcpserver/dnsserver/gateway/seperate WIFI access specificly build for HorizonBox.

I dont like it that devices broadcast its precense thru the internet but the philips hue bridge does, but is still reacheble from my other vlans/subnets.

So a i would like to know if and how to control it with a dedicated "gateway" like a VM inside that vlan/subnet or a raspberry pi (already Kodi nearby) with modified network setup to include that vlan on the same wired networkcard.

So sniffing is needed, and maybe OpenHAB with the mentioned plugin can work, to decode some basic controlmagic.

Grtz,
Stephan
niceandeasy
Posts: 102
Joined: Thursday 28 January 2016 22:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: NL
Contact:

Re: Ziggo Horizonbox support

Post by niceandeasy »

Thanks, stlaha2007.
I will avoid that HorizonBox at all cost. I'll just keep on using my Humax PVR. Nowadays, there's not much on TV that is actually worth watching. My Kodi is being used more than the Humax, haha.

Anyway, the topicstarter seems to have a more usual network setup and might be able to sniff the commands by using that on-device sniffing tool I mentioned.
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: Ziggo Horizonbox support

Post by stlaha2007 »

I wouldnt recommend the horizonbox after 1 year of frustration :-)

However resident of former upc network. So getting my hands on a working Humax is difficult. Youre lucky.

Anyway PO has to do his own part. As i'm unable to find the time to do the sniffing at the moment.

Grtz,
Stephan
KixAss
Posts: 15
Joined: Tuesday 22 September 2015 11:02
Target OS: NAS (Synology & others)
Domoticz version:
Location: Apeldoorn, the Netherlands
Contact:

Re: Ziggo Horizonbox support

Post by KixAss »

After a lot of trying, I've got a script that works for controlling the Horizon box:

Code: Select all

<?php
/*
Script (C) KixAss 2016 - [email protected]

Possible keys:
KEY_POWER		= E0 00
KEY_OK 			= E0 01
KEY_BACK 		= E0 02
KEY_CHAN_UP		= E0 06
KEY_CHAN_DWN	= E0 07
KEY_HELP		= E0 09
KEY_MENU		= E0 0a
KEY_GUIDE		= E0 0b
KEY_INFO		= E0 0e
KEY_TEXT		= E0 0f
KEY_MENU1		= E0 11
KEY_MENU2		= E0 15
KEY_DPAD_UP		= E1 00
KEY_DPAD_DOWN	= E1 01
KEY_DPAD_LEFT	= E1 02
KEY_DPAD_RIGHT	= E1 03
KEY_NUM_0		= E3 00
KEY_NUM_1		= E3 01
KEY_NUM_2		= E3 02
KEY_NUM_3		= E3 03
KEY_NUM_4		= E3 04
KEY_NUM_5		= E3 05
KEY_NUM_6		= E3 06
KEY_NUM_7		= E3 07
KEY_NUM_8		= E3 08
KEY_NUM_9		= E3 09
KEY_PAUSE		= E4 00
KEY_STOP		= E4 02
KEY_RECORD		= E4 03
KEY_FWD			= E4 05
KEY_RWD			= E4 07
KEY_MENU3		= Ef 00
KEY_UNKNOWN_0 	= Ef 06;	// TIMESHIFT INF
KEY_UNKNOWN_1	= Ef 15;	// POWE
KEY_UNKNOWN_2	= Ef 16;	// N
KEY_UNKNOWN_3	= Ef 17;	// RC PAIRIN
KEY_UNKNOWN_4	= Ef 19;	// TIMIN
KEY_ONDEMAND	= Ef 28
KEY_DVR 		= Ef 29
KEY_TV = Ef 2a;
*/

function makeBuffer($data)
{
    $data = str_replace(" ", "", $data);
    return hex2bin($data);
}


$localip = "192.168.192.100";
$localport = 5900;
$key = "E0 00"; // Power toggle


if ($sock = fsockopen($localip, $localport))
{
    $data = fgets($sock); // readVersionMsg
    echo "recv version: " . $data . "<br>";
    echo "recv version: " . makeBuffer2($data) . "<br>";

	echo "-----------------------------<br>";

    fwrite($sock, $data); // Send the same version back

    $data = fgets($sock, 2); // Get OKE
    echo "recv: " . $data . "<br>";
    echo "recv: " . makeBuffer2($data) . "<br>";

	echo "-----------------------------<br>";

    fwrite($sock, makeBuffer("01")); // Send Authorization type (none)

    $data = fgets($sock, 4); // Get OKE
    echo "recv: " . $data . "<br>";
    echo "recv: " . makeBuffer2($data) . "<br>";

	echo "-----------------------------<br>";

    $data = fgets($sock, 24); // Get init data
    echo "recv: " . $data . "<br>";
    echo "recv: " . makeBuffer2($data) . "<br>";
	
	fwrite($sock, makeBuffer("04 01 00 00 00 00 " . $key)); // Turn key on
    usleep(400);
	fwrite($sock, makeBuffer("04 00 00 00 00 00 " . $key)); // Turn key off

    fclose($sock);
}
?>
To check the status of your box:

Code: Select all

#!/usr/bin/php
<?php
ini_set('error_reporting', E_ALL);

$localip = "192.168.192.100";
$localport = "62137";

$domoticz_ip = "127.0.0.1";
$domoticz_port = "8084";
$domoticz_sensor_idx = 24;

$data = file_get_contents("http://$localip:$localport/DeviceDescription.xml");
if (!empty($data))
{
    $status = "1";
}
else
{
    $status = "0";
}

echo $status;

file_get_contents("http://$domoticz_ip:$domoticz_port/json.htm?type=command&param=udevice&idx=$domoticz_sensor_idx&switchcmd=$status&level=0");
?>
Last edited by KixAss on Saturday 05 November 2016 9:58, edited 1 time in total.
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: RE: Re: Ziggo Horizonbox support

Post by stlaha2007 »

KixAss wrote:After a lot of trying, I've got a script that works for controlling the Horizon box
Nice.., whish i got this earlier.
2Weeks ago send the HorifyingBOX back to Ziggo.

Now only TV with CI+....

Sent from my D6603 using Tapatalk
dutchdevil83
Posts: 130
Joined: Monday 31 October 2016 19:34
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Netherlands
Contact:

Re: Ziggo Horizonbox support

Post by dutchdevil83 »

Sounds Cool!

Can you make a wiki to get the code working in domoticz?
Hardware
1x Raspberry Pi
1x Razberry Z-Wave
1x RFXtrx433E
1x Toon
1x GoodWe Solarpanels
2x FGSD-002 Smoke Detector
1x FGBS-001 Binaire Sensor (RFID lezer)
7x FGMS-001 Motion Sensor
3x ZW089 Verzonken Deursensor
7x NC Wallplug
&lots of KaKu stuff
KixAss
Posts: 15
Joined: Tuesday 22 September 2015 11:02
Target OS: NAS (Synology & others)
Domoticz version:
Location: Apeldoorn, the Netherlands
Contact:

Re: Ziggo Horizonbox support

Post by KixAss »

gennapium
Posts: 54
Joined: Thursday 18 August 2016 10:06
Target OS: Linux
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Ziggo Horizonbox support

Post by gennapium »

Hi,

I followed the wiki and now i can Switch on and off the Horizon box. But when i try to check the status nothing happens.
When i add a "echo $status;" to the script is get this result:

1&svalue=On{
"status" : "OK",
"title" : "Update Device"

Any idea what is going wrong here ?
Ubuntu server, Raspberry Pi, PiFace 2, RFXCom, Z-wave Stick, Kaku, Sensor
dutchdevil83
Posts: 130
Joined: Monday 31 October 2016 19:34
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Netherlands
Contact:

Re: Ziggo Horizonbox support

Post by dutchdevil83 »

Thanx, will look into it this weekend
Hardware
1x Raspberry Pi
1x Razberry Z-Wave
1x RFXtrx433E
1x Toon
1x GoodWe Solarpanels
2x FGSD-002 Smoke Detector
1x FGBS-001 Binaire Sensor (RFID lezer)
7x FGMS-001 Motion Sensor
3x ZW089 Verzonken Deursensor
7x NC Wallplug
&lots of KaKu stuff
KixAss
Posts: 15
Joined: Tuesday 22 September 2015 11:02
Target OS: NAS (Synology & others)
Domoticz version:
Location: Apeldoorn, the Netherlands
Contact:

Re: Ziggo Horizonbox support

Post by KixAss »

gennapium wrote:Hi,

I followed the wiki and now i can Switch on and off the Horizon box. But when i try to check the status nothing happens.
When i add a "echo $status;" to the script is get this result:

1&svalue=On{
"status" : "OK",
"title" : "Update Device"

Any idea what is going wrong here ?
No not yet, I've got the same problem with the newest version, so still working on that. I need it to update the status without running the actions (else it's gonna flip).
gennapium
Posts: 54
Joined: Thursday 18 August 2016 10:06
Target OS: Linux
Domoticz version: Stable
Location: Netherlands
Contact:

Re: Ziggo Horizonbox support

Post by gennapium »

Great,

Hope you find a solution soon.
Ubuntu server, Raspberry Pi, PiFace 2, RFXCom, Z-wave Stick, Kaku, Sensor
Melissen
Posts: 65
Joined: Wednesday 16 November 2016 9:39
Target OS: -
Domoticz version:
Contact:

Re: Ziggo Horizonbox support

Post by Melissen »

Does this work with a RFXcom433e ?

New to Domoticz. understanding LUA a little now. But this is PHP, how should I install this?
RFXcom433e ver1009,Raspberry Pi,Domoticz v3.5877

KaKu:16c remote,dimmer,wall-sockets,sunscreenswitch
Promax:wall sockets Elro:wall sockets Somfy:RFY screens
TFA:weather station Chinese temperature sensors, smoke detectors, power switches
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest