Binding to control Philips TV Sets with JointSpace API

3,053 views
Skip to first unread message

len...@gmail.com

unread,
Apr 11, 2014, 5:38:50 PM4/11/14
to ope...@googlegroups.com
Hey all,

I am currently working on integration my Philips TV into openhab. All their models (since 2011) support a json-based api called jointSPACE (see http://jointspace.sourceforge.net/projectdata/documentation/jasonApi/index.html for the reference what one can do with it) that allows controlling some functionality over ethernet.

Right now my binding can:
- Send Button commands
- Sets and Read Volume/Mute
- Set and Get Colors of Ambilight "Pixels"

Is anybody out there interested in such a binding? If yes I will post it here (as soon as its a little bit more stable) for testing and create a pull request.

Best
David

karsten.k...@gmail.com

unread,
Apr 11, 2014, 11:33:04 PM4/11/14
to ope...@googlegroups.com
I need To Check production date but in general i am Interested, yes.

Cheers
Karsten

len...@gmail.com

unread,
Apr 12, 2014, 2:10:54 AM4/12/14
to ope...@googlegroups.com
Hey,

you can check maybe here if your TV is compatible: http://jointspace.sourceforge.net/download.html
Also it needs to be activated for your TV
"by entering the following digits sequence while watching TV (WatchTV activity): "5646877223"" (which is actually typing "jointspace" as digits)

Hans-Jörg Merk

unread,
Apr 12, 2014, 3:27:57 AM4/12/14
to ope...@googlegroups.com
Hi,
I would love to test your binding with my Philips TV
Cheers
Hans-Jörg

karsten.k...@gmail.com

unread,
Apr 20, 2014, 3:59:22 AM4/20/14
to ope...@googlegroups.com
ok  - will be happy to join the testers :)


Am Freitag, 11. April 2014 23:38:50 UTC+2 schrieb len...@gmail.com:

okt...@gmail.com

unread,
Apr 20, 2014, 7:23:44 PM4/20/14
to ope...@googlegroups.com
I have 42PFL3507 and does not seem like there is support.

At the moment I can only turn it on/off and sending volume +/- commands by creating telnet session to RaspberryPi and then communicating to the HDMI bus. There is only small subset of commands that are available/implemented.

I also know about the 3.5mm stereo audio SERVICE connector on the back that should be RS232 but never tried. Anyone more info on this?

Thomas Eichstädt-Engelen

unread,
Apr 21, 2014, 2:28:30 AM4/21/14
to ope...@googlegroups.com
Hi,

great, thanks for starting this initiative! Is your binding already available somewhere? Please send a Pull Request as soon as possible in order to give early feedback (code wise).

Best, Thomas

- sent from a mobile device -
--
You received this message because you are subscribed to the Google Groups "openhab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.
For more options, visit https://groups.google.com/d/optout.

len...@gmail.com

unread,
Apr 23, 2014, 4:46:21 PM4/23/14
to ope...@googlegroups.com
Hi,

Sorry for the delay, but here is my current state:
Find attached the compiled binding, some example items and sitemap.
I have to point out that the philips tv has to be compatible and the jointspace api has to be enabled (see my second post here)
In order to use the binding you have to add following parameters to openhab.cfg:

################################# JointSpace #############################################
#
# Timeout - or 'refresh interval', in milliseconds, of the worker thread.
# Used for polling.

jointspace:refreshinterval=5000

# Ip of the jointspace enabled device
jointspace:ip = 192.168.0.100

# Port of the jointspace API. Defaults to 1925
#jointspace:port = 1925

I will create a pull request some time later today, but what is the best way to create a wiki page (especially that it doesnt get confused with the current release)

As it is my first binding for openhab (and my first java program for that matter) I'm happy about any suggestions how to handle things more efficently or elegant.

Best
David
org.openhab.binding.jointspace_1.5.0.201404232236.jar

len...@gmail.com

unread,
Apr 23, 2014, 4:47:32 PM4/23/14
to ope...@googlegroups.com
forgot the item and sitemap
jointspace.items
jointspace.sitemap

karsten.k...@gmail.com

unread,
Apr 25, 2014, 3:28:13 AM4/25/14
to ope...@googlegroups.com
thanks, will try on the weekend. is this working with the 1.5 snapshot only?

