I’ve just got OpenHAB up and running on Windows with some z-wave devices which is great!
Now I’m wondering if I can control programs on my computer? From example if I have something like “LaunchMe.exe” can I get OpenHAB to launch it? What about an already running program, can I send it commands somehow? What about feedback from the program to OpenHAB?
Thanks for any insights!
tl;dr Depends on the program you want to talk to or receive info from
Big question and the answer will depend on program in question.
You can launch program and scripts using the Exec binding and executeCommandLine actions.
Sending commands depends on whether or not the program in question has an Application Programming Interface (API) implemented that openHAB can talk to. Something like a HTTP REST API, MQTT, TCP socket, etc. The vast majority of the programs on a typical Windows machine will not have an API like this.
To send data to openHAB, the program has to be able to communicate one of the ways openHAB is able to communicate. For example, openHAB has an HTTP REST API that other programs can use to change or read the state of Items in openHAB. MQTT is another popular way. Again,the vast majority of programs on a typical Windows machine will not have the ability to communicate in this manner.
Thanks for the reply, I’ll look into the binding and see if there’s anything I can do. My immediate reason for doing this is to control software that allows me to create multi-zoned audio (such as chevolume or plethra). Do you happen to know what software people use to create multi-zoned audio and have it controlled through OpenHAB?
I think most people use special purpose audio equipment with an api like sonos, yamaha, etc. I’ve honestly never seen the point of trying to automate audio video with openhab. I have yet to come up with a use case that I care about where the automation makes the system easier to use. Therefore I’ve spent zero time researching these systems.