Announcement

Collapse
No announcement yet.

Projector Script

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Projector Script

    Hi all,

    Hoping someone can help me by giving me a starting point / tips for a script I am trying to create, but don't really know how to start. Basically I have a projector and a set top box, and want to be able to have a tablet with icons on it which are the channel icons. I have set up events that work fine, but i want to have a script that checks if the projector is on, and if it is, then it just runs the event, if the projector is off, it runs a turn on event, waits 5 seconds and then triggers the channel event.

    What i was thinking was i could call the script with the paramater being the event name the script would run, and it would work like this

    Script is called from within HSTOUCH, with the event name for example &hs.runscript("projector.txt","ABC2 / ABC4 (22)")

    The script runs, checks the devicevalue V30 (projector-status), if the projector is off (value 2), then the script runs event "projector-on", waits 5 seconds, and then runs the event passed through the params.

    If the devicevalue of V30 is 1 (ON) then the script would just pass through the param event to be run and not worry about turning on the projector.

    Thanks guys!
    HS3 PRO, Win10, WeatherXML, HSTouch, Pushover, UltraGCIR, Heaps of Jon00 Plugins, Just sold and about to move so very slim system.

    Facebook | Twitter | Flickr | Google+ | Website | YouTube

    #2
    Code:
    Sub Main(ByVal Parms As String)
    
    If hs.devicestatus("V30") = 2 Then
    
    hs.triggerevent("projector-on")
    hs.waitsecs(5)
    
    End If
    
    If Parms <> "" Then
    hs.triggerevent(Parms)
    End If
    
    End Sub
    As is normal with scripting there are different ways of doing the same thing, that should be somewhere to start though...I wrote that as a vb.net script but there are no massive changes needed if you want vbscript

    Comment


      #3
      Have you considered the Harmony Link remote?
      Mike____________________________________________________________ __________________
      HS3 Pro Edition 3.0.0.548, NUC i3

      HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

      Comment


        #4
        The projector script worked perfectly, thanks for your help!
        I had considered other remotes, but given i have two WF2IR devices, and wanted to intergrate the projector, set top box, and HSTV as well as other automation scripts and so on it was best to use the global cache plugin and homeseer directly to control devices.
        HS3 PRO, Win10, WeatherXML, HSTouch, Pushover, UltraGCIR, Heaps of Jon00 Plugins, Just sold and about to move so very slim system.

        Facebook | Twitter | Flickr | Google+ | Website | YouTube

        Comment


          #5
          I have something basic setup for my 4yr old. Just a plain HSTouch screen with channels just for her. I use the DirecTV SHEF command-set to change the channel over IP. This is running on a cheap android tablet. I'm still working on the buttons, but its coming along:
          Attached Files
          HS4Pro on a Raspberry Pi4
          54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
          Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

          HSTouch Clients: 1 Android

          Comment


            #6
            That screen looks great, that is exactly what i was thinking I would do, but with IR. and just wanted a way of being able to turn on the projector if it was off automatically when a button is hit, so you don't need to worry about turning on the projector, then waiting etc, now you just hit a button and the system takes care of the rest.

            When the device gets turned on (through the event) it sets a virtual device as ON, so i can keep track of if the projector is on or off, same with the set top box connected to the projector.
            HS3 PRO, Win10, WeatherXML, HSTouch, Pushover, UltraGCIR, Heaps of Jon00 Plugins, Just sold and about to move so very slim system.

            Facebook | Twitter | Flickr | Google+ | Website | YouTube

            Comment

            Working...
            X