Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Insteon -Can this be done with PowerHome? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
jeremybe
Newbie
Newbie


Joined: March 15 2007
Online Status: Offline
Posts: 39
Posted: March 15 2007 at 10:43 | IP Logged Quote jeremybe

Hi-
I downloaded the trial version of Powerhome but haven't played enough with it - I'm trying to accomplish the following:

I have a KeypadLink upstairs in my House - the B button can be used to turn on/off all lights in my basement (Switchlinks) - All the lights in the basement are not linked to each other - There is 1 3 way virtual and 3 1 way switches. I'm basically trying to accomplish the following: If 1 light is left on in the basement, the KPL light will stay on, indicating a light is on so that I can then shut it off via the KPL - With Houselinc, its pretty much all or nothing, all of the devices have to be crosslinked - I dont want that - If I turn one light off downstairs, but other lights are still on I want that relected in the KPL.

Thanks for any help...
Back to Top View jeremybe's Profile Search for other posts by jeremybe
 
jeremybe
Newbie
Newbie


Joined: March 15 2007
Online Status: Offline
Posts: 39
Posted: March 15 2007 at 13:18 | IP Logged Quote jeremybe

Excuse the newb here...Searching through the forums I think I found part of the answer - If I link the KPL as a controller of all the lights downstairs, this will allow me to turn the lights on/off from button B - As for turning on/changing the status of the KPL light - Can I use the Insteon Device Change Trigger? So in my scenario it would be something similiar to having Powerhome monitor a change in status of any of the devices in my basement (Insteon Device change Trigger) and then somehow compare it to all the other devices in the basement - If any of the devices are set to on then trigger an event which turns on the KPL button, but if any of them are set to off make sure the lights off

Does this make sense and can it be done??? And can a Newb handle this???

thanks!
Back to Top View jeremybe's Profile Search for other posts by jeremybe
 
cmhardwick
Senior Member
Senior Member
Avatar

Joined: July 08 2006
Location: United States
Online Status: Offline
Posts: 290
Posted: March 15 2007 at 14:04 | IP Logged Quote cmhardwick

You're contradicting yourself here
Quote:
If any of the devices are set to on then trigger an event which turns on the KPL button, but if any of them are set to off make sure the lights off

I think you meant if they are ALL off make sure the KPL is off as well. You'd need to use some programming to do this and probably the insteon group cleanup command to trigger the actual button on the kpl, but it could be done. I'd have to sit and puzzle out the exact code, but the logic would be something along the lines of insteon status change = YES for any of the switches (5 triggers if you wanted, 4 necessay - control switch in 3 way, no load, doesn't need to be checked as the load will trigger it) and insteon current status = ON for 1 or more of the 5 switches (have to scan all 5, well 4 really as the control switch - no load - in the 3 way really doesn't matter), turn on button B on the KPL else, if NO switches return current status of ON, then turn off the kpl button.

Edited by cmhardwick - March 15 2007 at 14:05


__________________
Cicero, Enjoying automation!
Back to Top View cmhardwick's Profile Search for other posts by cmhardwick Visit cmhardwick's Homepage
 
jeremybe
Newbie
Newbie


Joined: March 15 2007
Online Status: Offline
Posts: 39
Posted: March 15 2007 at 14:29 | IP Logged Quote jeremybe

What I'd be trying to do is, if any of the lights are on set the KPL light on if ALL are off, turn the light off.- As someone with zero experience with Powerhome think I could tackle this? It looks like I'll be buying Powerhome :) - Is the programming straight forward? I can write windows batch files but thats about it...

Thanks!

Edited by jeremybe - March 15 2007 at 14:30
Back to Top View jeremybe's Profile Search for other posts by jeremybe
 
jeremybe
Newbie
Newbie


Joined: March 15 2007
Online Status: Offline
Posts: 39
Posted: March 16 2007 at 15:47 | IP Logged Quote jeremybe

jeremybe wrote:
What I'd be trying to do is, if any of the lights are on set the KPL light on if ALL are off, turn the light off.- As someone with zero experience with Powerhome think I could tackle this? It looks like I'll be buying Powerhome :) - Is the programming straight forward? I can write windows batch files but thats about it...

Thanks!



Anyone??? I just wantto know how hard it would be and If a newb like me can do it...

Thanks!
Back to Top View jeremybe's Profile Search for other posts by jeremybe
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: March 16 2007 at 18:11 | IP Logged Quote TonyNo

