Simple socket API for info

If you have a suggestion for a feature, post it here
Post Reply
ManChicken
Posts: 3
Joined: Mon Jun 10, 2013 5:07 pm

Simple socket API for info

Post by ManChicken » Sun Jan 24, 2016 7:26 pm

I've been looking at openHAB for some home automation stuff, and am about to (like, tomorrow :) install a bunch of Z-wave switches and dimmers in my basement where my TV/PS3/etc are. One thing I thought would be cool to be able to do was program a "movie mode" into my system so that once I get settled in my chair and hit it, it dims my lights down over 5 or 10 seconds.. which I can already do.

But then what I thought would be cool is (and here's where the request comes in) I want it to be able to monitor UMS so it knows how far along in whatever it's playing is, so I could then program the lights to automatically dim back up part way once the playback reaches say 6 minutes from the end (average when credits start) and then come all the way back on once playback is over.

I envision this being something simple, like a socket UMS listens on that when it gets a connection just spits out some XML or a JSON object that gives the status of any active streams.. perhaps the IP of the device, the name of the media being played, it's current time and the duration of the media, and then disconnects. It doesn't have to be a complex 2-way protocol or anything. I can then just poll the server once every few minutes from the openHAB side and respond accordingly.

User avatar
valib
Developer
Posts: 651
Joined: Fri Feb 08, 2013 3:11 am

Re: Simple socket API for info

Post by valib » Mon Feb 08, 2016 3:54 am

The best way to fulfill your request would be to make your own plugin.

Post Reply