Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Controlling lighting? (ATTN: CollinR?)

If you have a question or need help, this is the place to be.
Post Reply
stisev
Experienced User
Posts: 162
Joined: Tue Jun 26, 2007 2:55 am

Controlling lighting? (ATTN: CollinR?)

Post by stisev »

Hi all/Collin,

http://www.remotecentral.com/ureview/139.htm

According to CollinR, he's able to control his lighting via Snapstream Firefly + EventGhost. How is that possible? I thought about perhaps using X10 automation, but which device is it exactly? How does EventGhost CONTROL that device? Is there a driver?

The avenues for EventGhost are limitness, it seems.
CollinR
Experienced User
Posts: 265
Joined: Tue Sep 05, 2006 7:16 am
Location: Oklahoma
Contact:

Re: Controlling lighting? (ATTN: CollinR?)

Post by CollinR »

stisev wrote:Hi all/Collin,

http://www.remotecentral.com/ureview/139.htm

According to CollinR, he's able to control his lighting via Snapstream Firefly + EventGhost. How is that possible? I thought about perhaps using X10 automation, but which device is it exactly? How does EventGhost CONTROL that device? Is there a driver?
Ahhh you see since I am broke, only read/write/speak english, and programmatically challenged all I can really do for the project is help out in the forums and give google bots text to chew on.

I'm glad to see it's working. :D
stisev wrote: The avenues for EventGhost are limitness, it seems.
You don't have a clue yet. :twisted:



Okay what you need:

Hardware:

X10 CM11a RS232>PLC interface ~$10 on ebay, probably less.
Any x10 PLC devices you might desire.

Software:
The old ActiveHome software, should be free. Only works with the CM11a.
EventGhost


Okay install ActiveHome
Find the install directory (C:\Program Files\Home Control\)
Select all the executable (*.exe) files, right click choose properties
Go to the "Compatiblity" tab
Set it to Run this program in compatibilty mode for Windows 95

Now build your events and macros
You macros should look like this.

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="908">
    <Macro Name="Spa On">
        <Event Name="X10-M.Input">
        </Event>
        <Action>
            EventGhost.Wait(0.10000000000000001)
        </Action>
        <Action>
            System.Execute(u'C:\\Program Files\\Home Control\\X10com32.EXE', u'H2 ON', 3, False, 2, u'')
        </Action>
    </Macro>
</EventGhost>
That one is slightly different as it uses a generic x10 remote rather then a FireFly (which is WAY better).

Just copy/paste that code into your EG macros and it may error about no x10 remote but the configure for the action (Start Program) should be easy to interpret.

Okay now looking further into that action you will see the path to the .exe with the command H2 ON.

You modify the H2 to reflect your desired X10 device ID

The commands can be:
ON
OFF
Dim xx%

Keep in mind the cheap x10 devices cannot dim to specific brightness, they are relative to current brightness. Also they must start out at 100% brightness.

What I usually do is issue an OFF command then a delay (very important!!!, must have a delay) then a DIM xxx% command. This will insure you always end up at the correct lighting level.

Here is one slightly more complex, basically it is a route I use when I play a DVD in my living room.

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="908">
    <Macro Name="Dim Living Room" Expanded="True">
        <Event Name="TCP.DimLivingRoom">
        </Event>
        <Action>
            EventGhost.Wait(0.10000000000000001)
        </Action>
        <Action>
            System.Execute(u'C:\\Program Files\\Home Control\\x10com32.exe', u'e1 off', 3, False, 2, u'')
        </Action>
        <Action>
            EventGhost.Wait(0.10000000000000001)
        </Action>
        <Action>
            System.Execute(u'C:\\Program Files\\Home Control\\x10com32.exe', u'E1 DIM 50%', 3, False, 2, u'')
        </Action>
        <Action>
            EventGhost.Wait(0.10000000000000001)
        </Action>
        <Action>
            System.Execute(u'C:\\Program Files\\Home Control\\x10com32.exe', u'e2 off', 3, False, 2, u'')
        </Action>
        <Action>
            EventGhost.Wait(0.10000000000000001)
        </Action>
        <Action>
            System.Execute(u'C:\\Program Files\\Home Control\\x10com32.exe', u'e2 dim 60%', 3, False, 2, u'')
        </Action>
        <Action>
            EventGhost.Wait(0.10000000000000001)
        </Action>
        <Action>
            System.Execute(u'C:\\Program Files\\Home Control\\x10com32.exe', u'e3 off', 3, False, 2, u'')
        </Action>
        <Action>
            EventGhost.Wait(0.10000000000000001)
        </Action>
        <Action>
            System.Execute(u'C:\\Program Files\\Home Control\\x10com32.exe', u'e3 dim 50%', 3, False, 2, u'')
        </Action>
        <Action>
            EventGhost.Wait(0.10000000000000001)
        </Action>
        <Action>
            System.Execute(u'C:\\Program Files\\Home Control\\x10com32.exe', u'e4 off', 3, False, 2, u'')
        </Action>
        <Action>
            EventGhost.Wait(0.10000000000000001)
        </Action>
        <Action>
            System.Execute(u'C:\\Program Files\\Home Control\\x10com32.exe', u'e5 off', 3, False, 2, u'')
        </Action>
        <Action>
            EventGhost.Wait(0.10000000000000001)
        </Action>
        <Action>
            System.Execute(u'C:\\Program Files\\Home Control\\x10com32.exe', u'e5 dim 50%', 3, False, 2, u'')
        </Action>
    </Macro>
