I’ve pushed a HAP/CoAP control script: nanoleaf-ltpdu/hapcoap.py at 53d4167d07868cbab5de6819a56ff1fe66c94c70 · roysjosh/nanoleaf-ltpdu · GitHub. Devices can only be paired to one controller so you may have to factory reset the bulb if you have it connected to your Apple Home.
The script can perform initial pairing to retrieve long-term secrets, auth via previously-obtained long-term secrets, and reads/writes of arbitrary characteristics. You need to look up the hexadecimal service type and characteristic type, e.g. the Light service’s short form UUID is 0x43 and it contains a required On characteristic which has UUID 0x25.
Reading various Light characteristics and then flipping it off and on:
$ python3 hapcoap.py --devices 58L6 auth=REDACTED read=43,23 read=43,25 read=43,CE read=43,08 read=43,13 read=43,2F write=43,25,00 pause=3 write=43,25,01
WARNING:zeroconf:Error with socket 7 (('::1', 5353, 0, 0))): [Errno 101] Network is unreachable
Traceback (most recent call last):
File "/usr/lib64/python3.9/asyncio/selector_events.py", line 1056, in sendto
self._sock.sendto(data, addr)
OSError: [Errno 101] Network is unreachable
M1 ->
<- M2
M3 ->
<- M4
SUCCESS: pair verify
PDU response, TID 70, Success, Len 1108
PDU response, TID 70, Success, Len 15
Body: 4e616e6f6c6561662042756c62
PDU response, TID 70, Success, Len 3
Body: 01
PDU response, TID 70, Success, Len 6
Body: 72010000
PDU response, TID 70, Success, Len 6
Body: 64000000
PDU response, TID 70, Success, Len 6
Body: 0000e041
PDU response, TID 70, Success, Len 6
Body: 00008442
PDU response, TID 70, Success, Len 0
Body:
PDU response, TID 70, Success, Len 0
Body: