- 
                Notifications
    You must be signed in to change notification settings 
- Fork 22
Power management
        Benjamin Piouffle edited this page Sep 23, 2017 
        ·
        1 revision
      
    Getting the current bulb state is a two-step system. You'll first write a specific value, then the current bulb state will be updated in another handle. More on this can be found here. Please refer to that page for the layout of the diagnostic message.
So, to get that message:
char-write-req 0x000c ef0177
char-read-hnd 0x000f
This could return, for example, Characteristic value/descriptor: 66 15 23 25 41 1f 48 ff 00 00 07 99 00 00 00 00 00 00 00 00. The third hex pair there shows us the current power state. 23 means this bulb is off. To turn it on, we only need a single message: char-write-req 0x000c cc2333 - and to turn it off, char-write-req 0x000c cc2433.