</EventGhost>
You may notice that one uses the Network Reciever plugin, this is so any EventGhost system under my control may send the command to the automation server. You can change the Event to something on your FireFly so you can use it locally.

Also appliacance modules and realy switches do not respond to the DIM command as they are strickly ON/OFF relays. What I have done in my living room is assigned some relays and some dimmers the same ID. This way when I issue the OFF command that all turn off, when I issue the DIM command ONLY the dimmers come back on. :D


If you have more $ go with Zwave, x10 kinda sucks but this only cost me ~$200 USD to do almost all the lights in my house.


Also look in the feature requests for the xAP xPL integration, make damn sure you bump that topic. The more people who bump it the faster/more likely someone that has some skills may take it up. If that plugin ever becomes real it will open a massive amount of hardware to EventGhost. Insteon, Zwave, x10 RF you name it not to mention more software plugins as xPL and xAP can do that too.

If you get lost just reply, I subscribe to every thread I reply to.


Mo reading:
http://www.eventghost.org/forum/viewtopic.php?f=5&t=371

Also you should probably have an action like this in there somewhere too.

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="908">
    <Macro Name="Shutdown X10 Communications">
        <Event Name="TCP.KillX10">
        </Event>
        <Action>
            Window.FindWindow(u'x10com32.exe', None, None, None, None, None, True, 0.0, 0)
        </Action>
        <Action>
            Window.Close()
        </Action>
    </Macro>
</EventGhost>
That will allow you to shut down the x10 com interface when it crashes, and it will crash too.
Last edited by CollinR on Fri Oct 26, 2007 5:36 pm, edited 1 time in total.
CollinR
Experienced User
Posts: 265
Joined: Tue Sep 05, 2006 7:16 am
Location: Oklahoma
Contact:

Re: Controlling lighting? (ATTN: CollinR?)

Post by CollinR »

blunderman
Posts: 3
Joined: Sun Nov 04, 2007 9:08 pm

activehome fade to 0%?

Post by blunderman »

I've been using an old version of girder to control my x10 stuff, using this cm10/11a plugin:
http://www.girder.nl/download.php?ID=287

It allows a dim 0% command.
This is useful for emulating the lutron-style fade-on/off.

I created a command group in girder to create "scenes" of lighting depending on what task I'm doing (movie pause, cooking, sleep). As long as the lights are not turned completely OFF, but dimmed to 0%, the fade on/off works ok. Otherwise you get blinded when the device has to go to 100% (ON) before ramping down to DIM%.

I'd like to try the activehome solution, but I have a couple of Q's for CollinR:

1) While using the eventghost script, is there a delay between commands for different x10 house/room codes? Or do all the modules act at the same time?
(The girder solution I use has this problem)

2) Is it possible to issue a DIM 0% command without actually turning the device OFF?
CollinR
Experienced User
Posts: 265
Joined: Tue Sep 05, 2006 7:16 am
Location: Oklahoma
Contact:

Re: activehome fade to 0%?

Post by CollinR »

blunderman wrote:I've been using an old version of girder to control my x10 stuff, using this cm10/11a plugin:
http://www.girder.nl/download.php?ID=287

It allows a dim 0% command.
This is useful for emulating the lutron-style fade-on/off.

I created a command group in girder to create "scenes" of lighting depending on what task I'm doing (movie pause, cooking, sleep). As long as the lights are not turned completely OFF, but dimmed to 0%, the fade on/off works ok. Otherwise you get blinded when the device has to go to 100% (ON) before ramping down to DIM%.

I'd like to try the activehome solution, but I have a couple of Q's for CollinR:
Activehome sucks, stick to girder until either EventGhost has native support for the CM11a or EventGhost has support for xPL or xAP. Btt the xPL/xAP feature request thread! Activehome is by far the weak link in my chain.
blunderman wrote: 1) While using the eventghost script, is there a delay between commands for different x10 house/room codes? Or do all the modules act at the same time?
(The girder solution I use has this problem)
You cannot get past this delay, this is due to the super slow PLC bus. With EventGhost YOU must specify the delay, if you don't it will crash the CM11a as it cannot put the commands on the PLC as fast as EventGhost can send them.
blunderman wrote: 2) Is it possible to issue a DIM 0% command without actually turning the device OFF?
You can use any value or invalid command you choose. This must be a reflection of your specific x10 devices. Most without preset dim can only accept relative dim commands. As such DIM 0% does nothing, DIM 1% will dim them 1% below the curret output.

Here is a better example: EG=EventGhost AH=ActiveHome A1=Lighting Load

A1 is OFF
EG>AH command A1 DIM 50% = A1 to 50% output < As expected
EG>AH command A1 DIM 50% = A1 now at 25% output < Probably not whats expected
EG>AH command A1 DIM 0% = A1 still at 25% output
EG>AH command A1 BRIGHT 100% = A1 back to 50% output

