SNZB-01M has 4 buttons, each button has 4 modes (1-klick, 2-klick, 3-klick, hold). The 4 buttons of the device are recognized by deconz/phoscon, but there ist no distinction between the 4 modes. I saw that there is a file /usr/share/…/snzb-01m_remote.json. Doesn’t this mean that the device should operate as expected?
The button ma is in an external file
"sonoffSNZB-01MMap": {
"vendor": "Sonoff",
"doc": "Switch SNZB-01M",
"modelids": ["SNZB-01M"],
"map": [
[1, "0x01", "FC12", "ATTRIBUTE_REPORT", "1", "S_BUTTON_1", "S_BUTTON_ACTION_SHORT_RELEASED", "single"],
[1, "0x01", "FC12", "ATTRIBUTE_REPORT", "2", "S_BUTTON_1", "S_BUTTON_ACTION_DOUBLE_PRESS", "double"],
[1, "0x01", "FC12", "ATTRIBUTE_REPORT", "3", "S_BUTTON_1", "S_BUTTON_ACTION_LONG_RELEASED", "long"],
[1, "0x01", "FC12", "ATTRIBUTE_REPORT", "4", "S_BUTTON_1", "S_BUTTON_ACTION_TREBLE_PRESS", "triple"],
[1, "0x02", "FC12", "ATTRIBUTE_REPORT", "1", "S_BUTTON_2", "S_BUTTON_ACTION_SHORT_RELEASED", "single"],
[1, "0x02", "FC12", "ATTRIBUTE_REPORT", "2", "S_BUTTON_2", "S_BUTTON_ACTION_DOUBLE_PRESS", "double"],
[1, "0x02", "FC12", "ATTRIBUTE_REPORT", "3", "S_BUTTON_2", "S_BUTTON_ACTION_LONG_RELEASED", "long"],
[1, "0x02", "FC12", "ATTRIBUTE_REPORT", "4", "S_BUTTON_2", "S_BUTTON_ACTION_TREBLE_PRESS", "triple"],
[1, "0x03", "FC12", "ATTRIBUTE_REPORT", "1", "S_BUTTON_3", "S_BUTTON_ACTION_SHORT_RELEASED", "single"],
[1, "0x03", "FC12", "ATTRIBUTE_REPORT", "2", "S_BUTTON_3", "S_BUTTON_ACTION_DOUBLE_PRESS", "double"],
[1, "0x03", "FC12", "ATTRIBUTE_REPORT", "3", "S_BUTTON_3", "S_BUTTON_ACTION_LONG_RELEASED", "long"],
[1, "0x03", "FC12", "ATTRIBUTE_REPORT", "4", "S_BUTTON_3", "S_BUTTON_ACTION_TREBLE_PRESS", "triple"],
[1, "0x04", "FC12", "ATTRIBUTE_REPORT", "1", "S_BUTTON_4", "S_BUTTON_ACTION_SHORT_RELEASED", "single"],
[1, "0x04", "FC12", "ATTRIBUTE_REPORT", "2", "S_BUTTON_4", "S_BUTTON_ACTION_DOUBLE_PRESS", "double"],
[1, "0x04", "FC12", "ATTRIBUTE_REPORT", "3", "S_BUTTON_4", "S_BUTTON_ACTION_LONG_RELEASED", "long"],
[1, "0x04", "FC12", "ATTRIBUTE_REPORT", "4", "S_BUTTON_4", "S_BUTTON_ACTION_TREBLE_PRESS", "triple"]
]
},
Try to check for event in Phoscon/help/API Information/events
You need to have return like X00Y in “buttonevent”, X is the button number and Y the action.