SmartAxiom / openhab

Automatically exported from code.google.com/p/openhab
0 stars 0 forks source link

switch doesn't (always) react to a changed status (GUI) #161

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

My .items file contains 2 switches and 4 strings, all in one group (e.g. 
"testdevice")

The sitemaps looks like this:
Mainpage
|--Frame1
|  |-- ...
|--Frame2
   |--Devicename (e.g. WaterPumps)
      |--Building 1
         |--Group item=testdevice label="pump 3rd floor"
         |--Group item=testdevice label="pump 2nd floor"
         |--Group item=testdevice label="pump 1st floor"
      |--Building 2
         |--Group item=testdevice label="pump 3rd floor"
         |--Group item=testdevice label="pump 2nd floor"
         |--Group item=testdevice label="pump 1st floor"
      |--Building 3
      |--Building 4
....

So there are a lot "instances" of the same device. (For demonstration purpose 
that's good enough.)

I've defined a rule so that the user isn't allowed to enable switch2 as long as 
switch1 isn't enabled.
The rule works fine, I'm using "say" to test it and can werify it with the logs.

when i choose a device and press the button, then the rule switches the button 
instantly back to off. (and gives an audio notification)
a second device mostly also works.
but after the 3rd device the GUI stops reacting to the setToOff command.
The "say" command still tells me that I'm not allowed to use this switch, but 
on the GUI it's still switched to on.

Here's the rule:
rule "lock switch2 if switch1 is OFF"
when 
    Item switch2 received command
then
    if(receivedCommand == ON) {
        if(switch1_OnOff.state == OFF) {
            postUpdate(switch2, OFF)
            say("Turn it on first")
        }
        else {
            sendHttpGetRequest("http://10.22.26.84:1991/do_smth")
        }
    }
    else if(receivedCommand == OFF) {
        if(switch1.state == ON) {
            sendHttpGetRequest("http://10.22.26.84:1991/do_smth_else")
        }
    }
end

The log shows that switch2 is turned to "ON" and instantly back to "OFF" every 
time.

Browser:  Chrome, Firefox, Safari
Gui: "normal" one and GreenT

Original issue reported on code.google.com by quellt...@gmail.com on 29 Nov 2012 at 3:43

GoogleCodeExporter commented 8 years ago
Hi,

before digging deeper into analysing this issue. Does it still apply?

Regards,

Thomas E.-E.

Original comment by teichsta on 9 Apr 2013 at 8:26

GoogleCodeExporter commented 8 years ago

Original comment by kai.openhab on 22 May 2013 at 8:12

GoogleCodeExporter commented 8 years ago
Since there were no updates on this issue i reject it. Please feel free to 
reopen it anytime if it still applies.

Original comment by teichsta on 13 Aug 2013 at 3:41