Skip to content
Permalink
Browse files

Support Friends of Hue finish commissioning button

By pressing button 2000 and 3000 simultaneously.
  • Loading branch information
manup committed Nov 4, 2019
1 parent 9ed7c7f commit f562b282666292de870a7c89330d12af8eab3f8a
Showing with 12 additions and 0 deletions.
  1. +12 −0 de_web_plugin.cpp
@@ -951,6 +951,7 @@ void DeRestPluginPrivate::gpProcessButtonEvent(const deCONZ::GpDataIndication &i
0x63, S_BUTTON_6,
0x64, S_BUTTON_5,
0x65, S_BUTTON_5,
0x68, S_BUTTON_7,
0
};

@@ -991,6 +992,11 @@ void DeRestPluginPrivate::gpProcessButtonEvent(const deCONZ::GpDataIndication &i
btn = btnMapped + S_BUTTON_ACTION_SHORT_RELEASED;
}
}
else if (btn == 0x68) // aka ShortPress2Of2
{
// finish commissioning by pressing button 2000 and 3000 simultaneously
btn = btnMapped + S_BUTTON_ACTION_SHORT_RELEASED;
}
}

updateSensorEtag(sensor);
@@ -1073,6 +1079,9 @@ void DeRestPluginPrivate::gpDataIndication(const deCONZ::GpDataIndication &ind)
case deCONZ::GpCommandIdRelease1Of2:
case deCONZ::GpCommandIdPress2Of2:
case deCONZ::GpCommandIdRelease2Of2:
case deCONZ::GpCommandIdShortPress1Of1:
case deCONZ::GpCommandIdShortPress1Of2:
case deCONZ::GpCommandIdShortPress2Of2:
{
gpProcessButtonEvent(ind);
}
@@ -1295,6 +1304,9 @@ void DeRestPluginPrivate::gpDataIndication(const deCONZ::GpDataIndication &ind)
break;

default:
{
DBG_Printf(DBG_INFO, "GP unhandled command gpdsrcid %u: gpdcmdid: 0x%02X\n", ind.gpdSrcId(), ind.gpdCommandId());
}
break;
}
}

0 comments on commit f562b28

Please sign in to comment.
You can’t perform that action at this time.