I hope I can get some help on this - already searched the community but found nothing for specifically this device.
I got an Eltako F6T55B enocean switch with 6 buttons to play with.
As described in the manual, the switch really consists of one switch with 4 buttons (the upper two rows) and a second switch with two buttons (third row). Adding both as things was straight forward. The binding only supports one trigger channel, that I used to react on fired triggers with two rules. In the log viewer, I can see the triggers also contain a PRESSED or RELEASED event, but nothing else useful.
My problem/question: I can’t figure out how to distinguish which button was pressed. Rule 1 always fires for any of the top 4 buttons, rule 2 for any of the lower 2.
I received some addition information from Eltako, maybe that helps to answer my question / solve my issue?
Essentialy, it says that Data_byte3 of the sent telegram indicates which button was pressed, thus:
ID of upper four buttons
button 1 = 70
button 2= 50
button 3 = 30
button 4 = 10
ID of lower two buttons
5 = 70
6 = 50
You normally do not need the trigger channels.
A rocker-switch-thing should have channels A and B (normally left and right, unless you mounted the rocker upside down) if properly defined.
You then just link an item to the channel. See here https://community.openhab.org/t/new-openhab2-enocean-binding/39917/27. That item should be a normal switch-item that can be switched via the two buttons eg “links oben” and “links unten”.
Only if you are interested in the pressed/released info of each button, then you use trigger channels and rules.
all these devices do only have one trigger channel, nothing else
Then you simply did it wrong.
It would also help if you would share some more information, eg at least if you are using OH2 or 3. And of course your thing-config.
I quickly created a rocker-switch in OH2 paperui:
I am using OH3 on a Raspberry. Attached screenshots of my thing configuration. All three channels shown are just trigger channels. There is also three “normal” channels hidden behind “show advanced”, but these are useless for my case. Happy to share more config details, just let me know what helps.
You used the wrong EEP and created simple (!) pushbuttons. That are different devices. You want to use a “physcial rockerswitch” EEP F6-02 as seen in my screenshot because this is the EEP your physical Eltako-device sends.
the simple pushbutton gets created automatically by OpenHAB when I scan for new devices. I did create a rocker switch following your guidance. With that, I again (see screenshots) get a device with only trigger channels, and the only two events are again PRESSED and RELEASED.
Since you are on OH2 and I am ony OH3 - can it be this is a defect of either OH or the binding in OH3?
I used the same Eltako-Device with a test Homee device before, and there it worked and fired different events for the 6 different buttons.
I would not think that there is something wrong with the binding in OH3, but I can’t test.
What for sure does not work due to the nature of the Enocean protocol is the discovery of switches, rockers and so on. You have to define these things manually.
So are you sure you created a rockerswitch THING from scratch ?
I am not an Enocean expert at all - but why woulnd’t auto discovery work? It is supported by the UI, and when I start it it finds all my devices. It just doesn’t create the channels the way you showed them. I really don’t understand - can you explain?
I was just looking into my openhab log, and found something interesting (screenshot attached): see the line at 2021-01-28 12.41:35.637 saying " … it has to be fixed by the bindings developer".
to your last question: yes, I did create that rockerswitch thing manually. The auto-discovery always just creates a simple-push-button.
Autodiscovery does not work well with the simple switches/rockers because they all send PTM200 telegrams. These just contain the button(s) pressed but not the EEP (the device). You can see that in the info Eltako shared.
So they all are recognised as “simple-push-buttons” even if they are not. The trace you have could be a symptom as the binding in confused.
That’s why I always manually define my dumb sensors like rockers, but use discovery for actuators because they support the “teach-in” where they present their EEP so the binding knows what device it is.
Can you share a screenshot of your new rocker-thing configuration ?
ok, got it, thx. here one of my rocker things. can’t create a channel, can’t connect with an item. all I have is the trigger I can use in a rule.
You got the two channels A and B, so just create&link channel A to a switch and B to another switch.
The bottom row of your F6T55B is another enonceanID, create a rocker-switch thing there as well. You’ll also get channels A & B, where only A will be usable.
by now, you must be thinking I am stupid :-). I am probably just not seeing something basic and obvious.
in the OH3 UI, I cannot create any items from this device and link them to a channel. Only when I click the “show advanced” button I can do that for the additional channels, but not for the trigger channels.
I’m sorry, but I do not use OH3 yet. In the past other users also struggled at that point. See here the remark from Dirk https://community.openhab.org/t/openhab-3-0-0-and-enocean-binding-ignoring-sender-id/113110/7
The approach is correct (read the whole thread I linked) but the UI seems to be not intuitive at that point.
Perhaps approach Dirk directly ?
good news: I finally, after taking several close looks at the logs and some experiments, figured out how this works. Here is what I did:
first of all: many of my problems came from the fact that, for whatever mystical reason, the signal of the 6 different buttons seem not to be equally strong. Strange enough, while one of the six button’s signal is always received by my OH (resp. the USB Enocean module I use in my Raspberry), the signals of the other five buttons aren’t. So, first advice (and probably not new): when adding new devices and playing with the log file, make sure you are close enough to your OH device!
After I had figured that out, I could see in the log which button initiated which trigger with their events. However, in the log file, you don’t see the (trigger) channels, I had to find that out by essentially trial and error.
So here is what I have now set up to correctly identify resp. react to each of the 6 individual buttons (in OH3):
- the F6T55B, as also documented by Eltako, essentially consists of two devices. The upper 4 buttons form one device, the lower 2 a second one. You need to find out the Enocean ID of both devices. I did that by using the standard scan functionality of OH. So go to things, add things, select the Enocean binding, and start the scan. This will find two new devices after you pressing one of the buttons on the right side of your Eltako, each for the upper and the lower device. Next, you have to create things for these two new devices, so you can note down their Enocean IDs. After this, you can delete these two things again.
- Now create two new things manually. Make sure you select the device type “Rocker Switch”, select your enocean bridge, and give them some name and the Enocean IDs you noted above.
- Now comes the trick - unlike usually, these things don’t offer channels that you can use to create items and link them to your things. The only channels offered are trigger channels.
- So you have to create rules that react to the triggers sent per button. With my little knowledge about OH, what I did was create one rule per trigger - maybe, this can be done in a more sophisticated way.
- For the - slightly bigger - main buttons in the middle row, create one rule that reacts when a trigger channel fires on your first (upper 4 button) thing on “Channel A” and sends the event “DIR1_PRESSED”. (“DIR1…” is the left button in a row), and another rule that reacts to the same trigger, thing and channel but on event “DIR2_PRESSED”.
- For the upper row, do the same with the same thing but “Channel B”.
- And finally, again the same but now for your second thing and again on “Channel B”.
This is it. Now I am, as said, not at all an OpenHAB expert. If there is better ways to achieve the same, I am more than happy to learn!