I am wondering the same things
Me, too.
I tried out a profile with âAmazon Dash Buttonâ. But the trigger only triggers, but without any state e.g. PRESSED. How to achive this? Here is my rule a want to replace:
rule "Dash button Sagrotan pressed"
when
Channel 'amazondashbutton:dashbutton:50-f5-da-XX-XX-XX:press' triggered
then
if(Hue_Light3_Toggle.state==OFF) {
sendCommand(Hue_Light3_Toggle, ON)
} else {
sendCommand(Hue_Light3_Toggle, OFF)
}
end
.
.
But to use profile [profile=ârawbutton-toggle-switchâ] I need a trigger = PRESSED !!
How can I transform âtriggeredâ = empty to = PRESSED ? (see above rule)
see also example from documentation:
when
Channel "serialbutton:button:mybutton:button" triggered PRESSED
then
if (Light_Bedroom.getStateAs(OnOffType) != ON)
Light_Bedroom.sendCommand(ON)
else
Light_Bedroom.sendCommand(OFF)
end
here the event in logfile:
12:24:04.912 [INFO ] [smarthome.event.ChannelTriggeredEvent] - amazondashbutton:dashbutton:50-f5-da-xx-xx-xx:press triggered
.
the event triggered an âemptyâ event.
I tried transformation map, but this is not running. I could not transform âemptyâ to PRESSED
Currently it is not possible to define a profile for an item without being linked to a channel. By their nature, profiles are correlated to links between items and channels.
That it not possible. We have to change the channel type of the press
channel in the code and adopt the implementation accordingly. I will put it onto my TO-DO list.
Any plan to have it? In my case, the majority of the profiles I need are setting items from devices (as I am using a lot of âproxyâ items).
Then for me profile is useless at the moment. Neither dashbutton nor hue dimmer switch support the event âPRESSEDâ.
Better you can attach events as parameter to a profile?
e.g [profile=ârawbutton-toggle-switchâ, trigger=âabcdâ]
No, I am not aware of such plans. Please open a feature request in https://github.com/eclipse/smarthome/issues or - even better - work on it on your own .
I second that. I figured several use-cases in my own environment for such a feature too.
Absolutely. Especially for the Hue Switches (see Hue Binding - Dimmer Switch).
Ahh, OK, now I understand what you mentioned in the other topic.
I changed it for the Amazon Dash Button.
Thanks a lot.
In case of non useing the profile (e.g. some of my rules are too complex!) , do I have to change such complex rules from:
Channel "amazondashbutton:dashbutton:fc-a6-67-0c-aa-c7:press" triggered
to
Channel "amazondashbutton:dashbutton:fc-a6-67-0c-aa-c7:press" triggered PRESSED
??
No, a rule like in your example - without âPRESSEDâ - will work in the same way.
OK, thanks!
Iâve installed 2.5.0.201901020757 AmazonDashButton Binding.
Nothing happens when I press a Dash Button.
here is my .item
Switch Hue_Light3_Toggle "Licht Bibliothek An/Aus" <light> (GF_Biblio, Lights) [ "Lighting" ] {channel="hue:0100:0017xxxxxxxxxx:8:brightness", channel="amazondashbutton:dashbutton:50-f5-da-xx-xx-xx:press" [profile="rawbutton-toggle-switch"] }
.
.
In PaperUI there is also no profile to select in pull-down-menu:
Could be that it was merged after 7:57 h on 02. January 2019?
Yes, I am pretty sure it was later. After lunch.
Ok. Thanks. Iâll wait for next build. #1487
Build is running at the momentâŠ
https://ci.openhab.org/job/PR-openHAB2-Addons/11843/
It is change No. 41
Haha, ⊠then you will have the chance to test it again tonight âŠ
Ok, Iâm on #1487 (=2.5.0.201901040921 â AmazonDashButton Binding)
I could test the profile now: (item see here)
19:10:26.405 [INFO ] [smarthome.event.ChannelTriggeredEvent] - amazondashbutton: dashbutton:50-f5-da-xx-xx-xx:press triggered PRESSED
19:10:26.409 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'Hue_Light3_ Toggle' received command ON
.
.
First impression: it is running well.
Btw, all my Dashbuttons now trigger the following event:
.
19:10:26.405 [INFO ] [smarthome.event.ChannelTriggeredEvent] - amazondashbutton: dashbutton:xx-xx-xx-xx-xx-xx:press triggered PRESSED
.
Both rules are running (new and old):
rule "My Dash Button pressed"
when
Channel "amazondashbutton:dashbutton:fc-a6-67-0c-aa-c7:press" triggered PRESSED
rule "My Dash Button pressed"
when
Channel "amazondashbutton:dashbutton:fc-a6-67-0c-aa-c7:press" triggered
.
.
OK. This will reduce my lines in the .rules file! Thanks a lot!
Great. Nice to hear . To reduce code and effort for the user is the idea behind profiles.
.
.
Btw, since I use profile I always get a WARNING at OH startup:
.
2019-01-20 17:17:56.167 [WARN ] [ore.common.registry.AbstractRegistry] - Cannot add "Metadata" with key "channel:Hue_Light2_Toggle". It exists already from provider "GenericMetadataProvider"! Failed to add a second with the same UID from provider "GenericMetadataProvider"!
2019-01-20 17:17:56.167 [WARN ] [ore.common.registry.AbstractRegistry] - Cannot add "Metadata" with key "channel:Hue_Light3_Toggle". It exists already from provider "GenericMetadataProvider"! Failed to add a second with the same UID from provider "GenericMetadataProvider"!
.
.
here are my .items:
Switch Hue_Light2_Toggle "Licht Windfang An/Aus" <light> (GF_Corridor, Lights) [ "Lighting" ] {channel="hue:0100:0017xxxxxxxxx:2:brightness", channel="amazondashbutton:dashbutton:18-74-2e-xx-xx-xx:press" [profile="rawbutton-toggle-switch"] }
Switch Hue_Light3_Toggle "Licht Bibliothek An/Aus" <light> (GF_Biblio, Lights) [ "Lighting" ] {channel="hue:0100:0017xxxxxxxxx:8:brightness", channel="amazondashbutton:dashbutton:50-f5-da-xx-xx-xx:press" [profile="rawbutton-toggle-switch"] }
.
.
It seems to appear ONLY with Hue items:
See also here:
Hi Alex,
It is already known and definitely not related to the Hue binding. I seeing it in my environment for any item using a profile and others too.