openhab / org.openhab.ui.habmin

HABmin - a graphical user interface for openHAB 2
231 stars 92 forks source link

Rule created with HABmin doesn't use the "when" section #162

Closed denniseffing closed 8 years ago

denniseffing commented 8 years ago

When configuring this rule: rule

HABmin creates the following source: rule2

The when section of the rule is completely empty, resulting in the rule never getting triggered. The examples provided on the GitHub page always use the "when" section but I couldn't reproduce this behaviour.

I use the latest stable release of HABmin (v0.1.4, 2016-04-10T22:45:48) and openHAB v2.0.0b2.

cdjackson commented 8 years ago

Is Rocker a valid item name?

denniseffing commented 8 years ago

Yes, here is my item configuration for reference:

Group All
Group EnOcean

Switch  Rocker              "Schalter 1"                        (EnOcean)   {aleoncean="REMOTEID=00:22:62:CB,TYPE=RD_F6-02-02,PARAMETER=BUTTON_DIM_B,CONVPARAM=PressedUpDown,ACTIONI=d"}

/* contact sensors */
Contact Window              "Fenster [%s]"              <contact>   (EnOcean)   {aleoncean="REMOTEID=01:95:4F:DA,TYPE=RD_D5-00-01,PARAMETER=OPEN_CLOSED"}
Contact Door                "Tuer [%s]"             <contact>   (EnOcean)   {aleoncean="REMOTEID=01:95:49:43,TYPE=RD_D5-00-01,PARAMETER=OPEN_CLOSED"}
Contact Window2             "Fenster 2 [%s]"            <contact>   (EnOcean)   {aleoncean="REMOTEID=01:92:39:71,TYPE=RD_D5-00-01,PARAMETER=OPEN_CLOSED"}

/* smart plugs */
Switch  SmartPlugSwitch         "Steckdose 1"                       (EnOcean)   {aleoncean="LOCALID=01:93:33:E9,REMOTEID=01:94:87:70,TYPE=RD_D2-01-08,PARAMETER=SWITCH"}
Number  SmartPlugPower          "Leistung: [%d W]"          <energy>    (EnOcean)   {aleoncean="LOCALID=FF:FF:FF:FF,REMOTEID=01:94:87:70,TYPE=RD_D2-01-08,PARAMETER=POWER_W"}
Number  SmartPlugEnergy         "Energie: [%d Wh]"          <energy>    (EnOcean)   {aleoncean="LOCALID=FF:FF:FF:FF,REMOTEID=01:94:87:70,TYPE=RD_D2-01-08,PARAMETER=ENERGY_WS"} 

/* temperature sensors */
Number  TemperatureWindow       "Am Fenster: [%.1f °C]"        <temperature>   (EnOcean)   {aleoncean="REMOTEID=01:95:9C:4B,TYPE=RD_A5-02-05,PARAMETER=TEMPERATURE_CELSIUS"}
Number  TemperatureDoor         "An Tuer: [%.1f °C]"           <temperature>   (EnOcean)   {aleoncean="REMOTEID=01:95:95:37,TYPE=RD_A5-02-05,PARAMETER=TEMPERATURE_CELSIUS"}
Number  StellaE_TEMPERATURE     "Temperature Stella: [%.1f °C]"        <temperature>   (EnOcean)   {aleoncean="LOCALID=01:93:33:E9,REMOTEID=01:85:16:EC,TYPE=RD_A5-20-01,PARAMETER=TEMPERATURE_CELSIUS"}

/* motion sensors */
/* 1 */
Number  MotionSensor_VOLTAGE        "Spannung: [%.1f V]"            <energy>    (EnOcean)   {aleoncean="REMOTEID=00:05:32:2D,TYPE=RD_A5-08-02,PARAMETER=SUPPLY_VOLTAGE_V"}
Number  MotionSensor_LUX        "Helligkeit: [%.1f Lux]"        <light>     (EnOcean)   {aleoncean="REMOTEID=00:05:32:2D,TYPE=RD_A5-08-02,PARAMETER=ILLUMINATION_LUX"}
Switch  MotionSensor_MOTION         "Bewegung: [MAP(motion.map):%s]"    <motion>    (EnOcean)   {aleoncean="REMOTEID=00:05:32:2D,TYPE=RD_A5-08-02,PARAMETER=MOTION"}
/* 2 */
Number MotionSensor2_VOLTAGE        "Spannung: [%.1f V]"            <energy>    (EnOcean)   {aleoncean="REMOTEID=00:05:2E:C9,TYPE=RD_A5-08-02,PARAMETER=SUPPLY_VOLTAGE_V"}
Number MotionSensor2_LUX        "Helligkeit: [%.1f Lux]"        <light>     (EnOcean)   {aleoncean="REMOTEID=00:05:2E:C9,TYPE=RD_A5-08-02,PARAMETER=ILLUMINATION_LUX"}
Switch MotionSensor2_MOTION     "Bewegung: [MAP(motion.map):%s]"    <motion>    (EnOcean)   {aleoncean="REMOTEID=00:05:2E:C9,TYPE=RD_A5-08-02,PARAMETER=MOTION"}

