Indigo is my new favorite color Post a reply

This question is a means of identifying and preventing automated submissions.



:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:
BBCode is ON, [img] is ON, [flash] is OFF, [url] is ON, Smilies are ON

Post options


   

Expand view Topic review: Indigo is my new favorite color

Re: Indigo is my new favorite color

Post by mundmc » Wed Dec 19, 2018 1:13 pm

Nice! Great implementation!


Sent from my iPhone using Tapatalk

Re: Indigo is my new favorite color

Post 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:

  1. Install ADB on your Indigo Mac
  2. Set up Dakota driveway alert outdoors
  3. 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.
  4. Connect Amazon Fire TV Cube to TV via HDMI cable
  5. Install VLC app on FireTV cube as this will play the RTSP stream (and can be controlled remotely via Indigo script and ADB)
  6. 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).

Re: Indigo is my new favorite color

Post by durosity » Tue May 23, 2017 6:04 pm

“fatured”. Featured?

Plus as well you’ve said before there’ll not likely be any more development on AppleScript so some things just aren’t possible to do with that at all anyway :)

Re: Indigo is my new favorite color

Post by jay (support) » Tue May 23, 2017 5:58 pm

johnfdl wrote:
Thanks Jay. I switched them out to Python using your suggested syntax and it works like a charm. I appreciate the suggestion.


NP. If you ever get the itch to use an AppleScript, assume that whatever you want to do would be significantly easier in Python. Not always true, but it's fairly likely... ;) Python is an amazingly full-featured language.

Re: Indigo is my new favorite color

Post by durosity » Tue May 23, 2017 5:38 pm

Japple55 wrote:
Matt, Jay and the entire Indigo community are top-notch...except for Durosity...you've got to watch him. :lol:


Slanderous lies! I’ll see you in court, buddy!

Re: Indigo is my new favorite color

Post by johnfdl » Tue May 23, 2017 5:36 pm

Thanks Jay. I switched them out to Python using your suggested syntax and it works like a charm. I appreciate the suggestion.

Re: Indigo is my new favorite color

Post by jay (support) » Tue May 23, 2017 5:29 pm

And, there's a Denon plugin by one of our developers that might work for you.

Re: Indigo is my new favorite color

Post by jay (support) » Tue May 23, 2017 5:25 pm

I think you can save yourself all those shell windows by just hitting the URL's from a simple Python script. There are actually a variety of ways of doing this since there are several built-in url libraries in Python (and a great 3rd party one that we include with Indigo). Here's one:

Code: Select all
import urllib
urllib.urlopen("http://192.168.2.121/MainZone/index.put.asp?cmd0=PutZone_InputFunction%2FGAME2")


Thanks for the kind words - we try hard to make it easy for you.

Re: Indigo is my new favorite color

Post by Japple55 » Tue May 23, 2017 5:03 pm

Thank you for the detailed explanation! I don't have that set up but you've given me some good ideas. And I couldn't agree more about Indigo vs. all the other "toys" out there. I, too, could have saved myself a lot of aggravation by avoiding SmartThings, Vera, etc. Matt, Jay and the entire Indigo community are top-notch...except for Durosity...you've got to watch him. :lol:

Jim

Re: Indigo is my new favorite color

Post by johnfdl » Tue May 23, 2017 4:47 pm

howartp wrote:
What AV/stereo unit do you have?
I think I could do this with my LG TV, switching inputs via GC100 - hadn't thought about that approach - was thinking you were interrupting / overlaying the hdmi signal somehow.

I have a Denon AVR2112CI. It can be controlled via HTTP so I used that approach since the Denon plug-in for Vera (where I first architected this) had spotty results. My TV, while networked connected has no API for controlling it over IP so I must use the stereo. I didn't even think to mess with HDMI overlay.

Re: Indigo is my new favorite color

Post by howartp » Tue May 23, 2017 4:04 pm

What AV/stereo unit do you have?

I think I could do this with my LG TV, switching inputs via GC100 - hadn't thought about that approach - was thinking you were interrupting / overlaying the hdmi signal somehow.


Sent from my iPhone using Tapatalk

Re: Indigo is my new favorite color

Post by johnfdl » Tue May 23, 2017 1:48 pm

