Horizon TV mediabox binding

I haven’t done anything special with the box either. I am using it on a SMT-G7401 provided by Ziggo in Holland. Using the latest firmware. I have connected it to my home network with a LAN kabel.

When you scan your network for devices with an app like “Net Analyzer”, does it popup? So you’re sure it is properly connected to your home network. It is known that it can be a bit of a pain to get the box properly connected to a LAN.

Is it just the power status check that isn’t working or doesn’t the binding work either?

Using the gssdp-discover tool without the “target” property should show some other services provided by the box as well.

I discovered that most of the services are on a different ip address than I configured but the “MediaServer” isn’t one of them.

I believe the binding is done on the VNC port?

Do you see the media service under windows? These are the services (in the red square) that I see:

Sorry for the late response.

Yes that’s right the binding is using the vnc port. I am afraid I don’t own a windows PC and my virtual box doesn’t show any upnp devices.

Is the binding working ok and is it just the power status check that isn’t working or are both not working?

I tested the binding with Openhab 2.0 and I have a strange problem: The binding seems to repeat the command endlessly. If I push the button again it sometimes stops, but not always. I have the items configured with autoupdate=“false” and with mapping ON only in the sitemap. I see the command changes in the log and they only occur on button press.

Hmm I don’t have an Openhab running on 2.0 yet. That’s still on my todo list. Do you see this behavior with every command or specific commands?

Unfortunately with every command.

Van: Kuijp bot@community.openhab.org
Verzonden: dinsdag 7 juni 2016 20:21:42
Aan: Jan-Willem Spuij
Onderwerp: [openHAB] [Add-ons/Bindings] Horizon TV mediabox binding

[https://community.openhab.org/letter_avatar_proxy/v2/letter/k/838e76/45.png] kuijphttps://community.openhab.org/users/kuijp
June 7

Hmm I don’t have an Openhab running on 2.0 yet. That’s still on my todo list. Do you see this behavior with every command or specific commands?

Visit Topichttps://community.openhab.org/t/horizon-tv-mediabox-binding/6642/15 or reply to this email to respond

In Reply To
[https://community.openhab.org/user_avatar/community.openhab.org/jspuij/45/2630_1.png] jspuijhttps://community.openhab.org/users/jspuij Jan-Willem Spuijhttps://community.openhab.org/users/jspuij
May 24

I tested the binding with Openhab 2.0 and I have a strange problem: The binding seems to repeat the command endlessly. If I push the button again it sometimes stops, but not always. I have the items configured with autoupdate=“false” and with mapping ON only in the sitemap. I see the command changes…

Visit Topichttps://community.openhab.org/t/horizon-tv-mediabox-binding/6642/15 or reply to this email to respond

To stop receiving notifications for this particular topic, click herehttps://community.openhab.org/t/horizon-tv-mediabox-binding/6642/unsubscribe. To unsubscribe from these emails, change your user preferenceshttps://community.openhab.org/my/preferences

Sorry for my late response this time :slight_smile:
I’m only looking at the power status check. Did anyone else have sucess with this?
I still find it stange that you have a mediaserver upnp service on the horizon and I can’t find it. I used the same tool to scan the network but this only shows a windows system.
Are you using an extra horizon (the small box) media box?

You can control powercycle by this script:

<?php
/*
Script (C) KixAss 2016 - horizon@kixass.net

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);
}
?>

Thanks for the Java implementen @kuijp. Based on your code I just started a API wrapper for the Horizon box in Python: Einder.

I was wondering, how did you discovered the API of the Horizon box and found out the details?

No problem. I found sources of a very old Android app on the web somewhere. It was used to control one of the first versions of the samsung box when there wasn’t even an official app. I tried pushing some of the key_codes used by that app on the open port (5900) of the horizonbox and found some of them working and some of them had to be changed. In the end, got them to work.

I have been quite busy these last month’s. But I will try to get this binding finished and tested on openhab2.0 this month so it can be pushed to the main repo.

Cool!

I’m trying get the current status from the Horizon box, like which channel is currently playing. During this search I discovered a few upnp services running on the device at the following ports and endpoints:

  • :29153/description0.xml
    • RemoteUIServer
  • :29153/description1.xml
    • ConnetionManager
    • AVTransport
    • BasicManagement
    • ScheduledRecording
    • ContentDirectory
  • :62137/DeviceDescription.xml
    • MediaReceiverRegistrar
    • ContentDirectory
    • ContentManager

I havn’t been able to use this services yet.

I installed the Horizon binding. After the installation I get a confirmation. Unfortunately, there is no message in the inbox and I cannot see the Horizon binding under Configuration/Bindings.

My HorizonBox seems to be properly configured and I can also access it over LAN.

Where is the problem?

Hi

Same for me. After installing Horizon binding I can´t find any notification in the inbox, neither I can add manually one.

Best regards

no luck here. Who has got this working. ???

English please !

thanks for the notice

Hi sorry for the late response. Just became a father so again I’ve been a bit occupied. I have been using this binding for quite a while now. I have tested it on openhab2 and it was working fine. I did use config files with item declarations since it is a openhab1 based add-on. So didn’t used things etc.

I will upgrade the running version of openhab in my house to openhab2 this week. So then I will check whether config with paper-ui has problems. I assume this is what you mean with “notification in the inbox”?

Congratulations!

Answering your question. Yes in Paper U I there is no notification about a new device found after installing the bidding.

Thanks for having a look. Let us know of you can reproduce the behaviour.

Hi all,

any news about the binding?

Thanks