This is an example of controlling from Vera the TinyCam Pro app on an Android device, however this process could be used to control any aspect of your Android device and your Android apps that Tasker and its plugins supports.
I was using Imperihome for viewing my IP cameras however it was janky and never worked great. For one I could not seem to get rtsp streams working in Imperihome so had to add the cameras in to Imperihome as mjpg / Snapshot only.
I was also using the Imperihome web server API to automatically display certain cameras on the Android tablets when something happened in Vera, like the doorbell is pressed or there was motion detected outside on a Z-Wave motion sensor etc. However this also wasn’t great and a lot of times the camera images would not load up and Imperihome would say connection error.
So today I have come up with another solution. I have installed TinyCam Pro on all my Android tablets and added my IP cameras in to TinyCam Pro app using the rtsp stream URLs etc.
I then wanted a way for Vera to be able to launch a particular camera image on the tablet when something happened in Vera as I said, like the doorbell or motion detected on say a Z-Wave motion sensor. Or perhaps when a door / window sensor is opened / closed, you could bring up a camera image automatically on the tablet.
To do this I have used Tasker app and another Tasker plugin app called Tasker Network Event Server (TNES).
I believe you can also use the AutoRemote app with Tasker to do this, but not sure if its WAN only? TNES works locally directly on the LAN no middle man server in the cloud.
Help documentation for TNES here.
So the basic idea is that Vera sends a HTTP command to TNES on the Android device upon the desired event happening in Vera. TNES then fires your linked Tasker action to display the correct camera on the tablet in the TinyCam Pro app.
You can also have a Tasker action to display all your cameras in TinyCam Pro at the same time.
TNES gives you a little HTTP web server in Tasker which is listening for incoming HTTP commands. The port number for TNES is 8765.
After you have installed Tasker and installed TNES you can check that the TNES web server is up and running by entering this in to your web browser on your PC.
If its working a Hello World message should be displayed in the browser. Initially whilst testing, this was not working on my Windows 10 laptop as the windows firewall was blocking the outgoing port 8765 so I just added an outbound rule to the windows firewall for that port number.
So how to set this all up in Tasker ?
In Tasker app on your Android device, create a new Profile then select Event from the menu.
Then select Plugin.
Then select Event Plugin - TNES.
Then click the Edit button on Configuration.
TNES can be used over the WAN via the Remote broker address http://thacthub.herokuapp.com you can register for an account on there. However as I am doing this only locally over my LAN I had to remove the remote broker address and blank that field.
Give your event any name.
Under filters I used the filter: doorbell==show for my doorbell camera.
Next go to Tasks in Tasker and create a new Task, give your new task a name, I called mine “Show Doorbell”.
Now add a new Action
and select Plugin
Then select TinyCam Pro
Then select the edit button on Configuration.
Here you can select “Start app with single camera” or “Start app with multiple cameras” etc. I used single camera.
and selected my Doorbell camera.
Select the back arrow on Action Edit.
At this stage on Task Edit, you can press the Play button to check that it launches TinyCam Pro and the correct camera.
Then click the back arrow on Task Edit
Now click the Tick button to save your setup.
Ensure the correct profile is linked to the correct task as you can see here.
Now to test the HTTP command from your web browser on your PC.
http://IP-Android-Device:8765/?doorbell=show
You should get a response similar to this and the camera should now be showing automatically on the Android device.
Obviously you will need to give your Android tablet a static IP address on your LAN.
To send the HTTP command from a Vera scene or PLEG action.
luup.inet.wget("http://IP-Android-Device:8765/?doorbell=show")
Or Curl
os.execute("curl -s -m 15 -X POST 'http://IP-Android-Device:8765/?doorbell=show'")
As I said at the start this could be very powerful for controlling nearly anything on the Android device like turning the screen on or off or launching other apps or basically anything that Tasker can automate on Android you can now send HTTP commands from Vera to run that Tasker action.