Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$insteon->set("on~3~off") does not work for all devices #500

Open
marcmerlin opened this issue Apr 3, 2015 · 2 comments
Open

$insteon->set("on~3~off") does not work for all devices #500

marcmerlin opened this issue Apr 3, 2015 · 2 comments

Comments

@marcmerlin
Copy link
Collaborator

voice_cmd.pl: $gar_outlights_kpl->set('on2off');
^^^ -> yep it works for a KPL's main light, at least on most days :)

voice_cmd.pl: $garage_incandescent->set('on2off');
^^^ -> doesn't work for appliancelink

Kevin's reply:
Hmm. Well if it works in some places, we can probably make it work everywhere. Like I said, I haven't even found the code that enables this to work. Let me keep looking.

@krkeegan
Copy link
Collaborator

krkeegan commented Apr 8, 2015

I have no idea where in MH the support for this is. It is somewhere in Generic_Item or possibly in the mh script itself. I suspect if I could find where this is supported, I could figure out why it works on some device types but not others.

If anyone is able to find it let me know.

@marcmerlin
Copy link
Collaborator Author

I spent a while reading the code and here's what I found:
Generic_Item.pm:
sub state_overload {
my ($self, $flag) = @_;
if (lc $flag eq 'off') {
$self->{states_nomultistate} = 1;
$self->{states_nosubstate} = 1;
}

I didn't quite see/understand why some Insteon devices need this, and some don't, but I found that setting this makes on3off work:
$fmr_blind->state_overload(ON)

Does that help?

Either way, I'm doing better now that I have workaround for the issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants