• Thanks for visiting the Kaleidescape Owners' Forum

    This forum is for the community of Kaleidescape owners, and others interested in learning about the system, equipment, services, and the company itself.

    It is run by a group of enthusiastic Kaleidescape owners and dealers purely as a service to this community.

    This board is not affiliated in any way with Kaleidescape, Inc.
    For official technical support, product information, or customer service, please visit www.kaleidescape.com

  • You are currently in "Guest" mode and not logged in with a registered account.

    The forum is free to use and most of the forum can be used by guests who are not registered....

    ... but we strongly encourage you to register for a full account. There is no cost to register for a full account.

    Benefits of registering for a full account:

    • Participate in the discussions! You must have a registered account to make posts on the forums. You will be able to start your own thread on a topic or question, or you can reply to other threads/discussions.
    • Use the "Conversation" feature (known as "private messaging" on other forums) to communicate directly with any of the other users here.
    • Access the Files area. The "resources" area of the forum contains many "Favorite Scene" and Script files that can dramatically increase the enjoyment of your Kaleidescape system. Go directly to great scenes in your favorite movies, created by other owners, and add automation to playback of your system with Scripts.
    • You won't see this annoying notice at the top of every screen!😊

    It's easy and free to register for the forum. Just click the "Register" button in the upper right corner of this page, and follow the instructions there.

OpenHAB for Kaleidescape

AlienWarlock

Well-known member
Here is a small write up on getting OpenHAB talking to your Kaleidescape. OpenHAB is an open source home automation system that is capable of interfacing all manner of technologies and systems into one integrated interface. I have configured my OpenHAB instance to interface with my Kaleidescape to retrieve and react to information about what is playing as well as send commands to the system. Utilizing various rules, OpenHAB has the ability to react to Kaleidescape's updates. While it would be nice to have a full OpenHAB binding for K instead of just this rule set, I find that this works fine for my needs. The 'tcp' binding must be loaded for this to work.


I have the following items of information populated when a movie is playing:

Title name
Play status
Chapter
Aspect ratio
Movie location
Media type
Title length
Title location

The following files (see attached zip) are used for OpenHAB to interface with K:

items/kaleidescape.items - set ip address of K server on first line
rules/kaleidescape.rules- set kZoneId to CPDID or serial number of kaleidescape zone to control
transform/k_*.map - lookup tables of various K status codes
transform/k_get_hour_minute.js - js to transform # of minutes integer to friendly display string
sitemaps/k_items.txt - items to add to sitemap for Kaleidescape


Rules specified in kaleidescape.rules:

rule "Handle Kaleidescape Event rule" - main rule to process status update messages from Kaleidescape
rule "Send K ENABLE_EVENTS rule" - call this rule once to enable event updates from Kaleidescape
rule "Send K DISABLE_EVENTS rule" - call this rule once to disable event updates from Kaleidescape
rule "K credits rolling" - this rule fires when credits roll and the movie was over 75 minutes long
rule "K movie night script" - called by switch 'K_movie_night' to start the script called 'Movie Night'
rule "K movie covers" - call this rule to make K go to movie covers screen, I use this from another rule that fires when I turn on my projector
rule "K screen saver off" - call this rule to turn off the K screen saver
rule "Handle K User Event" - handle K script action 'Send command to control system', the string is what was specified in the script create ui

Enjoy!
 

Attachments

Croptop

Well-known member
Thanks for posting this. I keep looking at OpenHAB but never seem to take the leap. This might be the push I needed.
 

Croptop

Well-known member
Finally took the plunge and got OpenHAB installed on a RPi2 that I had kicking around. Just starting to work my way through the configuration and setup so expect lots of dumb questions over the next little bit.

First one: What are you using as your OpenHAB server? I'm feeling like a RPi2 -- whilst suitable for experimenting -- is just a little bit too fragile for long term use. Any suggestions?
 

AlienWarlock

Well-known member
I started out my OpenHAB journey with a RPi2. I am currently running a RPi3 as my main rig. I haven't had any issues with reliability. While it does take several minutes for OpenHAB to start up fully, it is remarkably fast after that. Just make sure and use a good quality SD card.
 

Croptop

Well-known member
Thanks for the reply. As you hint at, it's the long term viability of the uSD card that I'm concerned about. I'll probably be keeping my eye out for a suitable replacement for long term but in my current phase of learning, the RPi2 will suffice.

I've managed to get all of my devices added to OpenHAB and have even successfully implemented rules to turn the lights on and off when playing, pausing and stopping in Plex.

I've attempted to integrate your sample files into my setup following your instructions above however I must have missed some key settings thing because I'm getting the following in my OpenHAB logs:

2018-07-29 19:43:26.779 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - couldn't transform value in label because transformationService of type 'MAP' is unavailable