Parts Involved:
  1. Dakota Driveway Alert (I have this one)
  2. Z-Wave Window Sensor | I have this one
  3. Small Fanless PC with HDMI Output | I have this one]
  4. HDMI Cable connecting PC to AV Unit
  5. IP Security Camera | I have this one

  1. Set up driveway alert outdoors
  2. 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.
  3. Connect PC to AV or TV via HDMI cable
  4. Install VLC Player on PC as this will play the RTSP stream (and can be controlled remotely via HTTP commands)
  5. Set UP VLC to accept web control following the instruction here
  6. Start VLC and make sure it starts with any PC reboot. I do it via this (Windows) command in autostart: cd\Program Files\VideoLAN\VLC
    vlc --http-port 8181
  7. Tell Indigo to play RTSP (camera) stream when Dakota Beam is tripped. I do it as follows:
  8. Indigo Trigger: Driveway Sensor Device State Changed to On
  9. Actions: Execute Action Group (Server Actions) named Show Driveway Cam

Show Driveway Cam Action Group:
  • Pause Tivo (so if we are watching something, we don't miss any of our show)
  • Switch AV to the input carrying the PC/HDMI using the following applescript (note, my Stereo can be controlled via HTTP commands so you'd adjust this step based on your AV or TV setup)
    Code: Select all
    tell application "Terminal"
       tell settings set "Basic"
          set title displays device name to false
          set title displays shell path to false
          set title displays window size to false
          set title displays settings name to false
          set title displays custom title to true
          set custom title to "DrivewayCam"
          do script "wget \"http://192.168.2.121/MainZone/index.put.asp?cmd0=PutZone_InputFunction%2FGAME2\""
       end tell
    end tell
  • Call the RTSP stream on the PC connected to the stereo (has to be on the same network) using this applescript. Note the 192.168.2.120 is the IP address of the AV unit and the 192.168.2.111 is the IP address of the IP Camera. You will need to adjust the wget command based on your camera's stream syntax and IP address)
    Code: Select all
    tell application "Terminal"
       tell settings set "Basic"
          set title displays device name to false
          set title displays shell path to false
          set title displays window size to false
          set title displays settings name to false
          set title displays custom title to true
          set custom title to "DrivewayCam"
          do script "wget \"http://192.168.2.120:8181/requests/status.xml?command=in_play&input=rtsp://admin:password@192.168.2.111/live_mpeg4.sdp\""
       end tell
    end tell
  • Stop the video stream (I set this with a 20 sec delay which gives me enough time to see who is coming up the driveway) via this applescript:
    Code: Select all
    tell application "Terminal"
       tell settings set "Basic"
          set title displays device name to false
          set title displays shell path to false
          set title displays window size to false
          set title displays settings name to false
          set title displays custom title to true
          set custom title to "DrivewayCam"
          do script "wget \"http://192.168.2.120:8181/requests/status.xml?command=pl_stop\""
       end tell
    end tell
  • Revert AV back to main input via this applescript after the 20 sec delay (Again, varies based on your setup, system and capabilities):
    Code: Select all
    tell application "Terminal"
       tell settings set "Basic"
          set title displays device name to false
          set title displays shell path to false
          set title displays window size to false
          set title displays settings name to false
          set title displays custom title to true
          set custom title to "DrivewayCam"
          do script "wget \"http://192.168.2.121/MainZone/index.put.asp?cmd0=PutZone_InputFunction%2FSAT%2FCBL\""
       end tell
    end tell
  • Unpause the Tivo (22 sec delay)
  • This applescript cleans up any open terminal windows created by this process:
    Code: Select all
    tell application "Terminal" to close (every window whose name contains "DrivewayCam")
I know zero about applescript.....these are modifications from my Vera setup so if there are suggestions to improving the applescript code, I am all ears.

Re: Indigo is my new favorite color

Post by howartp » Tue May 23, 2017 12:56 pm

Different Computers wrote:
Amen to all that.

How do you make the "pop up on the TV" part of this happen?

Ditto!


Sent from my iPhone using Tapatalk

Re: Indigo is my new favorite color

Post by durosity » Tue May 23, 2017 12:51 pm

Yeah the cost is high.. but worth it just for the stability alone. At present my indigo server (an old Mac Pro) has been running for 60 days and indigo has been on since startup with not a single hiccup.


Sent from my iPad using Tapatalk

Re: Indigo is my new favorite color

Post by Different Computers » Tue May 23, 2017 10:04 am

Amen to all that.

Using Dakota Beam Driveway Sensor, combined with cameras, have my IP Cams pop up on the TV when the driveway beam is broken so we can see who is approaching


How do you make the "pop up on the TV" part of this happen?

Top