Jump to content

Looking for programming ideas


ldrinc

Recommended Posts

Posted

Looking for help with writing a program in my isy994i that will identify the state, when and if a program was executed. In a nutshell, I have two applications that I controll via my isy... XBMC and Windows MCE. Using network resources I have successfully created a program that will launch and close both applications.

 

The problem that I am running into is that I'm not able to identify the state of these programs. Nonetheless, After doing some reading through the wiki and some threads I don't fully understand how to use the variable options that are available. My ultimate goal is to prevent both XBMC and MCE from running at the same time.

 

Here is what I have tried so far that doesn't seem to work.

 

Network Resources that were created include:

 

* Open XBMC

XBMC variable state = 1

* Close XBMC

XBMC variable state = 0

* Open MCE

MCE variable state = 1

* Close MCE

MCE variable state = 0

 

Program created

 

*Open XBMC

 

IF

MCE = 0

and XBMC = 0

 

Then

Resouce XBMC (Open XBMC)

 

When I run the if statement all it does is open and closes both applications repeatedly and it won't stop until I reset the HTPC.

 

Any help with resolving this looping issue would be appreciated.

Posted

I think we need to see more of your programs. Specifically, I would like to see the programs that call the resources and set the values of the state variables.

 

-Xathros

Posted

Xathros,

 

Thanks for the reply. Not sure I understand your question. The only program that calls the resource is as follows:

 

Open XBMC (program) run if

 

if

MCE = 0

and XBMC = 0

 

Then

Resouce XBMC (Open XBMC)

Posted

Then how are you setting the values for the variables XBMC and MCE ? With only that one program, I see no way for a loop to happen here. What does the Network Resource look like?

 

I would think you would have a program that says:

 

Program: Turn On XBMC:

 

If MCE = 0
  and XBMC =  0

Then
  Resource TurnOnXBMC
  XBMC = 1

 

and a program like:

 

Program: Turn Off XBMC:

If XBMC = 1

Then
  Resource TurnOIffXBMC
  XBMC = 0

 

and:

 

Program: Turn On MCE

If MCE=0
  and XBMC = 0

Then
  Resource TurnOnMCE
  MCE = 1

 

and finally:

 

Program: Turn Off MCE

If MCE = 1

Then
  Resource TurnOffMCE
  MCE = 0

 

In the above examples, all variables are Integer - Not State variables.

 

-Xathros

Posted

Ok, I think I understand now. My apology for not being clear. I am working from a different computer and off of my memory at the moment and I do not have remote access to my isy to see the program that I created.

 

That said, I will post a reply this evening when I get access to my isy.

Guest
This topic is now closed to further replies.

×
×
  • Create New...