x10 scripts
x10 scripts
If I could just get a sample x10 script I think I would be in business. Just to get an idea of the structure.
I am not sure where to begin. I have created themes with buttons that can only send one command. With no feedback.
Something like a slider bar to control brightness. Or sending commands to several modules with one button.
I am new to Housebot and Medio.
So far it looks quite powerful but without a tutorial on scripts it may take me forever to get it working.
I am not sure where to begin. I have created themes with buttons that can only send one command. With no feedback.
Something like a slider bar to control brightness. Or sending commands to several modules with one button.
I am new to Housebot and Medio.
So far it looks quite powerful but without a tutorial on scripts it may take me forever to get it working.
Scripts are basically Microsoft VB Script. Check the Script Device help for examples. Here is something I have done. Not x10 specific, but shows the power of HB and script.
[Edit by ScottBot]Stock Getter script attached
[Edit by ScottBot]Stock Getter script attached
- Attachments
-
- StockGetter.zip
- (2.81 KiB) Downloaded 398 times
Thanks,
Scott J
aka spike5884
Scott J
aka spike5884
Evan contacted me off-line and I sent him an x10 example of mine. I have uploaded it to the following location for anybody elses use.
[Edit by ScottBot]Multiple x10 Changer script attached
[Edit by ScottBot]Multiple x10 Changer script attached
- Attachments
-
- MultX10Chgr.zip
- (1.42 KiB) Downloaded 375 times
Thanks,
Scott J
aka spike5884
Scott J
aka spike5884
Evan asked the following by private email. Thought it maybe of interest to the group, so I am posting my answer here.
Evan,
If you are talking about the MultX10Chgr, You would just need to set the "X10 Commands" Property, and then set the "State" Property to Running. This can easily be done from any Task or another script.
I got it!
Its great!
Can I have that script fed different variables from another script then execute it?
This would also allow me to use the script for multiple buttons without duplicating it with the groups for each button.
My remote has a screen for whole house.
All bedrooms, Living room, Kitchen all have multiple devices
I hope this is not asking too much!
I have not written any code in 20 years so this is all net to me. Especially the conventions of VB.
Thanks Evan
Evan,
If you are talking about the MultX10Chgr, You would just need to set the "X10 Commands" Property, and then set the "State" Property to Running. This can easily be done from any Task or another script.
Thanks,
Scott J
aka spike5884
Scott J
aka spike5884
States Disapearing
The script works fine but my states are disapearing.
Example
Default=P;1;2;Off to P;1;2;On
P;1;2;On
Next State=P;1;2;On to P;1;2;Off
I put all my states in, save the Theme Run my software Remote
The script executes once.
I go back and look at the theme and the second state is gone.
Any Ideas?
Example
Default=P;1;2;Off to P;1;2;On
P;1;2;On
Next State=P;1;2;On to P;1;2;Off
I put all my states in, save the Theme Run my software Remote
The script executes once.
I go back and look at the theme and the second state is gone.
Any Ideas?
The device was working BUT
I had it working but now its not passing the commands to the Powerlinc.
Although the powerlinc will work with other multistate buttons.
Although the powerlinc will work with other multistate buttons.
Nice script device BUT
This is a really nice script device but I can't figure out why it will not pass the command to the powerlinc controller.
Can anyone help me ?
Can anyone help me ?
The MultX10Chgr script uses a brute force method. It does not "talk" to the PowerLinc directly. It goes thru your devices looking for the property "X10 House Code". When found and the house/unit code matches, it then changes the device's "Power State" property to the desired state.
So, if manually changing the power state works, this scipt should work. Does it work when you run it manually?
So, if manually changing the power state works, this scipt should work. Does it work when you run it manually?
Thanks,
Scott J
aka spike5884
Scott J
aka spike5884
I know the script executes but I see no commands on the PLC.
I can see the values change in the x10 Commands line.
I put a print statement in it and it executed to the end.
So I am not sure what is going on.
I thought that the way to configure the script was by creating a multi state button. With 2 states.
P1 On
P1 Off
Using the proper format P;1;On
I see the change when the button is pressed on the remote.
But no results
Can the MultX10Chgr be used for multiple buttons each having different house codes and different unit codes?
Thanks Evan
I can see the values change in the x10 Commands line.
I put a print statement in it and it executed to the end.
So I am not sure what is going on.
I thought that the way to configure the script was by creating a multi state button. With 2 states.
P1 On
P1 Off
Using the proper format P;1;On
I see the change when the button is pressed on the remote.
But no results
Can the MultX10Chgr be used for multiple buttons each having different house codes and different unit codes?
Thanks Evan
Button Creation
Was I correct about how to create the buttin?
Example:
Multi State Button
Property Change
Device = MultiX10Chgr
Property = X10 Commands
Preform Action when Button is pressed = Checked
States
1
If Value is: P;1;Off
Change Value To: P;1;On
2
If Value is: P;1;On
Change Value To: P;1;Off
Thanks Evan
Example:
Multi State Button
Property Change
Device = MultiX10Chgr
Property = X10 Commands
Preform Action when Button is pressed = Checked
States
1
If Value is: P;1;Off
Change Value To: P;1;On
2
If Value is: P;1;On
Change Value To: P;1;Off
Thanks Evan
Changing the state
I am using it for multiple devices!
That was just an example.
Perhaps I have this all wrong.
Do I change the state of the script with the button press?
If so then the button creation is incorrect!.
Multi State Button
Property Change
Device = MultiX10Chgr
Property = X10 Commands
Preform Action when Button is pressed = Checked
States
1
If Value is: P;1;Off
Change Value To: P;1;On
2
If Value is: P;1;On
Change Value To: P;1;Off
That was just an example.
Perhaps I have this all wrong.
Do I change the state of the script with the button press?
If so then the button creation is incorrect!.
Multi State Button
Property Change
Device = MultiX10Chgr
Property = X10 Commands
Preform Action when Button is pressed = Checked
States
1
If Value is: P;1;Off
Change Value To: P;1;On
2
If Value is: P;1;On
Change Value To: P;1;Off