Thats how all of my x10 devices work, if you have nicer PSC devices it may be different. Really EventGhost doesn't care if the command is valid or invalid it will send it just the same.
blunderman
Posts: 3
Joined: Sun Nov 04, 2007 9:08 pm

Re: Controlling lighting? (ATTN: CollinR?)

Post by blunderman »

Thanks much for the info.

I guess I'll stick with girder for now but one more question:

Do you have any experience with the $70 x10 interface from smarthome?
http://www.smarthome.com/1132cu.html

I wonder if the usb connection would speed up the delays between commands. I'd probably have to use their "essential" software and map commands through girder to it.

Anyone out there have thoughts on this?
CollinR
Experienced User
Posts: 265
Joined: Tue Sep 05, 2006 7:16 am
Location: Oklahoma
Contact:

Re: Controlling lighting? (ATTN: CollinR?)

Post by CollinR »

blunderman wrote:Thanks much for the info.
Anytime. ;)

blunderman wrote: I guess I'll stick with girder for now but one more question:

Do you have any experience with the $70 x10 interface from smarthome?
http://www.smarthome.com/1132cu.html

I wonder if the usb connection would speed up the delays between commands. I'd probably have to use their "essential" software and map commands through girder to it.

Anyone out there have thoughts on this?
No experience with that device but it won't be any faster either. It's the x10 PLC bus thats soo slow.
Device's Manual wrote: Change X10 Send Delay
Smarthome Manager has a built in delay of 400ms between PLC transmissions. If the home has multiple coupler-repeaters or some of the receivers are missing PLC commands, then add an additional pause between transmissions. Enter a number here, in milliseconds, to add onto the existing built-in 400ms delay. For example, to create a two-second pause between transmissions, enter 1600. The 1600ms pause plus the built-in 400ms delay will force Smarthome Manager to wait a total of 2000ms or two seconds.

Do what you can afford and what works.

x10 is the cheapest most basic method of home automation. Thats what it is really good at, its the cheapest.

The best are all hardwired, the middle ZWave and UPB possibly Insteon, then all the other PLC devices.
blunderman
Posts: 3
Joined: Sun Nov 04, 2007 9:08 pm

Re: Controlling lighting? (ATTN: CollinR?)

Post by blunderman »

Good eye.

Thanks again!
stisev
Experienced User
Posts: 162
Joined: Tue Jun 26, 2007 2:55 am

Re: Controlling lighting? (ATTN: CollinR?)

Post by stisev »

Hi ColinR
Thx for the response, but I'm a little confused....

Regarding: X10 CM11a RS232>PLC

The main thing I want to do is shut off/on electronics. This is controlled through my laptop which doesn't have serial. Would the X10 CM11a RS232>PLC work? It seems as if it's run by serial connection.


Also, each of these "X10 CM11a RS232>PLC" runs for about $10 as you mentioned. Does that mean that each of the 4 devices I want to control (=10x4) = $40?

Lastly, do I have to use the ActiveHome software? Is there any plans for EG to support the receiver or something? If not, why not? BitMonster, can you comment on this one too?

Thanks guys! EG truly does rock!
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Controlling lighting? (ATTN: CollinR?)

Post by Bitmonster »

stisev wrote: Lastly, do I have to use the ActiveHome software? Is there any plans for EG to support the receiver or something? If not, why not? BitMonster, can you comment on this one too?
I have no X10 home automation devices and I don't plan to purchase or use them in the future. I have tested them out some month ago and came to the conclusion, they are much to slow and unreliable, especially here in Europe, as our power line frequency is even lower and the X10 devices are further limited through specification of the electricity providers (they are only allowed to use a fractional of the power on the line as they use in the USA).

And I don't know more of any plans to build plugins from other sides as the information that can be found here in the forum.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
CollinR
Experienced User
Posts: 265
Joined: Tue Sep 05, 2006 7:16 am
Location: Oklahoma
Contact:

Re: Controlling lighting? (ATTN: CollinR?)

Post by CollinR »

stisev wrote:Hi ColinR
Thx for the response, but I'm a little confused....

Regarding: X10 CM11a RS232>PLC

The main thing I want to do is shut off/on electronics. This is controlled through my laptop which doesn't have serial. Would the X10 CM11a RS232>PLC work? It seems as if it's run by serial connection.


Also, each of these "X10 CM11a RS232>PLC" runs for about $10 as you mentioned. Does that mean that each of the 4 devices I want to control (=10x4) = $40?

Lastly, do I have to use the ActiveHome software? Is there any plans for EG to support the receiver or something? If not, why not? BitMonster, can you comment on this one too?

Thanks guys! EG truly does rock!
1 CM11a for your entire home, unlimited modules.

You can probably use a USB>RS232 adapter but many of those are junk. This would not increase your reliablity at all. You would be better off to find an old junk computer and use that. This way you know it won't be moving around on you like a laptop tends to.

You can use an x10 command line interface, the old ActiveHome is the only free one I have found.

Bump the xPL/xAP thread it will have better x10 capabilties and more.
Post Reply