I have an Android tablet at my entrance with openHAB app on.
The alarm system have various sensors (magnetic doors, IR etc) and integrated with openHAB2.
I would like to act om these sensors to trigger the Android tablet to take pictures or record video.
Have you seen such app to Android that allows triggers on e.g. HTTP or some other protocol?
Do you have any other idea on how to do it?
I am not positive,but tou should be able to use tasker. i know tasker will do the camera action, just not sure that oh can trigger the action in tasker, maybe aomeone else can chime in and verify this.
Tasker should do the job for you. There are different approaches to trigger Tasker. One easy way could be NotifyMyAndroid as there is already a native action for OpenHAB. Also you may have a look at AutoRemote in combination with Tasker.
Maybe you can also make use of the OpenHAB REST API with tasker, but not sure about how to.
Assuming its on the same LAN and security is set to external, its as simple as a HTTP GET Action with the right REST URL to send commands from Tasker to OH. You could theoretically set up a polling thread in Tasker to get updates to Items as well, though using something like NotifyMyAndroid would be better.
I use Tasker as well to control my wall mounted android tablet. I utilize Tasker “Network Event Server” plugin, which acts a http server. Therefor I can send http request from openhab rules to control my tablet. Currently I can e.g. wakeup and power off the display, send say commands (TTS) to tablet, control volume of the tablet, activate habmin and also start/stop camera of the tablet. I use “IP Webcam” android app, which turns tablet as network camera, so I can get live pictures to openhab sitemaps when I need. IP webcam pro have tasker support, so I can enable and disable IP webcam from openhab.
Ok thanks…I will try out Tasker then