2018-07-29 19:43:26.794 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - couldn't transform value in label because transformationService of type 'MAP' is unavailable

2018-07-29 19:43:26.810 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - couldn't transform value in label because transformationService of type 'MAP' is unavailable

2018-07-29 19:43:26.822 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - couldn't transform value in label because transformationService of type 'MAP' is unavailable

2018-07-29 19:43:26.838 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - couldn't transform value in label because transformationService of type 'JS' is unavailable

2018-07-29 19:43:26.850 [WARN ] [ui.internal.items.ItemUIRegistryImpl] - couldn't transform value in label because transformationService of type 'JS' is unavailable
I copied the .map and .js files from your zipfile into my OpenHAB-conf/services directory. I have the TCP/UDP bindings installed and the IP address of my K Server entered in the "kaleidescape.items" file.

Any tips on where to start looking in order to figure out where I've messed up?
 
Last edited:

AlienWarlock

Well-known member
I guess for myself, OpenHAB was easier to get into having an IT background.

I think you need to install the MAP transform service to get the JS transformation errors to go away (see attached screen shot). Also if you haven't looked in the rules file yet, you will need to edit the kZoneId variable to be the CPDID (found in the 'Control' tab of the K component settings web interface) or the serial number of the zone that you want to control.
 

Attachments

o0OBillO0o

Well-known member
I guess for myself, OpenHAB was easier to get into having an IT background.

I think you need to install the MAP transform service to get the JS transformation errors to go away (see attached screen shot). Also if you haven't looked in the rules file yet, you will need to edit the kZoneId variable to be the CPDID (found in the 'Control' tab of the K component settings web interface) or the serial number of the zone that you want to control.
Thanks for replying.

Since you have an IT background, how did/do you address those who think they can build their own Kaleidescape?

I'll give this a shot. My hopes and dreams is to write an Apple Homekit implementation using Hombridge - https://github.com/nfarina/homebridge
 

AlienWarlock

Well-known member
how did/do you address those who think they can build their own Kaleidescape?
Ha, I gave up trying to convert people a long time ago ;) But if I did try to address those who would DIY their own K clone, I'm sure I would encounter the "I can setup a Plex server, NAS, and a bunch of Intel NUC clients for way less" attitude.

Yes it may be 'way less', but what is your spare time worth? For me, I don't want to constantly mess around with all that goes with the DIY route. Kaleidescape 'just works' and provides the best possible home theater experience. 'Nuff said!
 

Croptop

Well-known member
@AlienWarlock:
Thanks for the tip about installing the MAP transform service. I'm fairly certain that is the missing piece. I had already updated the .rules file and everything is working fine even with the MAP and JS warnings.

Now I just need to create a nice panel layout for my Android tablets and then it's on to the big project: writing a Kaleidescape binding. :)

@o0OBillO0o: For me, OpenHAB scratches my DIY itch. Plus it's about two orders of magnitude cheaper than Control4 (or AMX or Crestron). It's not as polished but it's also easier to roll up my sleeves and redo the programming on an OpenHAB system than it would be on Control4, AMX or Crestron (where I'd have to have a developer's account in order to have access to the software tools).

As for the Plex vs Kaleidescape argument, I actually have both and they co-exist very nicely. But my movies go on the Kaleidescape system and movie nights are always driven by K. Plex is just my DVR and music server.
 

o0OBillO0o

Well-known member
Gents - I couldn’t agree more.

Croptop- Plex is my system before Kaleidescape and now is a DVR only.

Keep us posted.
 

josh

Administrator
Staff member
Forum Administrator
Moderator
⭐️⭐️ Patron ⭐️⭐️
Hi @AlienWarlock and @Croptop - I'm playing with OpenHAB now... are those files here still your latest versions?
And... silly question, but how do i get those files installed into OpenHAB?

Wonder if you or anyone ever tackled creating a full Kaleidescape binding?

I've got Lutron binding installed, and it found my two main repeaters and installed them as Things.
I've installed the following Transformations - Javascript, JSONPath, Map
No persistences installed.

Any more tips on how to get started and get your files installed and working?

I'm trying to get lighting to be triggered by credits and intermission... OpenHAB can see my Lutron controllers... just can't figure out how to get it listening for Kaleidescape events.

Thanks in advance!
 

AlienWarlock

Well-known member
I do have a K binding in development so most of what is in the rules above is obsolete, you can find the jar for it here: https://github.com/openhab/openhab-addons/pull/7568

If you are using a Linux environment, the rules will go under /etc/openhab2/rules or on windows it would be wherever you installed openhab, ie: C:\openhab\openhab-2.5.5\conf\rules

The jar file from above goes in /usr/share/openhab2/addons. or C:\openhab\openhab-2.5.5\addons

