Announcement

Collapse

Contacting HomeSeer This Week

HomeSeer is open and operational this week. All orders are being processed and shipped as usual. However, some staff are working from home. If you need to contact HomeSeer for support or customer service, please use our Email or Chat options. https://homeseer.com/contact-us/
See more
See less

TivoWeb Users:- Simple displaytext script

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

  • TivoWeb Users:- Simple displaytext script

    I've only had HS for 7 days (day 7 of trial) so apologies if this can be done in a more simple way, but I wanted to display a message on my TV via TivoWeb when a motion detector is activated in my garden.

    UK only has series 2 Tivo's so I have no idea whether it works for other types.
    Code:
    Sub Main(msg) 
          
          svr="http://192.168.0.1:80/"  'URL(:port) to your TivoWEB Server
          tim=10						 'Length of time (secs) to display message on TV
          
          dim msgtmp
          set msgtmp = hs.CreateStringClass
          msgtmp.Add "displaytext?text="
          msgtmp.Add msg
          msgtmp.Add " &delay="
         msgtmp.Add tim
          
          hs.GetURL svr,msgtmp, False, 80
          
          End Sub
    This uses the Tivoweb DisplayText module (installed on the Tivo), but I've yet to find a TivoWeb user who doesn't have that installed already. You'll also need to edit the URL to that of your Tivoweb server and add:- ("main","MOTION DETECTOR ACTIVATED") to the Event's Optional Parameters to get the message to display. I did it this way so that the same script can be used for multiple events with a custom message for each.


    I also created another to make sure the kids aren't watching TV too late...

    Code:
    Sub Main
          'Simple script for people who use TiVoWeb's displaytext function to enable
          'messages to appear on the TV depending on the status of a specified module
          
          svr="http://192.168.0.1:80/"  'URL(:port) to your TivoWEB Server
          tim=10						 'Length of time (secs) to display message on TV
          mes1 = "Kid's TV is Turned Off" 'Message if Device was off
          mes2 = "Kid's TV is Turned On"  'Message if Device was on
          dvc = "A4"				 'Module address being monitored
          
          if hs.IsOff(dvc) then
          	 msg=mes1
          else
          	 msg=mes2
          end if
          
          'Now build the URL line syntax
          dim msgtmp
          set msgtmp = hs.CreateStringClass
          msgtmp.Add "displaytext?text="
          msgtmp.Add msg
          msgtmp.Add " &delay="
          msgtmp.Add tim
          
          hs.GetURL svr,msgtmp, False, 80
          
          End Sub
    Hope these are of use to someone,

    Mark.
    Last edited by Mark Ward; January 21st, 2006, 08:47 AM.
Working...
X