Cheers
Karsten

Lenzebo

unread,
Apr 25, 2014, 4:54:02 AM4/25/14
to ope...@googlegroups.com
As I didnt use any 1.5 specific functions I assume that it will work with the 1.4 release, but I really don't know.
Just let me know if you have success

Best


--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/9n7vfo6kBKk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.

karsten.k...@gmail.com

unread,
Apr 25, 2014, 8:19:24 AM4/25/14
to ope...@googlegroups.com
Hi David,

added lines to openhab.cfg as described above and used your sitemap and items file with no changes. The jar file i did into the addon folder.

Binding got loaded as per debug log file correctly:

12:59:08.087 INFO  o.o.m.c.i.ModelRepositoryImpl[:79] - Loading model 'jointspace.items'
12:59:12.901 DEBUG o.o.m.i.i.GenericItemProvider[:133] - Read items from model 'jointspace.items'
12:59:13.274 DEBUG o.o.m.i.i.GenericItemProvider[:133] - Read items from model 'jointspace.items'
12:59:35.105 INFO  o.o.m.c.i.ModelRepositoryImpl[:79] - Loading model 'jointspace.sitemap'
13:00:11.365 DEBUG o.o.b.j.i.JointSpaceActivator[:34] - JointSpace binding has been started.
13:00:11.442 DEBUG o.o.m.i.i.GenericItemProvider[:334] - Start processing binding configuration of Item 'MuteSwitch (Type=SwitchItem, State=Uninitialized)' with 'JointSpaceGenericBindingProvider' reader.
13:00:11.450 DEBUG o.o.m.i.i.GenericItemProvider[:334] - Start processing binding configuration of Item 'VolumeTV (Type=DimmerItem, State=Uninitialized)' with 'JointSpaceGenericBindingProvider' reader.
13:00:11.455 DEBUG o.o.m.i.i.GenericItemProvider[:334] - Start processing binding configuration of Item 'ActivateAmbilight (Type=SwitchItem, State=Uninitialized)' with 'JointSpaceGenericBindingProvider' reader.
13:00:11.465 DEBUG o.o.m.i.i.GenericItemProvider[:334] - Start processing binding configuration of Item 'Ambilight_mode (Type=NumberItem, State=Uninitialized)' with 'JointSpaceGenericBindingProvider' reader.
13:00:11.471 DEBUG o.o.m.i.i.GenericItemProvider[:334] - Start processing binding configuration of Item 'AmbilightAll (Type=ColorItem, State=Uninitialized)' with 'JointSpaceGenericBindingProvider' reader.
13:00:11.477 DEBUG o.o.m.i.i.GenericItemProvider[:334] - Start processing binding configuration of Item 'AmbilightLeft (Type=ColorItem, State=Uninitialized)' with 'JointSpaceGenericBindingProvider' reader.
13:00:11.490 DEBUG o.o.m.i.i.GenericItemProvider[:334] - Start processing binding configuration of Item 'AmbilightRight (Type=ColorItem, State=Uninitialized)' with 'JointSpaceGenericBindingProvider' reader.
13:00:11.507 DEBUG o.o.m.i.i.GenericItemProvider[:334] - Start processing binding configuration of Item 'AmbilightPixelLeft (Type=ColorItem, State=Uninitialized)' with 'JointSpaceGenericBindingProvider' reader.
13:00:11.514 DEBUG o.o.m.i.i.GenericItemProvider[:334] - Start processing binding configuration of Item 'Standby (Type=SwitchItem, State=Uninitialized)' with 'JointSpaceGenericBindingProvider' reader.
13:00:11.527 DEBUG o.o.m.i.i.GenericItemProvider[:334] - Start processing binding configuration of Item 'VolumeUpDown (Type=SwitchItem, State=Uninitialized)' with 'JointSpaceGenericBindingProvider' reader.
13:00:11.533 DEBUG o.o.m.i.i.GenericItemProvider[:334] - Start processing binding configuration of Item 'ChannelStep (Type=SwitchItem, State=Uninitialized)' with 'JointSpaceGenericBindingProvider' reader.
13:00:11.557 DEBUG o.o.m.i.i.GenericItemProvider[:334] - Start processing binding configuration of Item 'AmbilightOnOff (Type=SwitchItem, State=Uninitialized)' with 'JointSpaceGenericBindingProvider' reader.
13:00:11.563 DEBUG o.o.m.i.i.GenericItemProvider[:334] - Start processing binding configuration of Item 'Source (Type=SwitchItem, State=Uninitialized)' with 'JointSpaceGenericBindingProvider' reader.
13:00:11.568 DEBUG o.o.m.i.i.GenericItemProvider[:334] - Start processing binding configuration of Item 'PlayPause (Type=SwitchItem, State=Uninitialized)' with 'JointSpaceGenericBindingProvider' reader.
13:00:11.660 INFO  o.o.c.s.AbstractActiveService[:169] - JointSpace Refresh Service has been started

