by johnfdl » Fri Dec 07, 2018 4:17 pm
Just updating my set-up here as my system has had some changes (the first post above shows my original set-up):
Use case: Show camera feed on big screen TV when someone approaches the house
Parts Involved:
- Dakota Driveway Alert (I have this one)
- Z-Wave Window Sensor | I have this one
- Amazon Fire TV Cube
- IP Security Camera | I have this one
- Android Debug Bridge (for controlling FireTV via script commands)
Steps involved:
- Install ADB on your Indigo Mac
- Set up Dakota driveway alert outdoors
- Connect Zwave Window Sensor to NC (or NO) output on Dakota receiver. This then acts like any zwave window sensor so that when the driveway beam is broken, the sensor is triggered.
- Connect Amazon Fire TV Cube to TV via HDMI cable
- Install VLC app on FireTV cube as this will play the RTSP stream (and can be controlled remotely via Indigo script and ADB)
- Tell Indigo to play RTSP (camera) stream when Dakota Beam is tripped. I do it as follows:
Indigo Trigger: Driveway Sensor Device State Changed to On
Actions: Execute Action Group (Server Actions) named Show Driveway Cam
Show Driveway Cam Action Group:
Run the shell script below which does the following
Connect via ADB to the Fire TV
Pause Fire TV (so if we are watching something, we don't miss any of our show)
Launch VLC and open camera stream using the following script, then go back and unpause TV
- Code: Select all
#!/bin/bash
/Users/MacUser/Downloads/platform-tools/adb connect 192.168.2.91
/bin/sleep 2
/Users/MacUser/Downloads/platform-tools/adb shell input keyevent KEYCODE_MEDIA_PLAY_PAUSE
/Users/MacUser/Downloads/platform-tools/adb shell am start -n org.videolan.vlc/org.videolan.vlc.gui.video.VideoPlayerActivity -a android.intent.action.VIEW -d rtsp://192.168.2.111/live_mpeg4.sdp
/bin/sleep 12
/Users/MacUser/Downloads/platform-tools/adb shell input keyevent 4
/Users/MacUser/Downloads/platform-tools/adb disconnect
Notes:
This should work with most of the Dakota products, but I prefer the break beam product as it reduces the number of false alarms caused by heavy winds, leaves, or other false alarms associated with motion sensors. It has three beams and requires two or three of the beams (I can't remember) to be interrupted simultaneously, so if a leaf falls, it won't set it off. Set it up 3 ft off the ground to also eliminate any woodland creatures setting it off. I'm quite happy with the very few false alarms it produces. The worst thing was it stopped working (seems the internal battery died) after a year and a half so it had to be replaced (and it aint cheap). I have it strapped to trees on either side of my driveway, about 50 ft apart because my yard landscape prevents anyone from approaching the house without using the driveway, but I think the beams can be up to 300 feet apart. The hardest part of the entire set up was getting these beam units aligned well. I have them zip tied to trees.
It does not turn on the TV if it's not already on. I can't add logic for that since my TV is not 'smart', but I do have a sonos sound bar, and have played with having it announce "Alexa, Turn on TV" which works (as the TV is CEC so FireTV will turn it on), but if the TV is already on, it sometimes gets confused and actually turns the TV off. Fortunately, my TV is almost always on, and if it's not, when I hear the Dakota 'door bell' chime, I can always tell Alexa to turn TV on if it's not so I can then see the driveway cam.
This set-up, is my second favorite killer app for my Home Automation. The first is the RPiBeacons I have that monitor my XY BLE tags, and unlock the door and disarm the alarm when the tag comes within range (and arms/locks when all tags are out of range).
Just updating my set-up here as my system has had some changes (the first post above shows my original set-up):
Use case: Show camera feed on big screen TV when someone approaches the house
Parts Involved:[list]
[*] Dakota Driveway Alert (I have this [url=https://www.amazon.com/exec/obidos/ASIN/B0083OAASM]one[/url])
[*] Z-Wave Window Sensor | I have this [url=https://www.amazon.com/gp/product/B008Q5CTBE/ref=oh_aui_search_detailpage?ie=UTF8&psc=1]one[/url]
[*] Amazon Fire TV Cube
[*] IP Security Camera | I have this [url=https://www.amazon.com/exec/obidos/ASIN/B00Y0LXDZE]one[/url]
[*] [url=https://www.moellerstudios.org/how-to-obtain-and-install-adb-on-a-mac/]Android Debug Bridge[/url] (for controlling FireTV via script commands)[/list]
Steps involved:
[list=1]
[*] [url=https://www.moellerstudios.org/how-to-obtain-and-install-adb-on-a-mac/]Install ADB on your Indigo Mac[/url]
[*] Set up Dakota driveway alert outdoors
[*] Connect Zwave Window Sensor to NC (or NO) output on Dakota receiver. This then acts like any zwave window sensor so that when the driveway beam is broken, the sensor is triggered.
[*] Connect Amazon Fire TV Cube to TV via HDMI cable
[*] Install VLC app on FireTV cube as this will play the RTSP stream (and can be controlled remotely via Indigo script and ADB)
[*] Tell Indigo to play RTSP (camera) stream when Dakota Beam is tripped. I do it as follows:
Indigo Trigger: Driveway Sensor Device State Changed to On
Actions: Execute Action Group (Server Actions) named Show Driveway Cam[/list]
Show Driveway Cam Action Group:
Run the shell script below which does the following
Connect via ADB to the Fire TV
Pause Fire TV (so if we are watching something, we don't miss any of our show)
Launch VLC and open camera stream using the following script, then go back and unpause TV
[code]#!/bin/bash
/Users/MacUser/Downloads/platform-tools/adb connect 192.168.2.91
/bin/sleep 2
/Users/MacUser/Downloads/platform-tools/adb shell input keyevent KEYCODE_MEDIA_PLAY_PAUSE
/Users/MacUser/Downloads/platform-tools/adb shell am start -n org.videolan.vlc/org.videolan.vlc.gui.video.VideoPlayerActivity -a android.intent.action.VIEW -d rtsp://192.168.2.111/live_mpeg4.sdp
/bin/sleep 12
/Users/MacUser/Downloads/platform-tools/adb shell input keyevent 4
/Users/MacUser/Downloads/platform-tools/adb disconnect[/code]
Notes:
This should work with most of the Dakota products, but I prefer the break beam product as it reduces the number of false alarms caused by heavy winds, leaves, or other false alarms associated with motion sensors. It has three beams and requires two or three of the beams (I can't remember) to be interrupted simultaneously, so if a leaf falls, it won't set it off. Set it up 3 ft off the ground to also eliminate any woodland creatures setting it off. I'm quite happy with the very few false alarms it produces. The worst thing was it stopped working (seems the internal battery died) after a year and a half so it had to be replaced (and it aint cheap). I have it strapped to trees on either side of my driveway, about 50 ft apart because my yard landscape prevents anyone from approaching the house without using the driveway, but I think the beams can be up to 300 feet apart. The hardest part of the entire set up was getting these beam units aligned well. I have them zip tied to trees.
It does not turn on the TV if it's not already on. I can't add logic for that since my TV is not 'smart', but I do have a sonos sound bar, and have played with having it announce "Alexa, Turn on TV" which works (as the TV is CEC so FireTV will turn it on), but if the TV is already on, it sometimes gets confused and actually turns the TV off. Fortunately, my TV is almost always on, and if it's not, when I hear the Dakota 'door bell' chime, I can always tell Alexa to turn TV on if it's not so I can then see the driveway cam.
This set-up, is my second favorite killer app for my Home Automation. The first is the RPiBeacons I have that monitor my XY BLE tags, and unlock the door and disarm the alarm when the tag comes within range (and arms/locks when all tags are out of range).