This board is not as active as you may think. Give it some more time and someone will chime in. I would, but I have no KPL's.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
jeremybe
Newbie
Newbie


Joined: March 15 2007
Online Status: Offline
Posts: 39
Posted: March 16 2007 at 18:48 | IP Logged Quote jeremybe

Thanks !! Appreciate it!
Back to Top View jeremybe's Profile Search for other posts by jeremybe
 
twomble
Groupie
Groupie
Avatar

Joined: January 07 2007
Location: United States
Online Status: Offline
Posts: 45
Posted: March 16 2007 at 22:17 | IP Logged Quote twomble

You bet this can be done! I have something very similar working now. I have two KPL’s in the master bedroom in little black plastic boxes (one on each side of the bed on the night stands). Both KPL’s are in 8 button mode. Buttons 1 – 7 are just normal buttons cross linked to various bedroom lights and other lights in the house. Button 8 on both KPL’s is the “Special Multi-Purpose” button. I’ve linked these "Special" buttons to EVERY light in the house. This gives me an All Lights ON/OFF button. However, shortly after doing this I realized that when we go to bed I really have no idea if any of the lights somewhere else in the house were still on. Hitting button 8 for ALL ON and then hitting it again for All OFF became a bit annoying (especially for someone sleeping in a different bedroom). I decided I would see if I could make button 8 an All House Status indicator too. The idea was if ANY light in the house is on, then button 8 would show as being on. That way when we go to bed, button 8 will show we forgot something (I have no idea what) and I only have to hit button 8 once to turn whatever it is off. Here’s how I did it.

First I created a group in the PLC and linked every light to that group. For you this would be the basement lights and button B on your KPL. Next I setup three triggers and a global variable. I named the triggers “Some Light On”, “Get Light Status”, and “Watch Light Variable”. The Global variable I named “Light Status”.

Here’s what they do.
Some Light On:
This trigger fires when an ON signal is received from any of the lights in the PLC group. I used the “Insteon Device Change” with ON for the Trigger Value watching the PLC group for the lights. All this trigger does is run a macro that sets the global variable called “Light Status” to equal “ON”.

Get Light Status:
This trigger fires when an OFF signal is received from any of the lights in the PLC group.
I used the “Insteon Device Change” with OFF for the Trigger Value watching the PLC group for the lights. This trigger runs a macro that checks the status of all the lights. I created a very long IF formula in the macro that checks each light one at a time. If all the lights have a status of OFF then the variable called “Light Status” is set to equal “OFF”. If any of the lights return a status of dim level > 0 then the variable is set to equal “ON”.

Watch Light Variable:
This trigger fires when the variable called “Light Status” is changed. This trigger runs a macro that sends the ON or OFF signal to button 8 on my two KPL’s depending on what value is stored in the variable.

I’m sure some of the better coders of PowerHome can come up with something more efficient and I would love to see Tony work on this (hint hint). Mine works just fine but I’m sure it can be improved. The only thing that I noticed is the trigger watching for a change of the Global variable fires every time the variable is updated. Even if the variable is updated with the same value it already had. Not a big deal, but it is causing PowerHome to process and send status signal updates to my KPL’s with every light on and off press in the house. You should see how big my log file gets after only one day.

Hope this helps.
Tim

Edited by twomble - March 16 2007 at 22:29
Back to Top View twomble's Profile Search for other posts by twomble
 
nadler
Super User
Super User


Joined: February 25 2006
Location: United States
Online Status: Offline
Posts: 354
Posted: March 17 2007 at 07:08 | IP Logged Quote nadler

I can think of another way of doing this without having to run the Insteon Device Change function.
Instead of having the "Light Status" variable equal to on or off, every time a basement light is turned on, increment the Light Status variable by 1. Every time a basement light is turned off de-increment the variable by 1. So if any basement lights are on then the variable would be 1 or higher. If all lights are off the variable will be 0. Then in the same macro check the variable. If it's 0 then all lights are off and set KPL button B to off. It it's greater than 0 then at least 1 light is on and set the KPL button to on.
Back to Top View nadler's Profile Search for other posts by nadler
 
jeremybe
Newbie
Newbie


Joined: March 15 2007
Online Status: Offline
Posts: 39
Posted: March 17 2007 at 07:30 | IP Logged Quote jeremybe

Thanks for everything guys - I'm going to buy powerhome right now... Hopefully I can figure this out! Since I already have all my basement lights linked, should I unlink them all and use triggers in powerhome??? I'm not sure where to start.. If you cant tell I'm pretty clueless and have never touched Powerhome..

