Results 1 to 7 of 7

Thread: insert pause between ir actions

  1. #1
    Join Date
    Apr 2016
    Posts
    28

    Default insert pause between ir actions

    trying to get my tv ir input to fire twice. i have 2 actions and tried putting a timer in between but it is only changing the input one time

  2. #2
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,553

    Default

    You'll need a macro. Inside the macro you'll need the first IR out, then a "WAIT" action set to 250ms and the last IR out action. Try that if that doesn't work upload your GML (or part thereof) here.
    Ron
    No support through PM

  3. #3
    Join Date
    Apr 2016
    Posts
    28

    Default

    forgot about the wait action it worked.

    two questions :
    is there a way to create an action that will play a wave file?

    i have created buttons for stations and I would like to display the current program title in a box. Below is the http command that returns the following. What Lua code should I use? I would like to poll every one minute.

    This is the command I'm running against my DirecTV receiver - http://<ip>:8080/tv/getProgInfo?major=245

    which returns the following information:

    "callsign": "TNTHD",
    "date": "20071106",
    "duration": 3600,
    "episodeTitle": "Intern in the Incinerator",
    "isOffAir": false,
    "isPclocked": 3,
    "isPpv": false,
    "isRecording": false,
    "isVod": false,
    "major": 245,
    "minor": 65535,
    "programId": "5082014",
    "rating": "TV-14-D-L-V",
    "startTime": 1349794800,
    "stationId": 2220257,
    "status":
    "code": 200,
    "commandResult": 0,
    "msg": "OK.",
    "query": "/tv/getProgInfo?major=245"
    ,
    "title": "Bones"

  4. #4
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,553

    Default

    excellent!

    this is untested but probably an approach you can take:

    Code:
    local poller = function()
      network.get("http://<ip>:8080/tv/getProgInfo?major=245", function(data) 
        data = "{" .. data .. "}"
        print(data)
        table.print(json.decode(data))
      end)
    end
    
    pollTimer= timer.new(60000, function(t)
      print("polling...")
      poller()
    end)
    pollTimer:start()
    Ron
    No support through PM

  5. #5
    Join Date
    Apr 2016
    Posts
    28

    Default

    is this going to return all data? i just need the title. what action do i use?

    also is there a way to create an action that will play a wave file?

  6. #6
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,553

    Default

    Place this in a scripting action and run it on Girder startup. The play way action lives in the system folder.

    Code:
    local poller = function()
      network.get("http://<ip>:8080/tv/getProgInfo?major=245", function(data) 
        data = "{" .. data .. "}"
        print(data)
        local d = json.decode(data)
        print(d.episodeTitle)
      end)
    end
    
    pollTimer= timer.new(60000, function(t)
      print("polling...")
      poller()
    end)
    pollTimer:start()
    Ron
    No support through PM

  7. #7
    Join Date
    Apr 2016
    Posts
    28

    Default

    thanks ron. how do i display on net remote?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •