Jump to content

Alexa and Time/Date Based Variables


Recommended Posts

Posted

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?

Posted (edited)

 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).

Edited by jtara92101
Posted

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?

Posted

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.

Posted

The ISY can receive IR (which can be parsed into program triggers), but it cannot of itself transmit IR.

Posted

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.

Posted

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.

Posted

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.  

  • Like 1
Posted

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.

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...