but a connection could not be established it seems that the binding is always trying to connect on port '0':

13:00:11.666 DEBUG o.o.b.j.i.JointSpaceBinding[:116] - Checking if host is available
13:00:12.679 DEBUG o.o.b.j.i.JointSpaceBinding[:128] - couldn't establish network connection [host '192.168.0.72' port '0' timeout '1000']

even removing the # in the config file and actively setting the port to 1925 has no effect.

my config extract:


################################# JointSpace #############################################
#
# Timeout - or 'refresh interval', in milliseconds, of the worker thread.
# Used for polling.

jointspace:refreshinterval=5000

# Ip of the jointspace enabled device
jointspace:ip = 192.168.0.72


# Port of the jointspace API. Defaults to 1925
jointspace:port = 1925


the commands are reaching OH:

13:00:26.684 DEBUG o.o.i.r.i.r.SitemapResource[:138] - Received HTTP GET request at 'sitemaps/jointspace/jointspace' for media type 'null'.
13:00:28.034 DEBUG o.o.b.j.i.JointSpaceBinding[:234] - Received command (item='Standby', state='ON', class='class org.openhab.core.library.types.OnOffType')


Any idea?

TV state is visible using networkhealth binding to check if on or off.

Cheers
Karsten


Renato Riolino

unread,
Apr 25, 2014, 9:46:21 AM4/25/14
to ope...@googlegroups.com, okt...@gmail.com
I have the same problem.  My Philips TV is a 42PFL7007 and it doesn't support JSON API (it has the webbrowser listening on port 1925 but it looks like that the *.html files are missing). On the other hand, it has full support for JointSpace API (DirectFB) and I had successfully made a C application to send some commands on it, but now it looks like Philips abandoned their JointSpace API development.

Now I'm currently using a raspberry pi connected via HDMI to control both of my Philips TV and Philips HT using HDMI CEC.  I'm writing a C application to run on the raspberry that will read/send commands from/to a MQTT broker. This way will be easy to integrate HDMI CEC via raspberry with OH.

I'll post the application when it will at least have some basic commands working.

[]'s

Renato

Lenzebo

unread,
Apr 25, 2014, 4:24:52 PM4/25/14
to ope...@googlegroups.com
Hmm.. Thats weird. I actually used the same code to check if the device is online as the networkhealth binding. maybe i need to increase the timeout time.
Port 0 in the log is not a problem.
I'll add some more logging and upload a new binding on sunday. Unfortunately I don't have time before that.

@Renato
Maybe in the future it might also be possible to support the C Jointspace API as it allows deeper control, like making renderings on the TV screen, but I first want to get the far more easier JSON API to work.
What do you mean by Philips abandoned jointspace development? Is it not included with newer TV sets anymore? do you have any link providing some information on that?

Best.



okt...@gmail.com

unread,
Apr 27, 2014, 2:52:59 PM4/27/14
to ope...@googlegroups.com, okt...@gmail.com

Now I'm currently using a raspberry pi connected via HDMI to control both of my Philips TV and Philips HT using HDMI CEC.  I'm writing a C application to run on the raspberry that will read/send commands from/to a MQTT broker. This way will be easy to integrate HDMI CEC via raspberry with OH.

I'll post the application when it will at least have some basic commands working.


Is there a chance to make Raspberry Pi CEC Binding for OH? That would be awesome.It would be nice if you can use the TV IR Remote to move the mouse or send strokes in the Pi OS at the same time so we can use the Pi as OH Interface on big TV (Maybe control GreenT)   

