Re: [mh] Control X10 appliance from Insteon
Jeff Siddall via misterhouse-users <[email protected]>
| Newsgroups | gmane.comp.misc.misterhouse.user |
|---|---|
| Message-ID | <[email protected]> |
Yes, you can do this but, as you discovered, you will end up with a loop
if you simply tie both ways.
Instead, you can implement a your own "tie" where the state is only
updated if different from what it should be. For example, try something
like:
# Keep KeypadLinc and X10 Appliance in sync
if (state_now $ds_hall_ma_d) && (state $ds_hall_ma_d ne state
$x10_appliance) {
set $x10_appliance state $ds_hall_ma_d;
} elsif (state_now $x10_appliance) && (state $ds_hall_ma_d ne state
$x10_appliance) {
set $ds_hall_ma_d state $x10_appliance;
}
Note, I have not actually tested that code so it may have errors, but
should give you the general idea.
Good luck!
Jeff
On 2021-01-18 1:22 p.m., W Gadsby via misterhouse-users wrote:
> Has anyone successfully controlled an X10 device from an Insteon
> device in mh? I've been trying to use an Insteon Keypadlinc to
> control an X10 appliance module. My goal is to be able to control the
> device from mh or a keypadlinc button. Control from mh should work by
> adding statements like the following to the user code file:
>
> if(condition) {
> set $x10_appliance OFF;
> }
>
> The Keypadlinc button LED should show the current state of the
> appliance, whether it was last controlled from the Keypadlinc or mh.
>
> So far I have been unsuccessful. Here are the relevant lines from my
> Insteon.mht file:
>
> INSTEON_PLM, PLM, # xxxxxx firmware 9b
> X10A, B4, x10_appliance, Appliances|Laundry_Room, PLM
> INSTEON_KEYPADLINC, xx.xx.xx:06, ds_hall_ma_d, Buttons, PLM
>
> I have Insteon debugging turned on in the ini file. First I tried
> creating an Insteon scene with the X10 and Insteon devices each acting
> as controller and responder:
>
> INSTEON_ICONTROLLER, 14, x10_s, all_scenes, PLM
> SCENE_BUILD, x10_s, ds_hall_ma_d, 1, 1, 100%, 0s
> SCENE_BUILD, x10_s, x10_appliance, 1, 1, 100%, 0s
>
> This produced an error message saying something to the effect that
> insteon scenes cannot control X10 items directly. I gave up on this
> scene and commented it out. Then I tried using tie_items in a user
> code file:
>
> $ds_hall_ma_d -> tie_items($x10_appliance);
>
> This allows me to control the fan from the switch, but the Keypadlinc
> LED does not toggle in response to mh initiated state changes. Next I
> tried adding the reverse link to attempt to set the LED correctly:
>
> $x10_appliance -> tie_items($ds_hall_ma_d);
>
> This causes a loop. Whenever I press the Keypadlinc button, it causes
> an X10 command to be sent, which causes another command to go back to
> the Keypadlinc button, which causes an X10 command to be sent. This
> is logical, but I need a way to control the Keypadlinc LED.
>
> I tried creating a scene for the Keypadlinc switch, hoping I could
> control it from the mh code, which would keep the LED in sync:
>
> INSTEON_ICONTROLLER, 14, x10_s, all_scenes, PLM
> SCENE_BUILD, x10_s, ds_hall_ma_d, 1, 1, 100%, 0s
>
> Then I used this in tie_items instead of the button itself:
>
> $x10_s -> tie_items($x10_appliance);
>
> When I push the button, the mh log shows ds_hall_ma_d was pushed, but
> doesn't activate the fan. There's no mention of the scene, x10_s, in
> the log, so I think mh is ignoring the Insteon scene, at least as far
> as triggering events. It appears that the controller of a tie_items
> statement can only be an Insteon pushbutton, not a scene. Scenes
> appear to be ignored. I suspect the same holds true if I try to
> control $fan_s in my mh usercode file.
>
> Has anyone been successful controlling an X10 device from Insteon
> switches in mh? Thanks for any pointers.
>
>
> ________________________________________________________
> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users