Author Topic: Change Channels  (Read 1533 times)

Offline ny2pit

  • Newbie
  • *
  • Posts: 15
  • Karma: +0/-0
Change Channels
« on: March 19, 2016, 03:36:24 pm »
Rene,

 Bravo on a fantastic plug in.  I have it running great, and Echo now controls my AV stuff.  Fantastic work!

 I have looked around on these boards and not found a great answer to this.  I have a wakeup event triggered by a google calendar event to slowly turn on my lights over 1/2 hour, disarm the alarm, turn up the thermostats, etc.  What I'd like to also do is have the TV turn on and to a specific (news/weather) channel.  I can get the TV to come on, no problem.  However, getting a specific channel is more problematic.  Do you have a way to do this?

-I figure I could create a child device and have it send the channel number via that.
-I thought I had read about using the plug in to call the "favorites" channel that Harmony sets?  I haven't again been able to find this or figure out how to do that ...

Any help is appreciated!  Thanks!

 NY

Offline Chrisfraser05

  • Sr. Member
  • ****
  • Posts: 449
  • Karma: +16/-31
Re: Change Channels
« Reply #1 on: March 19, 2016, 06:09:24 pm »
The way I did it was create a child device for my satellite box and create buttons for the numbers.

Then I created a vera scene, manually triggered with an action for each number and a delay between.

So for for channel 601 immediate action 6, delay 1 second 0 etc.

Then I call the scene from pleg after turning the harmony scene for watch satellite.

Offline reneboer

  • Moderator
  • Hero Member
  • *****
  • Posts: 1380
  • Karma: +79/-30
Re: Change Channels
« Reply #2 on: March 23, 2016, 05:44:00 am »
Hi NY,

Thanks for the complement.

My self I have the channel set as part of the Harmony activity as the same receiver is used for radio as well. So that is an option and the other is a scene with PLEG as Chris explained.

You can also use a little LUA code as part of the scene as below. When you then use the MultiSwitch plugin for your favourite channels you can use that as scene triggers.
Code: [Select]
luup.call_action("urn:rboer-com:serviceId:Harmony1", "IssueDeviceCommand",{DeviceID="12345678",Command="6",Duration="0"},HDID)
luup.call_action("urn:rboer-com:serviceId:Harmony1", "IssueDeviceCommand",{DeviceID="12345678",Command="0",Duration="0"},HDID)
luup.call_action("urn:rboer-com:serviceId:Harmony1", "IssueDeviceCommand",{DeviceID="12345678",Command="1",Duration="0"},HDID)

You must set the correct DeviceID for how the Harmony knows your TV. You can see that as variable DeviceID of your TV device. HDID is de device number of the main Harmony device.

You may need to put in a little delay to allow the TV to be fully switched on. Best to then make a function and use a luup.call_delay to call that function.

Cheers Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline NickTheGreat

  • Full Member
  • ***
  • Posts: 156
  • Karma: +3/-5
Re: Change Channels
« Reply #3 on: April 27, 2016, 04:16:46 pm »
The Vera scene with delays between numbers didn't work for me.  Will try the LUA code bit and see if that works. 

Thanks for the help and for the plug-in, as far as that goes!  ;D

Offline cw-kid

  • Hero Member
  • *****
  • Posts: 1557
  • Karma: +16/-2
Re: Change Channels
« Reply #4 on: March 07, 2018, 10:09:21 am »
Hi

So it is not possible to change channels using the Harmony plug-ins http request handler ?

To send a json http command to change to a certain channel number ?

Thank you.

Offline reneboer

  • Moderator
  • Hero Member
  • *****
  • Posts: 1380
  • Karma: +79/-30
Re: Change Channels
« Reply #5 on: March 07, 2018, 02:06:29 pm »
Hi,

Yes, you can but you still have to send the separate commands for each button press. You cannot populate the channel as a single number in a single request. At least I have not see commands for any device to do that.

Cheers Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline cw-kid

  • Hero Member
  • *****
  • Posts: 1557
  • Karma: +16/-2
Re: Change Channels
« Reply #6 on: March 07, 2018, 02:18:38 pm »
Hi,

Yes, you can but you still have to send the separate commands for each button press. You cannot populate the channel as a single number in a single request. At least I have not see commands for any device to do that.

Cheers Rene

Hi Rene

Google Home only supports one Harmony hub. I was thinking for the second hub / room of using IFTTT Webhooks to send a http request to change to a certain channel number.

But I dont think I can send more than one command url with webhooks so it probably wont work.

Thanks.