Jump to content

Alexa and Time/Date Based Variables


smithlevenson

Recommended Posts

OK. This may end up being too big of a pain in the *** to implement (ie if each date has to be its own variable), but what I am trying to do is have the ISY look up the date of a sports program and automatically change the cable box to that channel. I have a table of the dates and channels, and I have Alexa working fine changing to the Name or Number of any particular channel. So what I need to figure out is how to have a variable check an external source for the channel and save that into memory of the variable so Alexa can access it. Am I trying to do something that can't be done succinctly?

Link to comment

 So what I need to figure out is how to have a variable check an external source for the channel and save that into memory of the variable so Alexa can access it. 

 

A variable can't do that. A variable is a place to keep a value. It doesn't "do" anything.

 

You need a program. And probably not an ISY program, but an external program, on some always-on computer, Raspberry Pi, etc.

 

What is the "external source"? What format is the data in, and what you you have to do to fetch it?

 

Once an external source is checked and (what?) is saved into memory, what is Alexa to do with it? It's not clear what it is you are trying to accomplish. Change the channel at a certain time, according to a list of times and channels?

 

I'm not sure that ISY is very appropriate for this at all. How do you change the cable box channel? Global Cache'? Some other IR dongle? Do you use some AV controller app (iRule, Simple Control, etc.)? If so, do you have their server installed?) (e.g. Simple Control has Simple Hub).

Link to comment

ISY can't check the date of something.  Something else can send the date to ISY via the REST interface.  You would post it to an ISY variable (or probably several variables for 1) day of month, 2) month of year, 3) year, 4) hour, 5) minute, and 6) channel).  Then ISY can compare (with version 5 only) the current time/date against those variables and when the condition is met, trigger a "then" section to fire.  Perhaps your TV has an IP interface (I assume it does since Alexa can control it) which ISY could command via the ISY network module.

 

The biggest hurdle in all of this would be what it is that sends the info to ISY.  But frankly, whatever it is that does that, could probably just as easily skip the ISY and send the network command directly to the TV.

 

Not sure where Alexa comes to play in any of this, except perhaps to demonstrate that indeed your TV can be controlled via an IP interface?

Link to comment

ISY is awkward for controlling AV, especially at low-level with IR commands. Somebody posted here recently about having 800 programs to send IR commands!

 

A better way if you want your ISY to do some AV control is to use and AV remote solution like Simple Control or Logitech Harmony that has a (usually optional) always-on server component. This can be in the form of a hardware box or software that runs on some always-on computer. (Simple Control offers both.)

 

Now, instead of sending IR commands to devices, you send activities and device commands to a server. Besides being more convenient, this eliminates having two sources of IR command which might be different (making it difficult to debug!). The server ALWAYS sends the IR commands.

 

I don't think ISY is a good choice for PRIMARY control of AV equipment. It is useful as an adjunct - e.g. to allow you to do limited control over AV equipment from Insteon switches.

Link to comment

ditto. I used to have tons of IR, IP and serial control in my network resources but it was a mess. I switched to using Simple control Hub, sending REST from ISY to start activities. It works great. Simple Control does not have yet direct Smart Home commands in Alexa but through ISY programs I can control all AV activities using Alexa. It is great to have one, central repository of all AV control commands in the Simple Control Hub that shared by all iOS devices remote controls and ISY.

I finally cleaned tons of low level staff from Network resources. Not having sub second delays, feedback, ISY just not well suited for AV control.

Link to comment

Thanks for all the replies. I have the global cache and it Uses Alexa voice commands to switch a state variable and trigger programs that use the network module to send a command to the global cache and received by thee relevant AV component as an IR command. That part works perfectly.

 

I just need some program or other that changes a state variable to say 884 if that days game is on channel 884. I have everything handled from that part on (and yes it is hundreds of programs to control the IR). I guess this is better handled with an outside program and use REST to change the variable to that number. I was just trying to avoid the always running trap so I didn't get a program crash and the variable doesn't get updated.

 

I used the ISY for IR mainly to avoid the "multiple points of control" issue that I think we all get with each new interconnected device and some dumb ones (like my projector) I also wanted to make sure things like having the Projector turn off if no motion is detected for 2+ hours to save the bulb works reliably. I have had very few issues with the global cache IR portion. In fact it works well once all the programs are written.

Link to comment

Thanks for all the replies. I have the global cache and it Uses Alexa voice commands to switch a state variable and trigger programs that use the network module to send a command to the global cache and received by thee relevant AV component as an IR command. That part works perfectly.

 

I just need some program or other that changes a state variable to say 884 if that days game is on channel 884. I have everything handled from that part on (and yes it is hundreds of programs to control the IR). I guess this is better handled with an outside program and use REST to change the variable to that number. I was just trying to avoid the always running trap so I didn't get a program crash and the variable doesn't get updated.

 

I used the ISY for IR mainly to avoid the "multiple points of control" issue that I think we all get with each new interconnected device and some dumb ones (like my projector) I also wanted to make sure things like having the Projector turn off if no motion is detected for 2+ hours to save the bulb works reliably. I have had very few issues with the global cache IR portion. In fact it works well once all the programs are written.

Yes, I have a GC also.  But you have to create a stinkin network resource for every command, not to mention learning every command.  GC needs to create a library of commands and an app or something.  But, you already did that part so it is a moot point.

 

Some program running on a pc or whatever needs to parse the time and channel from your table of times/channels and deliver them via REST to variables in ISY and it needs to do that after the previous recording completed and before the next one starts.  This is a lot of work for what I am guessing is your March Madness life.  

Link to comment

Yes, I have a GC also.  But you have to create a stinkin network resource for every command, not to mention learning every command.  GC needs to create a library of commands and an app or something.  But, you already did that part so it is a moot point.

 

Some program running on a pc or whatever needs to parse the time and channel from your table of times/channels and deliver them via REST to variables in ISY and it needs to do that after the previous recording completed and before the next one starts.  This is a lot of work for what I am guessing is your March Madness life.  

 

I have a calendar of all my favorite sports and events. I would like to tell Alexa to "Turn on Sports" and have a program check the schedule of who is playing at that time and tune into that channel. Just kind of a no brainer way of watching what I want, especially since the channel guide is hard to control via IR and Alexa. I will probably make a command program since that has been the most stable program I have used for sending REST commands.

Link to comment

Yes, I have a GC also.  But you have to create a stinkin network resource for every command, not to mention learning every command.  GC needs to create a library of commands and an app or something.  But, you already did that part so it is a moot point.

 

Some program running on a pc or whatever needs to parse the time and channel from your table of times/channels and deliver them via REST to variables in ISY and it needs to do that after the previous recording completed and before the next one starts.  This is a lot of work for what I am guessing is your March Madness life.  

P.S. GC does have a database of IR Commands. https://irdb.globalcache.com/Home/Database

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...