Thanks again

Back to Top View jeremybe's Profile Search for other posts by jeremybe
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: March 17 2007 at 10:11 | IP Logged Quote TonyNo

jeremybe: I believe that PH could read your existing links (link spidering?) if you don't have comm issues.

I think nadler has a great solution.

twomble: You know, I meant to ask Dave about the possibility of the Modified triggers ignoring same value changes. My logs are honkin' also (not the only reason, but it doesn't help).
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
twomble
Groupie
Groupie
Avatar

Joined: January 07 2007
Location: United States
Online Status: Offline
Posts: 45
Posted: March 17 2007 at 12:10 | IP Logged Quote twomble

Nadler,
I’ve been thinking very hard about your approach and I’m trying to work this out in my head. It’s very different from what I’m doing and I’m trying to see if it has advantages to my solution. So, if you don’t mind I have some questions for you (or anyone for that matter).

In a perfect world I think your idea will work well. However, I can think of a few things that may cause the status button to display incorrectly and I would like to know how you would get around them. As I think of situations that could possibly cause an out of sync situation I keep reinventing the way I’m doing it now.

Scenario One:
If you were in the basement and accidentally hit the OFF button for one of the lights more than once wouldn’t that decrement the Light Status variable more than once? If so, that would get the variable count out of sync. How would you take that into account and correct for that possibility?

Scenario Two:
A light in the basement is off. You walk up to the light switch and manually brighten it up to a level you like and then stop. Now you decide you would like it just a bit brighter so you press and hold the brighten button again. Wouldn’t that be detected as another ON and increment the Light Status variable again? If so, that would also get you out of sync. How would you handle that?

Scenario Three:
You turn on one of the basement lights, but power line noise prevented PowerHome from seeing the ON signal. The Light Status variable did not get incremented. The count is now out of sync (my solution can get out of sync in this same way too). Now you turn off the basement light and the Light Status variable is decremented by one. You are still out of sync on the count. With the way I’m doing it the out of sync situation is self correcting when an OFF signal is detected. That’s because I’m running a macro that quires the status of each light when an OFF signal fires a trigger. How would you handle that situation and get things back in sync?

I look forward to your answers.
Tim
Back to Top View twomble's Profile Search for other posts by twomble
 
nadler
Super User
Super User


Joined: February 25 2006
Location: United States
Online Status: Offline
Posts: 354
Posted: March 17 2007 at 13:25 | IP Logged Quote nadler

You are absolutely correct. Your scenarios present some problems.

Scenario One: If you pressed the off (or on for that matter) button more than once per switch the counter would increment or decrement and the count would be out of sync. One way to solve this would be to put a short wait in the macro - short enough so that if you hit another switch it would work as originally described but long enough so it won't be triggered by another press of the same switch.

Scenario Two: Not sure about this one - couple of ideas though. You can trigger on the first brighten and have a short wait. But if you brighten later you would be out of sync. Or you could run the Insteon Device Change function after a brighten or dim is received.

Scenario Three: I have never had this problem (i.e an Insteon command not being received). But how about this - when the counter is either 0 or 1 you then run the Insteon Device Change function. This would take care of scenario one, two and three and greatly reduce the number of times Insteon Device Change has to be run. It would also ensure the counter would be in sync.

I am sure Dave will come up with a super-duper idea that will easily take care of the above.
Back to Top View nadler's Profile Search for other posts by nadler
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: March 17 2007 at 14:59 | IP Logged Quote TonyNo

1. Just check the current status of the device. If already off/on, don't decrement/increment again.

2. Bright/dim is different from on/off. No worries if you only change the value for an On or Off. You may need four triggers: on, fast on, off, fast off. There also may be a new trigger type that I am not remembering to handle this better.

3. Maybe a Timed Event to read the status and update?
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
jeremybe
Newbie
Newbie


Joined: March 15 2007
Online Status: Offline
Posts: 39
Posted: March 17 2007 at 22:08 | IP Logged Quote jeremybe

So... First - Thanks again for all of your help - After buying Powerhome, I decided to start from scratch, reinstall and re-create my links - Now however, when I hover over a "?" for more info all I get is a link to the help file.... Not sure whats happening... I'm at version 1.0.3.4.10

