<SOLVED>Physical Keyboard Control

Hi all,

I’m searching for solution Idea or just a path to go.
I have OpenHab 2.4 running at Nettop, last days I have also set up new machine as HTPC (Kodi, Spotify, Netflix, Web browser etc.) with physical keyboard - both @Win10.
And what I’m looking for is to control Items with keyboard shortcuts i.e CTRL+ALT+L - turning light ON/OFF
Any Ideas ??
P.S. I can migrate OH to HTPC if it helps

Not tested by myself, but it should work: On Windows you can use Autohotkey to define actions for keys or key combinations. Using the “RUN” command you can call scripts that trigger switches via the REST API, e.g. using curl for Windows.
Your OH can stay where it is as the communication uses HTTP like in a browser.

1 Like

Big Thanks @stefan.oh,

It was fast and easy, curl is implemented @Win10 by default so everything to make it work is to make a shortcut with curl command as a target and set a shortcut key.


Curl command should look like this:
C:\Windows\System32\curl.exe --header “Content-Type: text/plain” --request POST --data “TOGGLE” http://OH_IP:PORT/rest/items/Item_Name

2 Likes

You are welcome. And thanks for letting us know how you did it :+1: