Jump to content

How do I use a Mobilinc button as a switch & status?


wwat

Recommended Posts

Hello,

 

I would like a favorites button (in Mobilinc) to control a whole house fan. The single button should turn the fan off or on depending on its current state and the other logic written in to the programs. I'd also like the status of that button to correctly reflect (at all times) the status of those programs. i.e if the fan was turned on by the programs then it should read 'Fan On', and if turned off by the programs then status should read 'Fan off'.

 

Below is an example of what I currently have written. As is the button doesn't always reflect the status correctly. If I'm doing some changes to the program in ISY admin, or the ISY is rebooted or something else happens then the status will always reset to 'True' even if the fan was last switched off by the programs. Or if the fan is already on (switch on for humidity or something else) and I attempt to turn it on using this program it changes to true and gets out of sync. The program currently assigned to a favorite in Mobilinc is called 'House Fan', this program in turn executes the other programs.

 

This is kind of a little tricky to elucidate so if my description is not clear just ask away.

 

Many thanks, Wayne

 

Program Name: House Fan - Disabled

If
       $Int_FanManualControlStatus is 0

Then
       Run Program 'FanManualControlOn' (If)

Else
       Run Program 'FanManualControlOff' (If)

 

Program Name: FanManualControlOn - Disabled

If
       Status  'HVAC - House / Venstar House / House - Fan' is Off

Then
       Set 'HVAC - House / Venstar House' Fan On
       $Int_FanManualControlStatus  = 1

Else
  - No Actions - (To add one, press 'Action')

 

Program Name: FanManualControlOff - Disabled

If
       Status  'HVAC - House / Venstar House / House - Fan' is On
   And $Int_HumidifierFanStatus is 0
   And $Int_ShowerFanStatus is 0

Then
       Set 'HVAC - House / Venstar House' Fan Auto
       $Int_FanManualControlStatus  = 0

Else
  - No Actions - (To add one, press 'Action')


Link to comment
Share on other sites

Hi Wayne,

 

May I offer a simple solution that's already baked into MobiLinc? Select your Fan device and make it a favorite. On the favorites screen if you tap the Fan device it will cycle the fan through the fan stages: OFF, LOW, MEDIUM, HIGH and then back to OFF. Since this is the Fan device you'll always be seeing the true fan status with one place to cycle the fan from OFF to one of the ON stages.

 

Wes

Link to comment
Share on other sites

The reason to use more complex programs to initiate the fan is because I use the fan to do mulitple functions, i.e humidify the house, and bathroom ventilation when shower is in use. For these other functions the fan is used in conjunction with other electrial devices and I have to have some way to keep track of which program initiated the fan. So if the fan was turned on to add humidification it can't be interupted or turned off from the other programs. I check variables to perform this function. So this is the reason I need to lauch it from a program with the added checks.

 

I was thinking there is perhaps other way to do this that would give me the one switch/status button I'm looking for but I haven't found it yet. I enclosed the code so you can see the type of checking that is being done.

 

Many Thanks, Wayne

Link to comment
Share on other sites

Understood.

 

I would look at creating a program that flips a variable ON or OFF (1 or 0) that only MobiLinc would use to "ask" the ISY programs to turn the fan ON. You could remove all the run paths for the program in MobiLinc down to just the Run Then path OR make the Run Then path the favorite. Then when on the favorites screen if you tap the row or icon the Then path executes flipping the variable to a 1 (ON). That variable would then feed into your complex program set for your fan operation.

 

Wes

Link to comment
Share on other sites

Understood.

I would look at creating a program that flips a variable ON or OFF (1 or 0) that only MobiLinc would use to "ask" the ISY programs to turn the fan ON. You could remove all the run paths for the program in MobiLinc down to just the Run Then path OR make the Run Then path the favorite. Then when on the favorites screen if you tap the row or icon the Then path executes flipping the variable to a 1 (ON). That variable would then feed into your complex program set for your fan operation.

Wes

 

Hi Wes,

 

Based on your idea the problem I forsee is that at the point of time when the variable is flipped by tapping the button (or row), the button status would change but the logic in the programs that the variable feed may not relect the true state of the Mobilinc button. There is no way to feed back the result of the change in the variable to the button so it can reflect the correct status.

 

I wonder whether this may be more of a general coding issue, so I might put up a question in the general coding area.

 

Appreciate your assistance, Wayne

Link to comment
Share on other sites

Archived

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


×
×
  • Create New...