[SOLVED] Amazon dash button works with Hue for one set of hue lights, the other not so lucky

Tags: #<Tag:0x00007f2faf62f210>

Hey all,

Hope everyone is having a great weekend. I’ve been able to battle my way through everything up until this point. I’m by no means a programmer, but after the upgrade to 2.3 I can’t get one of my dash buttons to turn off my light. I’m sure it’s something silly on my part. My first one with multiple lights works fine:

aa1st

Not sure why this one doesn’t work in the rule. Every time i press in the logs it sends the command on.

aa2nd

Thank you!

Can you publish the relevant logs please?

When publishing code, you can paste it in the box.
Just use the code fences, please…

My apologies, vzorglub. If I press the bedroom dash button to grab the logs, I’ll be sleeping on the couch for sure… I will for sure get it tomorrow. So if I understand I just put my frontail code like this after I press the button on dash button?

Use the before last button on the right and paste your code between the ```

The button with </> in it

Here is the log of pressing the dash button two times.  Thanks so much
2018-06-09 12:12:39.706 [vent.ItemStateChangedEvent] - Bathroom_Cans changed from OFF to ON

2018-06-09 12:14:03.649 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:ff15347c:node8' has been updated.

2018-06-09 12:15:12.829 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:ff15347c:node20' has been updated.

2018-06-09 12:15:23.072 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts1 changed from 6.38 to 8.25

==> /var/log/openhab2/openhab.log <==

2018-06-09 12:15:48.134 [ERROR] [g.nest.handler.NestThermostatHandler] - Unsupported channelId 'time_to_target_mins'

2018-06-09 12:15:48.238 [ERROR] [g.nest.handler.NestThermostatHandler] - Unsupported channelId 'time_to_target_mins'

==> /var/log/openhab2/events.log <==

2018-06-09 12:15:48.265 [vent.ItemStateChangedEvent] - nest_thermostat_d6b49bb8_bGgroZy2vgckTV_qzcbERiaHtEs8rYDX_set_point changed from 66.0 to 70.0

2018-06-09 12:16:23.089 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts1 changed from 8.25 to 5.17

2018-06-09 12:16:23.204 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts2 changed from 9.35 to 5.83

2018-06-09 12:16:24.910 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:ff15347c:node31' has been updated.

2018-06-09 12:17:17.354 [vent.ItemStateChangedEvent] - Our_Closet changed from ON to OFF

2018-06-09 12:17:22.603 [vent.ItemStateChangedEvent] - Bathroom_Cans changed from ON to OFF

2018-06-09 12:17:23.094 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts1 changed from 5.17 to 6.38

==> /var/log/openhab2/openhab.log <==

2018-06-09 12:17:37.512 [ERROR] [g.nest.handler.NestThermostatHandler] - Unsupported channelId 'time_to_target_mins'

2018-06-09 12:17:38.718 [ERROR] [g.nest.handler.NestThermostatHandler] - Unsupported channelId 'time_to_target_mins'

==> /var/log/openhab2/events.log <==

2018-06-09 12:18:23.113 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts1 changed from 6.38 to 5.17

==> /var/log/openhab2/openhab.log <==

2018-06-09 12:19:33.642 [ERROR] [g.nest.handler.NestThermostatHandler] - Unsupported channelId 'time_to_target_mins'

==> /var/log/openhab2/events.log <==

2018-06-09 12:20:23.213 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts2 changed from 5.83 to 6.82

2018-06-09 12:22:23.224 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts2 changed from 6.82 to 5.83

2018-06-09 12:23:40.236 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:ff15347c:node8' has been updated.

2018-06-09 12:23:40.361 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:ff15347c:node22' has been updated.

2018-06-09 12:25:23.245 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts2 changed from 5.83 to 6.82

2018-06-09 12:26:23.261 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts2 changed from 6.82 to 5.83

2018-06-09 12:27:20.148 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:ff15347c:node20' has been updated.

2018-06-09 12:27:23.163 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts1 changed from 5.17 to 6.38

2018-06-09 12:27:23.260 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts2 changed from 5.83 to 3.19

==> /var/log/openhab2/openhab.log <==

2018-06-09 12:28:14.044 [ERROR] [g.nest.handler.NestThermostatHandler] - Unsupported channelId 'time_to_target_mins'

==> /var/log/openhab2/events.log <==

2018-06-09 12:28:14.099 [vent.ItemStateChangedEvent] - nest_thermostat_d6b49bb8_bGgroZy2vgckTV_qzcbERiaHtEs8rYDX_temperature changed from 68.0 to 69.0

==> /var/log/openhab2/openhab.log <==

2018-06-09 12:28:14.109 [ERROR] [g.nest.handler.NestThermostatHandler] - Unsupported channelId 'time_to_target_mins'

==> /var/log/openhab2/events.log <==

2018-06-09 12:28:32.190 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:ff15347c:node31' has been updated.

2018-06-09 12:33:15.913 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:ff15347c:node8' has been updated.

2018-06-09 12:35:47.583 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:ff15347c:node22' has been updated.

2018-06-09 12:39:23.346 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts2 changed from 3.19 to 4.73

2018-06-09 12:39:27.632 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:ff15347c:node20' has been updated.

2018-06-09 12:39:27.768 [vent.ItemStateChangedEvent] - zwave_device_ff15347c_node20_battery_level changed from 70 to 69

2018-06-09 12:40:39.614 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:ff15347c:node31' has been updated.

2018-06-09 12:40:39.758 [vent.ItemStateChangedEvent] - FridgeWaterSensor_BatteryLevel changed from 88 to 92

2018-06-09 12:42:23.359 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts2 changed from 4.73 to 5.83

2018-06-09 12:42:54.298 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:ff15347c:node8' has been updated.

2018-06-09 12:43:23.364 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts2 changed from 5.83 to 4.73

2018-06-09 12:45:23.374 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts2 changed from 4.73 to 3.19

2018-06-09 12:47:54.364 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:ff15347c:node22' has been updated.

2018-06-09 12:47:54.503 [vent.ItemStateChangedEvent] - zwave_device_ff15347c_node22_battery_level changed from 87 to 89

==> /var/log/openhab2/openhab.log <==

2018-06-09 12:50:07.689 [ERROR] [g.nest.handler.NestThermostatHandler] - Unsupported channelId 'time_to_target_mins'

2018-06-09 12:50:07.761 [ERROR] [g.nest.handler.NestThermostatHandler] - Unsupported channelId 'time_to_target_mins'

==> /var/log/openhab2/events.log <==

2018-06-09 12:50:07.780 [vent.ItemStateChangedEvent] - nest_thermostat_d6b49bb8_bGgroZy2vgckTV_qzcbERiaHtEs8rYDX_temperature changed from 69.0 to 70.0

2018-06-09 12:50:07.801 [vent.ItemStateChangedEvent] - nest_thermostat_d6b49bb8_bGgroZy2vgckTV_qzcbERiaHtEs8rYDX_humidity changed from 40 to 45

2018-06-09 12:51:34.852 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:ff15347c:node20' has been updated.

2018-06-09 12:52:23.322 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts1 changed from 6.38 to 5.17

2018-06-09 12:52:31.850 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:ff15347c:node8' has been updated.

2018-06-09 12:52:46.384 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:ff15347c:node31' has been updated.

2018-06-09 12:53:23.542 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts2 changed from 3.19 to 4.73

2018-06-09 12:53:46.319 [vent.ItemStateChangedEvent] - Our_Toilet changed from OFF to ON

2018-06-09 12:54:49.304 [vent.ItemStateChangedEvent] - Our_Toilet changed from ON to OFF

2018-06-09 12:55:23.342 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts1 changed from 5.17 to 6.38

2018-06-09 12:56:23.348 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts1 changed from 6.38 to 5.17

2018-06-09 12:56:23.443 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts2 changed from 4.73 to 5.83

2018-06-09 12:57:23.464 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts2 changed from 5.83 to 6.82

==> /var/log/openhab2/openhab.log <==

2018-06-09 12:58:07.611 [ERROR] [g.nest.handler.NestThermostatHandler] - Unsupported channelId 'time_to_target_mins'

2018-06-09 12:58:08.827 [ERROR] [g.nest.handler.NestThermostatHandler] - Unsupported channelId 'time_to_target_mins'

2018-06-09 12:58:08.894 [ERROR] [g.nest.handler.NestThermostatHandler] - Unsupported channelId 'time_to_target_mins'

==> /var/log/openhab2/events.log <==

2018-06-09 12:58:23.360 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts1 changed from 5.17 to 6.38

2018-06-09 12:58:23.458 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts2 changed from 6.82 to 4.73

2018-06-09 12:59:23.545 [vent.ItemStateChangedEvent] - EnergyMeter1_ElectricMeterWatts2 changed from 4.73 to 3.19

2018-06-09 13:00:01.409 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:ff15347c:node22' has been updated.

2018-06-09 13:00:07.289 [vent.ChannelTriggeredEvent] - amazondashbutton:dashbutton:78-e1-03-72-15-2e:press triggered 

==> /var/log/openhab2/openhab.log <==

2018-06-09 13:00:07.303 [INFO ] [se.smarthome.model.script.dashbutton] - Redbull has been pressed

==> /var/log/openhab2/events.log <==

2018-06-09 13:00:07.332 [ome.event.ItemCommandEvent] - Item 'Our_Bedroom' received command ON

2018-06-09 13:00:07.345 [ome.event.ItemCommandEvent] - Item 'hue_0210_001788a37021_7_color' received command ON

2018-06-09 13:00:07.356 [vent.ItemStateChangedEvent] - Our_Bedroom changed from 0 to 100

2018-06-09 13:00:07.365 [vent.ItemStateChangedEvent] - hue_0210_001788a37021_7_color changed from 254,98,0 to 254,98,100

2018-06-09 13:00:08.764 [vent.ItemStateChangedEvent] - hue_0210_001788a37021_7_color changed from 254,98,100 to 254,98,29

2018-06-09 13:00:39.389 [vent.ChannelTriggeredEvent] - amazondashbutton:dashbutton:78-e1-03-72-15-2e:press triggered 

==> /var/log/openhab2/openhab.log <==

2018-06-09 13:00:39.406 [INFO ] [se.smarthome.model.script.dashbutton] - Redbull has been pressed

==> /var/log/openhab2/events.log <==

2018-06-09 13:00:39.425 [ome.event.ItemCommandEvent] - Item 'Our_Bedroom' received command ON

2018-06-09 13:00:39.442 [ome.event.ItemCommandEvent] - Item 'hue_0210_001788a37021_7_color' received command ON

2018-06-09 13:00:39.450 [vent.ItemStateChangedEvent] - hue_0210_001788a37021_7_color changed from 254,98,29 to 254,98,100

Do you by any change put autoupdate="false" in the definition of Our_Bedroom?

Can I see the definition of Our_Bedroom, please?

Our_Bedroom was created in Paper UI so if I understand correctly there is no definition or ability to add the autoupdate=“false”. This is just based on my reading, do you want me to screenshot the item in PaperUI?

Here is your clue:

2018-06-09 13:00:07.345 [ome.event.ItemCommandEvent] - Item 'hue_0210_001788a37021_7_color' received command ON
2018-06-09 13:00:07.356 [vent.ItemStateChangedEvent] - Our_Bedroom changed from 0 to 100

Our_Bedroom is not a switch is it?

Then:

rule "BedDasher Pushed"
when
    Channel "amazondashbutton:dashbutton:78-e1-03-72-15-2e:press" triggered
then
    logInfo("dashbutton", "Redbull has been pressed")
    if (Our_Bedroon.state > 0) {
        Our_Bedroom.sendCommand(OFF)
        hue_0210_001788a37021_7_color.sendCommand(OFF)
    } else {
        Our_Bedroom.sendCommand(ON)
        hue_0210_001788a37021_7_color.sendCommand(ON)
    }
end        

Brilliant. It works like a champ now. Thank you so much for continuing to follow through on this vzorglub. I’ll watch for those dimmers in future rules that I use :slight_smile:
Mike

Coolio, mark the thread as solved, please. Tick mark under the solution post. Thanks

Done!