phev2mqtt icon indicating copy to clipboard operation
phev2mqtt copied to clipboard

Climate support for My14

Open nvschilleman opened this issue 3 years ago • 9 comments

Finally managed to connect my '15 Outlander thanks to the work of @IceEyz (#10) . However I stumble upon one problem. Attempting to set the climate mode always returns the following output:

INFO[0159] Topic: [phev/set/climate/heat] Payload: [on]
ERRO[0168] Disconnecting due to too many errors
INFO[0169] %PHEV_TCP_CONNECTED%
INFO[0169] Error setting register 0x1b: timed out attempting to set register 1b

So I decided to install a PCAP packet sniffer on my phone, and create separate PCAP files for setting each climate mode, for example, setting mode cool for 10 minutes, schedule disabled sends/receives the following packages:

INFO[0000] out  [b7] REGISTER SET  (reg 0x05 data 150c1515331e0200) 
INFO[0000] in   [b7] REGISTER NTFY (reg 0x01 data 0100) 
INFO[0000] out  [7b] REGISTER ACK  (reg 0x01 data 00)
INFO[0000] in   [78] REGISTER NTFY (reg 0x10 data 02)   
INFO[0000] out  [09] PING REQ      (id 8)               
INFO[0000] out  [09] REGISTER ACK  (reg 0x10 data 00)   
INFO[0000] in   [09] PING RESP     (id 8)     
INFO[0000] in   [6f] REGISTER NTFY (reg 0x1a data 0001) 
INFO[0000] out  [66] PING REQ      (id c)               
INFO[0000] out  [66] REGISTER ACK  (reg 0x1a data 00)   
INFO[0000] in   [66] PING RESP     (id c)               
INFO[0000] in   [66] REGISTER NTFY (reg 0x1b data 01)   
INFO[0000] out  [c5] REGISTER ACK  (reg 0x1b data 00)   
INFO[0000] in   [c5] REGISTER NTFY (reg 0x1c data 01)   
INFO[0000] out  [98] REGISTER ACK  (reg 0x1c data 00)   
INFO[0000] in   [a7] REGISTER NTFY (reg 0x10 data 01)   
INFO[0000] out  [a7] REGISTER ACK  (reg 0x10 data 00)
INFO[0000] in   [8c] REGISTER NTFY (reg 0x12 data 150c1515331e02) 
INFO[0000] out  [c8] REGISTER ACK  (reg 0x12 data 00)   

The only register being set is 0x05 I sniffed the following data, all with scheme disabled

     #Cool
     15 0c 15 15 33 1e 02 00       #10mins
     15 0c 15 15 35 15 02 00       #20mins
     15 0c 15 15 36 03 02 00       #30mins
     #Heat
     15 0c 15 15 30 32 02 00       #10mins
     15 0c 15 15 31 24 02 00       #20mins
     15 0c 15 15 32 15 02 00       #30mins
     #Windscreen
     15 0c 15 15 2e 11 02 00       #10mins
     15 0c 15 15 2f 14 02 00        #20mins
     15 0c 15 15 30 02 02 00       #30mins

#NOTE: The spaces between the values are added afterwards for readability.

0x12 returns the data being sent to 0x05, except for the last to zeroes. e.g. setting register 0x05 to 150c1515331e0200, returns 150c1515331e02 on 0x12 0x10 always returns 02, except when the AC state is off, then 01 0x1a always returns 0001, except when AC state is off, then 0000

0x1c returns the current state, a little bit different than other versions

  • 01 = Cool for 10 minutes
  • 11 = Cool for 20 minutes
  • 21 = Cool for 30 minutes
  • 02 = Heat for 10 minutes
  • 12 = Heat for 20 minutes
  • 22 = Heat for 30 minutes
  • 03 = Heat windscreen for 10 minutes
  • 13 = Heat windscreen for 20 minutes
  • 23 = Heat windscreen for 30 minutes

Now, I'm not really sure how to proceed now. According to the protocol documentation the function for 0x12 is timesync, My knowledge about hex programming is a bit limited, but could it be that the 0x05 values I sniffed using the app contain a timestamp? I already added the 0x1c states to the go files on my PC.

I added the PCAP files to this issue, figured they might be useful for further reference. Climate PCAP My14.zip

nvschilleman avatar Dec 22 '21 01:12 nvschilleman