The binding will auto discover your k devices if they are on the same network as the openhab server. Then it is just a matter of making a rule to do things when MovieLocation changes. There are some examples for this in the README.md. Let me know how it goes.
 

josh

Administrator
Staff member
Forum Administrator
Moderator
⭐️⭐️ Patron ⭐️⭐️
I'm probably in over my head. My OpenHab is running on a Synology Diskstation device... it's working and i can control my lighting, etc.
But I don't know how to get to a file system on the Diskstation. There's a UI to browse files, but those are on the volumes I've made on the NAS, not for whatever root file system exists where OpenHab resides.

So there's no way within the OpenHab UI to get it to install the jar file as a binding?
 

josh

Administrator
Staff member
Forum Administrator
Moderator
⭐️⭐️ Patron ⭐️⭐️
OK, I found a volume that was created called "homes" and within there, there's an OpenHab directory. and an empty "addons" folder is within openhab folder. Do i just put the .jar in that addons folder?

There's also openhab/conf and within conf are directories html, icons, items, persistence, rules, scripts, services sitemaps, sounds, things and transform

I'm a little confused if i need to add any of your things from a couple years back that you made, or if the new bindings .jar you posted takes the place of all those.
 

AlienWarlock

Well-known member
I was going to suggest this: https://www.openhab.org/docs/installation/synology.html but it looks like you are getting there already. Just drop the jar file into the empty addons folder. Then go into paper UI, click the Inbox, then choose "Search for Things" at the bottom. Pick the Kaleidescape binding and then it should find your device if is on the same subnet of the Synology.

Once you add a 'thing' for your component in should show up in 'Configuration -> Things' like this:
1592780255579.png

Click the thing and then scroll down the list of the channels and make sure you have something that looks this:

1592781059848.png

The hex number after 'player:' is the auto-generated hex id for the thing instance of this player in openhab. Copy that string and substitute in on lines 3, 11 and 19 of the attached kaleidescape.rules file. You will also note that you need to edit the commented out lines that will send a command to the light that you want to turn on. Then save the kaleidescape.rules (remove the .txt) file in 'openhab/conf/rules' on your Synology.
 

Attachments

josh

Administrator
Staff member
Forum Administrator
Moderator
⭐️⭐️ Patron ⭐️⭐️
OK... I've gotten much further.
Only issue was that auto-discovery of kaleidescape devices didn't work. Binding is installed, but even after I refresh a few times, the Inbox never shows any kaleidescape components. Lutron worked differently... once I had the binding installed, it quickly filled the "inbox" with every light, shade, keypad in the house. Not sure what went wrong with the Kaleidescape Binding.

But I manually added one of my Strato devices via IP address and it worked. It is now showing up in the Configure>Things and it gets the green light "Online"... so that part looks good.

So I have my Lutron keypad added in as a thing, the one I want to control with the script.

And sure enough, when I go to PaperUI's "Control" tab, I see my lutron keypad showing up, and pressing the buttons here in this little control panel IS properly triggering the right lighting scene... so far so good.

I made a simple UI panel in the HabPanel, and I can properly trigger those lighting scenes here as well. (learned I had to use the "switch" widget for each lighting scene rather than the "button" widget. makes no sense to me... these buttons on my wall panel that I'm triggering are buttons, not on-off switches, but anyway...)

So at this point I'm close... OpenHab can see my Strato, can see and control my lighting scenes for that room.
All I want to do now is modify your script to send a command to "press" the right button on the wall when credits roll, intermission pressed, etc. But that looks like I need some syntax to put in your script... how do i find that syntax for the "trigger lighting scene: 'movie'"?. OpenHab has it somewhere, since it's working, but I don't know how to extract that command string to put in your rule script.

THANK YOU for all your help on this... it's been a fun learning experience.
 

AlienWarlock

Well-known member
One thing I would add on the inbox... You have to click "Search for Things" at the bottom of the inbox screen. Then choose the Kaleidescape binding. The difference here is that the K binding does not do an automatic scan like other bindings because it has to look at every IP address on the local subnet and try to open a connection on port 10000. If it is able to open a connection, it then sends a few commands to interrogate the component. So I didn't want all that port scanning to happen unless it was user initiated.

I'll send you a PM on the rest.
 

josh

Administrator
Staff member
Forum Administrator
Moderator
⭐️⭐️ Patron ⭐️⭐️
Tried that "Search for Things" button at bottom of inbox several times. It runs for like 5-10 full minutes with a spinning indicator, then nothing. no devices found and added as things. Not a biggie, ,as I was able to add it manually, but just wanted to let you know that the search isn't working for me.
thanks again for help.
 

AlienWarlock

Well-known member
Hmm, it is possible your Synology/openHAB instance is on a different subnet than your K gear? It only scans the subnet that openhab is running on.
 
Top