How to fix the my automation code?

After you re-programmed the switch from the controller, did you tell Upstart to re-read the configuration from the switch? If not, that would explain why Upstart didn't get the name. The controller doesn't really care what the switch is named (I don't think), but if Upstart overwrote the received links table, that may cause you problems later if you try to control that switch with a scene switch.


Yeap, I told upstart to read from the switch and it got the right info maybe from three out of 22 switches. By the way, even after programing the switches, neither of the original codes posted work the way I want them to, the switches do report correctly when they are on or off. I am about to try cornutt suggestion.


After much trial and error I think I found a way to make it work.

[codebox]17. // Flag for back light
18. WHEN Patio Single Fan and Light ON
THEN INCREMENT Flag Track light status fan
19. WHEN Patio Single Fan and Light OFF
THEN DECREMENT Flag Track light status fan
20. // Automation Back Light When open Door at Night
21. WHEN Formal Living Room Back Doors NOT READY
AND IF Flag Track light status fan OFF
AND IF DARK
THEN Patio Single Fan and Light ON FOR 3 MINUTES
22. // FINISH
[/codebox]

If anyone knows of a simpler easier neater way to doit please let me know.
 
I'll be honest with you, I don't know why this works when your original code (the second block of code from your first message in this thread) didn't. It looks to me like they should do exactly the same thing. BTW, I noticed you changed the name of the device -- was there any reason for that?
 
I'll be honest with you, I don't know why this works when your original code (the second block of code from your first message in this thread) didn't. It looks to me like they should do exactly the same thing. BTW, I noticed you changed the name of the device -- was there any reason for that?


I changed it after reprogramming all my switches with HAI. I re-arranged all the areas in 8's by zones "shame on me it was not done like that before" and int he excitement I did not write down the previous names to certain switches so I had to rename them. It is rather strange because I agree that the second code should work for me, I can see on pc access when the switch is turned on and off; but for some weird reason it goes in a loop. With the second code, if I turn the light and then open the door afterward, the light will go off and on after 3 minutes and the 3 minute timer will reset itself for another 3 minutes. To make matter worst if I tried to manually turn off the light it would turned itself right back on.

The last code posted is working perfectly, go figure...
 
Something is still not correct in your setup.

Just to clarify:
- You set your house codes to HLC.
- You named (not just the description) everything with the rooms on the 8's.
- All loads were units 2-8 within the room.
- You wrote this configuration to the controller.
- Then you used the controller to configure the switches. (If you watched the console screen during the programming you should have seen messages like "Setting Network Name", "Setting room Name", "Setting Device Name" and stuff like that.)
- Then you had upstart reread the entire network.

After doing all of this in upstart you should have a node called rooms with each of your rooms listed. If you expand the node for a particular room you should see all of the loads and everything should be nicely named.

If this is not what you are seeing then retrace your steps.

Once you have everything configured and working properly, you initial problem has a simple solution.

18. WHEN Formal Living Room Back Doors NOT READY
AND IF DARK
AND IF fMan Override OFF
THEN Single Fan Patio ON FOR 3 MINUTES

19. WHEN Single Fan Patio ON PRESSED
THEN fMan Override ON

20. WHEN Single Fan Patio OFF PRESSED
WHEN Single Fan Patio OFF
THEN fMan Override OFF

The "WHEN Single Fan Patio ON/OFF PRESSED" event is "WHEN UPB Switch", "Wall Switch" event. "fMan Override" is a flag.

In 19 when you manually turn the switch ON it defeats the "automatic" operation of 18.

In 20 when you manually turn the switch off or it is turned off by some other means (i.e. AWAY program that turns everything off), the flag is cleared to allow automatic operation once again.

Yes you could simplify 20 to just use "WHEN Single Fan Patio OFF" but I wanted to emphasize the point and didn't want someone to think it was a typo and I just left off the "PRESSED".

Give it a shot and let me know how it works.

I see while I was typing you posted another message. OH well I hope this helps anyhow.
 
Something is still not correct in your setup.

Just to clarify:
- You set your house codes to HLC.
- You named (not just the description) everything with the rooms on the 8's.
- All loads were units 2-8 within the room.
- You wrote this configuration to the controller.
- Then you used the controller to configure the switches. (If you watched the console screen during the programming you should have seen messages like "Setting Network Name", "Setting room Name", "Setting Device Name" and stuff like that.)
- Then you had upstart reread the entire network.

After doing all of this in upstart you should have a node called rooms with each of your rooms listed. If you expand the node for a particular room you should see all of the loads and everything should be nicely named.

If this is not what you are seeing then retrace your steps.

Once you have everything configured and working properly, you initial problem has a simple solution.

18. WHEN Formal Living Room Back Doors NOT READY
AND IF DARK
AND IF fMan Override OFF
THEN Single Fan Patio ON FOR 3 MINUTES

19. WHEN Single Fan Patio ON PRESSED
THEN fMan Override ON

20. WHEN Single Fan Patio OFF PRESSED
WHEN Single Fan Patio OFF
THEN fMan Override OFF

The "WHEN Single Fan Patio ON/OFF PRESSED" event is "WHEN UPB Switch", "Wall Switch" event. "fMan Override" is a flag.

In 19 when you manually turn the switch ON it defeats the "automatic" operation of 18.

In 20 when you manually turn the switch off or it is turned off by some other means (i.e. AWAY program that turns everything off), the flag is cleared to allow automatic operation once again.

Yes you could simplify 20 to just use "WHEN Single Fan Patio OFF" but I wanted to emphasize the point and didn't want someone to think it was a typo and I just left off the "PRESSED".

Give it a shot and let me know how it works.

I see while I was typing you posted another message. OH well I hope this helps anyhow.

Thanks for the assistance. Ok I did not doit as I was supposed to. Basically i would write on name on pcaccess then go to the status section and hit HLC configure. I will redo it per your instructions and post back.
 
Back
Top