From: Eloy P. <pe...@ch...> - 2013-05-09 23:15:59
|
On 05/07/2013 08:20 PM, Jim Duda wrote: > On 05/07/2013 01:18 AM, Chris Dragon wrote: >> The MH web interface is glitchy with Insteon items. If you click to turn an >> Insteon item ON, the page refreshes and still says that item is OFF but >> items in its scene that turn on with it may be shown as ON on the web page. >> Someone suggested a solution to this is to create a Light_Item for each >> Insteon light you want to control and use the web page the shows >> Light_Items. > > Try this in your insteon.mht: > > LIGHT, office_lights, light_office, All_Lights|Office > > I found that if I defined my groups attached to the LIGHT instead of the lower level INSTEON > device, then the web browser was much more responsive. Granted, this method assumes that > insteon will get an ACK, but that what it does anyway so I don't think this is a bad thing. > >> >> That works much better except I noticed Light_Items would turn themselves >> off after an hour. To fix that, I added: >> >> if($Startup || $Reload) { >> $DiningTable->manual(1); >> $WorkroomBack->manual(1); >> ...etc >> } > > You need this: > $light_office->x10_sync(0); > > The x10_sync is on by default and this is what is turning off your lights. > > Hope this helps. I've been thinking about this problem of the web interface not displaying the proper state of an INSTEON device immediately after interacting with that device with a web browser. It's definitely annoying. A "workaround" is to click on the device twice. But that's double annoying. I think the proper solution is to delay rendering of the page after interacting with the device in the web interface until the state of the device has changed. To check how this would work, the following little change makes things work nicely: --- a/web/bin/button_action.pl +++ b/web/bin/button_action.pl @@ -34,6 +34,7 @@ print "button_action.pl eval error: $@\n" if $@; # $state = $$object{state}; # print "dbx4b i=$item s=$state\n"; +sleep(1); my $h = &referer("/bin/list_buttons.pl?$list_name"); return &http_redirect($h); This is just a proof of concept, of course -- it's not optimal because we're probably waiting too long. Ideally, we'd delay just until we see the change of state, and not a fixed amount of time. And of course, we'd only wait if the device is an INSTEON device. This should be cleaner than disguising an INSTEON device as a Light_Item, IMO. Cheers, Eloy paris.- |