phev2mqtt
phev2mqtt copied to clipboard
Climate support for My14
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
Hi, all, nice Library, much faster than the original. I have tired with My2015 and got similar issue with acmode:
INFO[0000] %PHEV_TCP_CONNECTED% INFO[0254] Topic: [phev/set/climate/heat] Payload: [10] INFO[0264] Error setting register 0x1b: timed out attempting to set register 1b ERRO[0280] Disconnecting due to too many errors
Setting headlights is working and superfast.
**
So far i was not able to set heating with the this library: (https://github.com/phev-remote/phevctl) neither
Same here, everything works fast except setting the climate which does not work at all.
I did not make any progress unfortunately, according to the PCAP files I generated only register 0x05 is being set when activating the climate control using the Mitsubishi app, but the register data seems to contain some sort of timestring as the data differs everytime.
The same for me in my PHEV'14 Keep getting:
INFO[5323] %PHEV_TCP_CONNECTED%
INFO[5329] Error setting register 0x1b: timed out attempting to set register 1b
INFO[5332] Topic: [phev/set/climate/heat] Payload: [on]
INFO[5342] Error setting register 0x1b: timed out attempting to set register 1b
Would love to see this working. How can I help?
@nvschilleman I've looked at you pcap using the current master and can see, that the app is sending register 0x02 to the car with the following payload:
0400f47ffd01 01 9ffeffff07efff1f cool10
0400f47ffd01 11 9ffeffff07efff1f cool20
0400f47ffd01 21 9ffeffff07efff1f cool30
0400f47ffd01 03 9ffeffff07efff1f ws10
0400f47ffd01 13 9ffeffff07efff1f ws20
0400f47ffd01 23 9ffeffff07efff1f ws30
0400f47ffd01 02 9ffeffff07efff1f heat10
0400f47ffd01 12 9ffeffff07efff1f heat20
0400f47ffd01 22 9ffeffff07efff1f heat30
The payload differs only at byte 7 with the higher nibble beeing the duration (0=10min 1=20min 3=30min) and the lower nibble beeing the type (1=cool 2=heat 3=ws).
Register 0x05 is used to sync the clock - so the values you see are the current date and time.
The payload seems to be a combination of register 0x22 and 0x19:
# phev2mqtt decode pcap heat30 2>&1 | grep "f47f"
in [7e] REGISTER NTFY (reg 0x22 data 0400f47ffd01)
out [dd] REGISTER SET (reg 0x02 data 0400f47ffd01229ffeffff07efff1f)
# phev2mqtt decode pcap heat30 2>&1 | grep "9ffe"
in [dc] REGISTER NTFY (reg 0x19 data 029ffeffff07efff1f)
out [dd] REGISTER SET (reg 0x02 data 0400f47ffd01229ffeffff07efff1f)
Also the first by of register 0x19 seems to contain the current climate state.
Is this issue still relevant for the latest master?
Is this issue still relevant for the latest
master?
I believe you fixed it! I am able to control the climate in my MY14!
I believe you fixed it! I am able to control the climate in my MY14!
Nice! @nvschilleman any changes for you as well?
Thanks for following up! I would need to check. When I have some spare time I'll try and keep you posted!