/* thermostats */
Number  StellaE_POSITION        "Position: [%d %%]"         <heating>   (EnOcean)   {aleoncean="LOCALID=01:93:33:E9,REMOTEID=01:85:16:EC,TYPE=RD_A5-20-01,PARAMETER=POSITION_PERCENT"}
Switch  StellaE_TEMP_CTRL_ENABLE    "Temperatursteuerung"                   (EnOcean)   {aleoncean="LOCALID=01:93:33:E9,REMOTEID=01:85:16:EC,TYPE=RD_A5-20-01,PARAMETER=TEMPERATURE_CONTROL_ENABLE"}
Number  StellaE_SETPOINT_POS        "Position: [%d %%]"         <heating>   (EnOcean)   {aleoncean="LOCALID=01:93:33:E9,REMOTEID=01:85:16:EC,TYPE=RD_A5-20-01,PARAMETER=SETPOINT_POSITION_PERCENT"}
cdjackson commented 8 years ago

Well, for some reason, HABmin doesn't see these as valid items. If they are valid, it should put .state on the end, and it should also add the when clause.

denniseffing commented 8 years ago

Okay, now I've tried to add two more test switches, without any format or binding or anything else like this:

Switch Test1
Switch Test2

but still, this is the result: test

Weirdly enough, HABmin uses sendCommand again instead of postUpdate. My guess is that the issue #161 is directly connected to HABmin not seeing them as valid items, but then again when still doesn't work.

Is there any way to verify that HABmin doesn't see them as valid items through its interface? Every configured item shows up under "Configuration" -> "Elements" and if I click on one, the item details extracted from HABmin look like this: item Any other suggestions I can try to make this work?

cdjackson commented 8 years ago

Sorry - I didn’t click last night you were using OH2 (although I should have - sorry).

The reason for the problem is the same - it’s not detecting the items. However my way of searching for items might not be OH2 compatible. I’ll take a another look…

On 26 Apr 2016, at 10:17, Dennis Effing notifications@github.com wrote:

Okay, now I've tried to add two more test switches, without any format or binding or anything else like this:

Switch Test1 Switch Test2 but still, this is the result: https://cloud.githubusercontent.com/assets/5879568/14811193/2f72a79a-0b97-11e6-975f-543b10f28820.png Weirdly enough, HABmin uses "sendCommand" again instead of postUpdate. My guess is that the issue #161 https://github.com/cdjackson/HABmin2/issues/161 is directly connected to HABmin not seeing them as valid items, but then again when still doesn't work.

Is there any way to verify that HABmin doesn't see them as valid items through its interface? Every configured item shows up under "Configuration" -> "Elements" and if I click on one, the item details extracted from HABmin look like this: https://cloud.githubusercontent.com/assets/5879568/14811275/af8358f8-0b97-11e6-9abf-014f0ee2c3f5.png Any other suggestions I can try to make this work?

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/cdjackson/HABmin2/issues/162#issuecomment-214664228

denniseffing commented 8 years ago

Can you give me an ETA on when you plan to take a look at this?

I am planning to use your rule creation for users who don't necessarily know much about programming or anything for that matter. Also, if you figure out the actual problem causing this (with reference to the code or anything), that'd be much appreciated!

cdjackson commented 8 years ago

Sorry - I’ve been travelling for work. I’ve made a change that might software the problem and I’ll try and update the JAR tonight (UK time).

On 29 Apr 2016, at 11:56, Dennis Effing notifications@github.com wrote:

Can you give me an ETA on when you plan to take a look at this?

I am planning to use your rule creation for users who don't necessarily know much about programming or anything for that matter. Also, if you figure out the actual problem causing this (with reference to the code or anything), that'd be much appreciated!

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/cdjackson/HABmin2/issues/162#issuecomment-215683914

denniseffing commented 8 years ago

Any update on the updated JAR?

cdjackson commented 8 years ago

The JAR was updated, but the problem still exists and I've not had a chance to look at it yet.

cdjackson commented 8 years ago

Please try the latest snapshot to see if this works better...

cdjackson commented 8 years ago

I believe this is fixed in the latest version. If not, please reopen.