I created A PLC Group called "DownstairsLights" Group # 10 - I cant figure out how to link a device to a PLC group and I cant figure out how to link to my KPL - Are there any more docs available? Uggggh :) - Thanks everyone... I'm sure its just the learning curve...

Edited by jeremybe - March 17 2007 at 22:10
Back to Top View jeremybe's Profile Search for other posts by jeremybe
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: March 19 2007 at 16:07 | IP Logged Quote dhoward

The way I would tackle this problem is using a combination of Noel's and Twomble's solutions.

First, I would have a global variable that contains Noel's device on count. We'll call it BASEMENT_CNT.

Next, I would have a trigger for each basement switchlinc. This would be an "Insteon Device Chg" trigger with the ID of the SwitchLinc, Trigger ID of 1, [Any] for Trigger ID Number. The boolean field would be
Code:
[LOCAL9] <> [LOCAL10] and ([LOCAL9] = 0 or [LOCAL10] = 0)
.

This will make the trigger fire ONLY when a switchlinc changes state from off to on or on to off. This can be via a fast on, fast off, on, off, or dimming to 0 or brightening from off.

The action for this trigger would be a raw formula:
Code:
ph_addtoglobal("BASEMENT_CNT",if([LOCAL10] = 0, - 1,1))


I would also create a PLC group (such as 253) and add all of the KPL secondary buttons to it where I want individual control such as this. KPL secondary buttons can ONLY be controlled via either a group or group cleanup command so we must first have them as a member of a PLC group. We'll use group cleanup commands so ALL the KPL buttons can be in a single group and we don't waste groups.

I would then one-way link the KPL secondary button in question to all of the basement switchlincs. This way the KPL button will control ALL basement switchlincs together as a group. Don't link the switchlincs back to the KPL.

Last, create a trigger with a trigger type of "GLOBAL VARIABLE". The trigger ID will be "BASEMENT_CNT". This trigger will fire anytime the global variable changes. In the action field, use this formula:
Code:
if({BASEMENT_CNT} = 0,ph_insteongroupcu("PLCGROUP253ID","BASEMENTKPLID",ioff),ph _insteongroupcu("PLCGROUP253ID","BASEMENTKPLID",ion))


This takes care of the problems with pressing the Off button multiple times, the dimming to 0, or brightening from off problem scenario's that Twomble mentions. It DOES NOT handle the missed command problem and in this situation, Twomble's code will be superior as he checks each time (assuming using the new ph_getinsteonlevelrt function since the ph_getinsteonstatus or ph_getinsteonlevel functions ONLY check the PowerHome status which may be incorrect if commands are missed).

Jeremy,

The .10 version moved the "?" question mark hover help into the Help file as it was too large for popup windows in some situations. Just click the appropriate "?" and you should go straight to the appropriate help section.

The PLC Group is merely a way of associating an easy to remember name or ID with a PLC group number. In this case PLC group number 10 has an easy to remember name of "DOWNSTAIRSLIGHTS". To add devices to this PLC group, go to the "Links" tab and select the PLC as the controller (in the middle window) and then add devices as responders. Set the group number as 10 and this should allow you to create the links.

It's a definate learning curve. In the links tab, I would click every "?" icon and read everything in the help file about it. This is by far the most complicated Insteon screen but once you get a handle on it, it becomes almost second nature.

Let me know if you have any problems.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
jeremybe
Newbie
Newbie


Joined: March 15 2007
Online Status: Offline
Posts: 39
Posted: March 20 2007 at 17:53 | IP Logged Quote jeremybe

I think I'm beginning to understand how this works - I'm not familiar with triggers or how to set up the variable or getting any of this to actually execute in the background... But hopefully It'll come in time (though lots of questions and reading) - Here's what I've done so far:

1 - Created a PLC group DOWNSTAIRSLIGHTS Group Number 253
2 -Clicking on the PLC in the Links Window, I then added my devices to the responders window and hit save (in my responders window now in purple under link status it says Flagged Create)

What I'm not sure of is where I go from here... I tried going to the PLC Group screen to control group 253, but nothing happened ....

I'm trying to get this "lights on/off" functionality to work with button B



Edited by jeremybe - March 27 2007 at 14:58
Back to Top View jeremybe's Profile Search for other posts by jeremybe
 
jeremybe
Newbie
Newbie


Joined: March 15 2007
Online Status: Offline
Posts: 39
Posted: March 27 2007 at 15:08 | IP Logged Quote jeremybe

