I recently purchased the Hikvision DS-2CD2387G2P-LSU/SL outdoor camera and have been exploring its integration with OpenHAB. One of my main goals was to set up an alarm system that triggers actions like flashing lights or sounding an alarm bell when motion is detected, especially when the house is empty.
Initially, I was unsure how to trigger the ‘alarm-in’ action through OpenHAB. After some research, I discovered that while the camera itself doesn’t have a direct ‘alarm-in’ channel, there are workarounds using REST API calls or connecting the alarm-in cable. I decided to try the REST API approach first, as it seemed less invasive.
Here’s what I did: I set up a rule in OpenHAB that sends a REST API command to the camera when motion is detected. This command activates the built-in siren and flashing lights. It was a bit of trial and error, but I managed to get it working by referencing the camera’s API documentation.
I also explored the idea of using the alarm-in cable for a more direct integration, but I’m happy with the REST API solution for now. It’s been a great learning experience, and I’m excited to expand this setup further. If anyone has additional tips or alternative methods, I’d love to hear them!