karsten.k...@gmail.com

unread,
Apr 30, 2014, 4:18:41 AM4/30/14
to ope...@googlegroups.com
Hi David,

did you have created a new jar that i can test with the TV with an extended timeout?

Thanks
Karsten

len...@gmail.com

unread,
Apr 30, 2014, 3:38:45 PM4/30/14
to ope...@googlegroups.com
Here you go...
Sorry for the delay
org.openhab.binding.jointspace_1.5.0.201404302136.jar

karsten.k...@gmail.com

unread,
May 2, 2014, 6:18:48 AM5/2/14
to ope...@googlegroups.com
Hi,
no worries :) 
I did retest with the binding on a clean OH 1.4.

Item and sitemap as your examples - in addition networkhealth binding loaded for checking if the TV is pingable.

I started in debug mode - nh binding could connect - jointspace binding not. Logfile attached.

Cheers

openhab_jointspace.zip

Lenzebo

unread,
May 3, 2014, 4:45:08 AM5/3/14
to ope...@googlegroups.com
I think the IP of the Networkheath and the jointspace binding are different ;) Can you check that?


carzt...@gmail.com

unread,
Jun 2, 2014, 2:20:37 PM6/2/14
to ope...@googlegroups.com, okt...@gmail.com
I am very intresseret in your application to read and write cec commands to openhab. How far did you get it? and is it something you want to share?
Message has been deleted

carzt...@gmail.com

unread,
Jul 4, 2014, 4:14:27 PM7/4/14
to ope...@googlegroups.com
I have some trouble with the binding.
it's like the polling dosen't work, but sending commands to the tv works fine.

her is what I can see in the log:
22:12:38.292 DEBUG o.o.b.j.i.JointSpaceBinding[:105] - Checking if host is avail
able
22:12:43.292 DEBUG o.o.b.j.i.JointSpaceBinding[:126] - couldn't establish networ
k connection [host '192.168.1.12' port '0' timeout '5000']

Robert van Bregt

unread,
Jul 5, 2014, 1:42:25 AM7/5/14
to ope...@googlegroups.com
Would be great. I am the happy owner of a 47PFL8404H/12

len...@gmail.com

unread,
Jul 6, 2014, 8:04:23 AM7/6/14
to ope...@googlegroups.com, carzt...@gmail.com
Hmmm thats odd, as this only pings the TV in order to check if it can be queried.
Can you check
1. If you can ping the TV with your computer
2. If the network health binding is working to check whether the tv is on.

What model do you have?

len...@gmail.com

unread,
Jul 6, 2014, 8:07:35 AM7/6/14
to ope...@googlegroups.com
The binding was part of the 1.5 release, so feel free to try it out.
you can find the according wiki page here:

https://github.com/openhab/openhab/wiki/jointSPACE-Binding

carzt...@gmail.com

unread,
Jul 6, 2014, 11:21:40 AM7/6/14
to ope...@googlegroups.com, carzt...@gmail.com
Ping and network health binding is working.

I have at switch in sitemap which reflect the network status from the tv, it works fine.
The switch which should reflect the mute status of the tv doesn't work.

There is the item and sitemap config:

sitemap demo label="Main Menu"
{
    Switch item=MuteSwitch
    Switch item=Network_Tv 
}

Switch MuteSwitch {jointspace="ON:key.Mute, OFF:key.Mute, POLL:volume.mute"}
Switch Network_Tv   "TV Status"   (Status, Network)   { nh="192.168.1.12:1925" }

The tv is: 47PFL6678S/12

carzt...@gmail.com

unread,
Jul 6, 2014, 12:59:44 PM7/6/14
to ope...@googlegroups.com, carzt...@gmail.com
Hi again.

It's working on xubuntu running Openhab.
Tested it on a windows, where it didn't work.

GeertVc

unread,
Sep 18, 2015, 12:12:45 PM9/18/15
to openhab
Is it possible to connect more than one Philips TV to the openHAB system using your JointSpace binding?  I've seen there's at least one IP you can specify but I'm not sure if you can specify more than this one.
Reply all
Reply to author
Forward
0 new messages