Although I’ve been tinkering with home automation for a couple of years, I barely scratched the surface and I still feel green about it. Hopefully you can point me in the right direction.
I’d like to use a Mobotix video doorbell’s “light” button to turn on the outside lights for a few minutes. Nothing fancy.
Most of the components for the execution end are already in place: openHAB is configured with the KNX interface and can control the lights, and the script to react on a trigger to turn the lights on and off after a few minutes is not that hard to build.
The part I don’t know is how to handle the trigger from the Mobotix camera. It can only send a HTTP (GET but not POST) request, with or without waiting for a response, or a raw TCP packet with whatever content I want, when the button is pressed. Not very integration-friendly with other solutions, but works with other Mobotix devices.
What software can react to that HTTP request (or raw TCP connection)? Can openHAB be triggered somehow with a specially constructed URL? Do I need some sort of other software to listen to HTTP requests and send another type of message out (MQTT)? Do I need another automation engine like Node Red just for this?
Is there an obvious solution staring at me and I’m just oblivious to it?
I looked at the HTTP Binding but that seems to work the other way around - openHAB sending HTTP requests to trigger actions in other devices or to pull data in from other systems. The one-line description for the binding is not that self-explanatory to me.
The URL invoked is: http://openhab_ip:port/httplistener/script_id?run=GO . I also tried with action=something or without GET parameters, but the script is not running. Any clue what am I doing wrong, please?
Sorry for the delay, I was on a work-related trip with no time to access remotely the homelab. And thank you for the prompt offer to look into the details!
The script_id is really the ID.
I caught up a bit with sleep deficit and found my mistake I was trying to invoke the Script UID to test that the lights are turning on and off, but that didn’t work.
Now I created a Rule with the same script to be executed, and put the HTTP Thing as Trigger. I can trigger the Thing and it starts the Rule with the script just fine. All I have to do is configure the Mobotix camera with the URL and that’s it.