First - Thank you for your help - I've gotten the triggers set up/the PLC Group Created and I've followed Daves instructions, But things just dont seem to be working- According to my event viewer triggers are fired, but the KPL doesn't update - When all lights are off. If I turn on the lights via button B and then go downstairs to turn them off, the BASEMENT_CNT variable gets updated to -3 and the lights never shut off - Could the fact that 3 of the Switchlinks are crosslinked in the basement have any impact on this?

I'm sure I must have done something wrong but for the life of me cant figure it out - I've listed exactly what steps I took below - After this is all worked out, I'll write a FAQ on how to do this.. but until then.. H E L P :)



Here's what I have done:

1 -Launch Powerhome Explorer
Click Global Variables
Create an ID of Basement_Cnt with no value

2-Click Triggers
Nolte: I have 6 Switchlinks in my basement that I would like to Monitor - 3 are linked to eachother (a 3 Way Switch)- I have 6 triggers -Each Trigger is configured as follows:

ID:1 (2-6 for the other switchlinks)
Description: Media Room
Action type: Raw Formula
Action:ph_addtoglobal("BASEMENT_CNT",if([LOCAL10] = 0, - 1,1))
Action Stye: Immediate
Status: Active
Trigger Type: Insteon Device Chg
Trigger ID: Switchlink Name (available from drop down in Trigger ID)
Trigger ID number: ANY
Trigger Value: ANY
Boolean: [LOCAL9] <> [LOCAL10] and ([LOCAL9] = 0 or [LOCAL10] = 0)

3 - Created a PLC Group called DOWNSTAIRSLIGHTS assigned it group ID 253
(Launched Insteon Explorer/PLC Groups - Entered the ID/Dexription/Group Number 253) Clicked Save

4 - Linked the KPL button B to the PLC
(Launched the Insteon explorer Link Screen/Selected the PLC- Moved the Keypad to the responders screen - Entered Group 253, Button 4)
Clicked Save

5 - Linked the KPL Button B as a controller of all 6 downstairs switchlinks
(clicked the Keypad in the Links/Devices Window - Moved all 6 Basement switchlinks to be responders - Assigned them Group 4)

I validated that the PLC Group control is working - Manually controlling it lights up the KPL
the KPL is working as well I can turn on/off lights via button B

6- Created a Trigger with the following:

ID: BASEMENT_CNT
Description: Count Status
Action Type: Raw Formula
Action:if({BASEMENT_CNT}=0,ph_insteongroupcu ("PLCGROUP253ID","BASEMENTKPLID",ioff),ph_insteongroupcu (PLCGROUP253ID","BASEMENTKPLID",ion))
Action Style: Immediate
Status: Active
Trigger Type:Global Variable
Trigger ID: BASEMENT_CNT





Edited by jeremybe - March 27 2007 at 15:20
Back to Top View jeremybe's Profile Search for other posts by jeremybe
 
cmhardwick
Senior Member
Senior Member
Avatar

Joined: July 08 2006
Location: United States
Online Status: Offline
Posts: 290
Posted: March 28 2007 at 08:05 | IP Logged Quote cmhardwick

Sounds like when you turn ON the lights with the KPL, you need to set the variable to the number of lights that actually turn on. That will keep you from ending up with a -3. That's just from a quick glance, but try it.
Basically, when you turned them on with the KPL, the variable only got incremented to +3 and then decremented by 6 (leaving -3) or it didn't get incremented at all then decremented by 3 giving you the negative again.

__________________
Cicero, Enjoying automation!
Back to Top View cmhardwick's Profile Search for other posts by cmhardwick Visit cmhardwick's Homepage
 
jeremybe
Newbie
Newbie


Joined: March 15 2007
Online Status: Offline
Posts: 39
Posted: March 28 2007 at 18:17 | IP Logged Quote jeremybe

I agree- Good catch, for the life of me I can not figure out how to set the variable to 6 whenever the KPL button is pressed.. I'm not sure where in the code the KPL button is triggering the variable to be increased...


cmhardwick wrote:
Sounds like when you turn ON the lights with the KPL, you need to set the variable to the number of lights that actually turn on. That will keep you from ending up with a -3. That's just from a quick glance, but try it.
Basically, when you turned them on with the KPL, the variable only got incremented to +3 and then decremented by 6 (leaving -3) or it didn't get incremented at all then decremented by 3 giving you the negative again.
Back to Top View jeremybe's Profile Search for other posts by jeremybe
 

Page of 2 Next >>
  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum