Hey @sebmos
Thanks for putting this api together!
I have used it for automating the T1011 lightbulb with success and recently tried it on a T1013 but have ran into an issue getting the bulb to successfully power on.
Below is the output when I connect via cli (verbose logging on) there are no obvious issues that I see:
(AbstractDevice.connect) Connecting
(TcpSocket.connect) Connecting to 10.100.5.79
(AbstractDevice.new) TCP Socket connected
(AbstractDevice.connect) Connected to device T Rex (Model: T1013, Code: 62F5EF8E50C24B4E, IP Address: 10.100.5.79)
(AbstractDevice.connect) Loading current device state
(LightBulb.loadCurrentState) Loading current device state
(LightBulb.getState) Loading current device state
(AbstractDevice.getSequence) Loading current sequence number
(AbstractDevice.sendPacketWithResponse) 2673901,62F5EF8E50C24B4E,0
(AbstractDevice.encryptPacket) 2673901,62F5EF8E50C24B4E,0
(AbstractDevice.sendPacketWithResponse) Sending encrypted packet
(AbstractDevice.sendPacketWithResponse) Response received: {"type":"Buffer","data":[12,17,205,105,99,127,124,61,212,144,142,228,165,206,74,135]}
(AbstractDevice.sendPacketWithResponse) Response decrypted: {"type":"Buffer","data":[11,0,8,249,182,246,32,18,0,26,2,8,1,0,0,0]}
(AbstractDevice.sendPacketWithResponse) Deserializing response as T1013Packet
(AbstractDevice.getSequence) Current sequence number: 69049209
(LightBulb.getState) Sending request to device
(AbstractDevice.sendPacketWithResponse) 69049210,62F5EF8E50C24B4E,,,1
(AbstractDevice.encryptPacket) 69049210,62F5EF8E50C24B4E,,,1
(AbstractDevice.sendPacketWithResponse) Sending encrypted packet
(AbstractDevice.sendPacketWithResponse) Response received: {"type":"Buffer","data":[115,212,165,30,24,178,101,127,164,56,51,251,57,214,57,253,171,1,76,31,211,116,3,217,92,130,180,237,55,71,26,144,16,11,229,219,228,192,187,235,22,100,95,57,203,81,21,20,62,35,221,10,210,69,84,3,100,81,236,159,186,150,201,209]}
(AbstractDevice.sendPacketWithResponse) Response decrypted: {"type":"Buffer","data":[58,0,8,251,182,246,32,18,0,42,49,8,2,18,45,8,255,255,255,255,255,255,255,255,255,1,18,32,8,6,16,1,24,0,42,11,8,171,1,16,205,1,24,239,1,32,10,56,0,64,221,255,255,255,255,255,255,255,255,1,0,0,0,0]}
(AbstractDevice.sendPacketWithResponse) Deserializing response as T1013Packet
(LightBulb.loadCurrentState) Parsing current state as color light bulb
(LightBulb.loadCurrentState) Current power state: false
(LightBulb.loadCurrentState) Current state: {"brightness":10,"temperature":50,"colors":{"red":171,"green":205,"blue":239}}
(AbstractDevice.isPowerOn) Checking power state
(AbstractDevice.isPowerOn) Checking power state
(AbstractDevice.isPowerOn) Checking power state
(AbstractDevice.isPowerOn) Checking power state
and below is the output when I try to power on which is unsuccessful but again, nothing jumps out as an obvious issue. Perhaps you might find some useful information from the output.
? Options Turn on
(AbstractDevice.isPowerOn) Checking power state
(LightBulb.setPowerOn) Change to: true
LightBulb.setPowerOn
(LightBulb.setState) Change to: [object Object]
(LightBulb.setState) Treat as color bulb (T1013Packet)
Treat as color bulb (T1013Packet)
packet:
{ wrappers_:
{ '5':
{ wrappers_: [Object],
messageId_: undefined,
arrayIndexOffset_: -1,
array: [Array],
pivot_: 1.7976931348623157e+308,
convertedFloatingPointFields_: {} } },
messageId_: undefined,
arrayIndexOffset_: -1,
array: [ <4 empty items>, [ 1, [Array] ] ],
pivot_: 1.7976931348623157e+308,
convertedFloatingPointFields_: {} }
Set power
(LightBulb.setState) Set power
(LightBulb.setState) No colors
state:
{ brightness: 10,
temperature: 50,
colors: { red: 171, green: 205, blue: 239 } }
set brightness to this.state.brightness
set temp to this.state.temperature
(AbstractDevice.getSequence) Loading current sequence number
(AbstractDevice.sendPacketWithResponse) 1906194,62F5EF8E50C24B4E,0
(AbstractDevice.encryptPacket) 1906194,62F5EF8E50C24B4E,0
(AbstractDevice.sendPacketWithResponse) Sending encrypted packet
(AbstractDevice.sendPacketWithResponse) Response received: {"type":"Buffer","data":[94,194,252,160,171,188,250,110,248,27,44,66,215,161,93,209]}
(AbstractDevice.sendPacketWithResponse) Response decrypted: {"type":"Buffer","data":[11,0,8,185,177,229,32,18,0,26,2,8,1,0,0,0]}
(AbstractDevice.sendPacketWithResponse) Deserializing response as T1013Packet
(AbstractDevice.getSequence) Current sequence number: 68769977
sending packet
(LightBulb.setState) Sending packet
(AbstractDevice.sendPacket) 68769978,62F5EF8E50C24B4E,,,1,10,,7,0,10,50,,1
(AbstractDevice.encryptPacket) 68769978,62F5EF8E50C24B4E,,,1,10,,7,0,10,50,,1
(AbstractDevice.sendPacket) Sending encrypted packet
reloading state
(LightBulb.setState) Reloading state
(LightBulb.getState) Loading current device state
(AbstractDevice.getSequence) Loading current sequence number
(AbstractDevice.sendPacketWithResponse) 1979946,62F5EF8E50C24B4E,0
(AbstractDevice.encryptPacket) 1979946,62F5EF8E50C24B4E,0
(AbstractDevice.sendPacketWithResponse) Sending encrypted packet
(AbstractDevice.sendPacketWithResponse) Response received: {"type":"Buffer","data":[148,132,142,102,195,104,17,91,74,162,110,185,224,149,185,80]}
(AbstractDevice.sendPacketWithResponse) Response decrypted: {"type":"Buffer","data":[11,0,8,241,241,233,32,18,0,26,2,8,1,0,0,0]}
(AbstractDevice.sendPacketWithResponse) Deserializing response as T1013Packet
(AbstractDevice.getSequence) Current sequence number: 68843761
(LightBulb.getState) Sending request to device
(AbstractDevice.sendPacketWithResponse) 68843762,62F5EF8E50C24B4E,,,1
(AbstractDevice.encryptPacket) 68843762,62F5EF8E50C24B4E,,,1
(AbstractDevice.sendPacketWithResponse) Sending encrypted packet
(AbstractDevice.sendPacketWithResponse) Response received: {"type":"Buffer","data":[226,146,4,87,77,214,183,123,164,51,154,61,5,236,105,95,69,51,43,236,134,122,128,174,120,27,232,202,91,75,232,185,99,21,247,13,10,237,211,9,195,144,191,159,116,182,224,246,19,38,194,100,221,13,119,169,144,75,145,255,144,54,241,22]}
(AbstractDevice.sendPacketWithResponse) Response decrypted: {"type":"Buffer","data":[58,0,8,243,241,233,32,18,0,42,49,8,2,18,45,8,255,255,255,255,255,255,255,255,255,1,18,32,8,6,16,1,24,0,42,11,8,171,1,16,205,1,24,239,1,32,10,56,0,64,218,255,255,255,255,255,255,255,255,1,0,0,0,0]}
(AbstractDevice.sendPacketWithResponse) Deserializing response as T1013Packet
(LightBulb.setPowerOn) New power state: false
New power state:
Power is now off
(AbstractDevice.isPowerOn) Checking power state
(AbstractDevice.isPowerOn) Checking power state
(AbstractDevice.isPowerOn) Checking power state
(AbstractDevice.isPowerOn) Checking power state
Wanted to pass along this info in case it helps with any troubleshooting.
Thanks again for putting this project together!
Hey @sebmos
Thanks for putting this api together!
I have used it for automating the T1011 lightbulb with success and recently tried it on a T1013 but have ran into an issue getting the bulb to successfully power on.
Below is the output when I connect via cli (verbose logging on) there are no obvious issues that I see:
(AbstractDevice.connect) Connecting (TcpSocket.connect) Connecting to 10.100.5.79 (AbstractDevice.new) TCP Socket connected (AbstractDevice.connect) Connected to device T Rex (Model: T1013, Code: 62F5EF8E50C24B4E, IP Address: 10.100.5.79) (AbstractDevice.connect) Loading current device state (LightBulb.loadCurrentState) Loading current device state (LightBulb.getState) Loading current device state (AbstractDevice.getSequence) Loading current sequence number (AbstractDevice.sendPacketWithResponse) 2673901,62F5EF8E50C24B4E,0 (AbstractDevice.encryptPacket) 2673901,62F5EF8E50C24B4E,0 (AbstractDevice.sendPacketWithResponse) Sending encrypted packet (AbstractDevice.sendPacketWithResponse) Response received: {"type":"Buffer","data":[12,17,205,105,99,127,124,61,212,144,142,228,165,206,74,135]} (AbstractDevice.sendPacketWithResponse) Response decrypted: {"type":"Buffer","data":[11,0,8,249,182,246,32,18,0,26,2,8,1,0,0,0]} (AbstractDevice.sendPacketWithResponse) Deserializing response as T1013Packet (AbstractDevice.getSequence) Current sequence number: 69049209 (LightBulb.getState) Sending request to device (AbstractDevice.sendPacketWithResponse) 69049210,62F5EF8E50C24B4E,,,1 (AbstractDevice.encryptPacket) 69049210,62F5EF8E50C24B4E,,,1 (AbstractDevice.sendPacketWithResponse) Sending encrypted packet (AbstractDevice.sendPacketWithResponse) Response received: {"type":"Buffer","data":[115,212,165,30,24,178,101,127,164,56,51,251,57,214,57,253,171,1,76,31,211,116,3,217,92,130,180,237,55,71,26,144,16,11,229,219,228,192,187,235,22,100,95,57,203,81,21,20,62,35,221,10,210,69,84,3,100,81,236,159,186,150,201,209]} (AbstractDevice.sendPacketWithResponse) Response decrypted: {"type":"Buffer","data":[58,0,8,251,182,246,32,18,0,42,49,8,2,18,45,8,255,255,255,255,255,255,255,255,255,1,18,32,8,6,16,1,24,0,42,11,8,171,1,16,205,1,24,239,1,32,10,56,0,64,221,255,255,255,255,255,255,255,255,1,0,0,0,0]} (AbstractDevice.sendPacketWithResponse) Deserializing response as T1013Packet (LightBulb.loadCurrentState) Parsing current state as color light bulb (LightBulb.loadCurrentState) Current power state: false (LightBulb.loadCurrentState) Current state: {"brightness":10,"temperature":50,"colors":{"red":171,"green":205,"blue":239}} (AbstractDevice.isPowerOn) Checking power state (AbstractDevice.isPowerOn) Checking power state (AbstractDevice.isPowerOn) Checking power state (AbstractDevice.isPowerOn) Checking power stateand below is the output when I try to power on which is unsuccessful but again, nothing jumps out as an obvious issue. Perhaps you might find some useful information from the output.
Wanted to pass along this info in case it helps with any troubleshooting.
Thanks again for putting this project together!