My Mitsubishi PHEV integration, via MQTT

Hi Neil, I had my password changed as well - Mitsubishi issued a service recall because the old password was supposed to be easy to hack.
From my experience, after that update, the wifi stays off until you pair at least one phone. Surely after they updated the password, they also reset the system so your phone isn’t paired anymore.

My advice is to try this:

  • On your phone go into app settings and wipe all cache and data from the Mitsubishi app
  • Get in the car, close the door, turn on hazard light, turn on ACC, press Lock-Unlock 5 times, you should get a single beep. After the beep, press Lock-Unlock another 5 times and you should hear another beep which would mean that a full reset was successful.
  • Turn off hazard lights and ACC, open and close the driver’s door, turn on ACC, press Lock-Unlock 5 times. Now your car wifi should show up and be ready for pairing which you should be able to cloplete from the app.

If you were already doing all of this then I can’t help you any more but it’s my strong feeling that the wifi simply stays off because there is no phones paired as it does in my car.

Best of luck!

Awesome work!

I’ve got a Phev -19 so this is really useful as the coverage of the phev’s AP is horrible on iPhones.
Have to stand next to the car for it to find what Apple calls “Legacy access point” (802.11b).

I found an old laptop which could reach the Phev’s access point even 50 meters away.
Took out the wireless NIC (intel 7265) along with the antenna cables.
Purchased a PCI-e adapter and installed the card on my ubuntu 20.04 server.

Running docker on this server with simply just HA official image and MQTT.

Then followed your installation guide on github.
I couldn’t get the Go compiler to work with the latest version, so I installed go1.19.linux-386.tar.gz instead which successfully built it.

Now that I know it’s working, I’ll probably build a docker image of this.

Unless you’re planning on publishing your own?
If so then I’d prefer using that in case you find new functions to add.

Again, thanks for your hard work!

I’ve now fiddled around with it some more and I noticed that the toggle/switch for climate sets it to “ON” but it doesn’t register the current state as “ON”. It goes back to “OFF” although the heat/cool does turn on.

Toggling it quickly sends the “OFF” payload.
Anyone got an idea why HA fails to see it as “ON”?

Thank you! This is great!
Using it on a MY19. I’m using a Raspberry PI 2b with two wifi interfaces, placed in between the router and the car.

Going to ask a real newbie question here - but does this have to run on a pi? or can i install this some way using just my home assistant that is running on a NUC?

It should run on anything that can establish Wifi with the car.

Thanks, so a real newbie here - but before i buy a pi, i noticed on my phone there is no wifi related to the car showing and i’m standing right beside it… obviously the car is off - but not sure if i’m missing anything. I checked bluetooth too, but until the car is actually on, i’m not seeing anything. I have not gone outside to check , but is it only going to display when the phev is actually charging?

It sounds like you need to set up the wireless feature on your car.

Lovely! It’s working on our MY20 after a few hurdles. A good use for one of my old RPi model 1s.
Silly question: after disabling the charge timer (to start it charging) how do I stop it charging?
The PHEV Disable Charge Timer doesn’t appear to act like a toggle switch.

I really like this integration. However, I’ve been fiddling with smoothing out the PHEV Battery (as it seems to get invalid values every now and then.

Using disable charge timer to start charging is something I haven’t yet tried; I’ve simply switched on/off the relay I have on the cable.

Anyone who is using disable charge timer:

  1. How do you use it? Do you have timer set to some strange values, that keep the car not charging whenever it is connected, and then you can manage the charging schedule in Home Assistant by toggiling disable charge timer?
  2. If car is not charging (and charge timer is not disabled), is it shown to be connected to the charge cable? At least when the car is fully charged, it may show it to be disconnected?
  3. other ideas for automation?
  4. other ideas for filtering/smoothing the sensors etc.?a

I was really excited to find this thread. Has anyone had any success using this with the new 2023 Outlander PHEV? I have my doubts it will work given the vehicle has had a total refresh.

What’s the model/ year of your car? If your car can be used with the Mitsubishi app. It should be working properly with these.

My HA is built on Pi. And this integration built on the same Pi ----- Working properly.

Hi,

I’m seeing sensible looking output in watch mode:

./phev2mqtt client watch
INFO[0000] %PHEV_TCP_CONNECTED%                         
INFO[0001] %PHEV_REG_UPDATE% 12:  -> 180308110f3805     
INFO[0001] %PHEV_REG_UPDATE% 13:  -> 00                 
INFO[0001] %PHEV_REG_UPDATE% 14:  -> 00000000000000     
INFO[0001] %PHEV_REG_UPDATE% 15:  -> 034a4d415844474733574b5a3030303436360002 
INFO[0001] %PHEV_REG_UPDATE% 15: [VIN: <redacted> Registrations: 2] 
INFO[0001] %PHEV_REG_UPDATE% 16:  -> 004106420603fe00   
INFO[0002] %PHEV_REG_UPDATE% 17:  -> 01                 
INFO[0002] %PHEV_REG_UPDATE% 18:  -> 00000000           
INFO[0003] %PHEV_REG_UPDATE% 1a:  -> 0000000000         
INFO[0003] %PHEV_REG_UPDATE% 1a: [AC off]               
INFO[0003] %PHEV_REG_UPDATE% 1b:  -> 11                 
INFO[0003] %PHEV_REG_UPDATE% 1c:  -> 02                 
INFO[0003] %PHEV_REG_UPDATE% 1c: [heat]                 
INFO[0003] %PHEV_REG_UPDATE% 1d:  -> 0c000003           
INFO[0003] %PHEV_REG_UPDATE% 1d: [Battery level: 12]    
INFO[0003] %PHEV_REG_UPDATE% 1e:  -> 0000               
INFO[0003] %PHEV_REG_UPDATE% 1e: [Charger disconnected] 
INFO[0003] %PHEV_REG_UPDATE% 1f:  -> 00ffff             
INFO[0003] %PHEV_REG_UPDATE% 1f: [Not charging]         
INFO[0003] %PHEV_REG_UPDATE% 21:  -> 00                 
INFO[0004] %PHEV_REG_UPDATE% 22:  -> 000000000000       
INFO[0004] %PHEV_REG_UPDATE% 23:  -> 0000000202         
INFO[0004] %PHEV_REG_UPDATE% 24:  -> 02000000000000000000 
INFO[0004] %PHEV_REG_UPDATE% 24: [Doors unlocked.]      
...

But when I run with mqqt, I get errors:

INFO[2024-03-08T17:21:51Z] %PHEV_TCP_CONNECTED%                         
DEBU[2024-03-08T17:21:51Z] %%PHEV_START_AWAIT%%                         
DEBU[2024-03-08T17:21:51Z] %PHEV_TCP_SEND_MSG%: [00] PING REQ      (id a) 
DEBU[2024-03-08T17:21:51Z] %PHEV_TCP_RECV_MSG%: [00] PING RESP     (id a) 
DEBU[2024-03-08T17:21:52Z] %PHEV_TCP_SEND_MSG%: [00] PING REQ      (id b) 
DEBU[2024-03-08T17:21:52Z] %PHEV_TCP_RECV_MSG%: [00] PING RESP     (id b) 
DEBU[2024-03-08T17:21:52Z] %PHEV_SEC_KEY_UPDATE% Updated security key   
DEBU[2024-03-08T17:21:52Z] %PHEV_TCP_RECV_MSG%: [00] START RECV18  (orig 5e0c000172b637c769158b6101fc) 
DEBU[2024-03-08T17:21:52Z] %%PHEV_START18_RECV%%                        
DEBU[2024-03-08T17:21:52Z] %%PHEV_START_DONE%%                          
DEBU[2024-03-08T17:21:52Z] %PHEV_TCP_SEND_MSG%: [00] START SEND18  (orig ) 
DEBU[2024-03-08T17:21:52Z] %PHEV_TCP_RECV_MSG%: [50] REGISTER NTFY (reg 0x07 data 00) 
DEBU[2024-03-08T17:21:52Z] %PHEV_TCP_SEND_MSG%: [50] REGISTER ACK  (reg 0x07 data 00) 
DEBU[2024-03-08T17:21:52Z] %PHEV_TCP_RECV_MSG%: [a1] REGISTER NTFY (reg 0x0b data 01) 
DEBU[2024-03-08T17:21:52Z] %PHEV_TCP_SEND_MSG%: [a1] REGISTER ACK  (reg 0x0b data 00) 
DEBU[2024-03-08T17:21:52Z] %PHEV_TCP_RECV_MSG%: [0b] REGISTER NTFY (reg 0x0c data 01) 
DEBU[2024-03-08T17:21:52Z] %PHEV_TCP_SEND_MSG%: [0b] REGISTER ACK  (reg 0x0c data 00) 
DEBU[2024-03-08T17:21:52Z] %PHEV_TCP_RECV_MSG%: [46] REGISTER NTFY (reg 0x0d data 01) 
DEBU[2024-03-08T17:21:52Z] %PHEV_TCP_SEND_MSG%: [46] REGISTER ACK  (reg 0x0d data 00) 
DEBU[2024-03-08T17:21:52Z] %PHEV_TCP_RECV_MSG%: [0e] REGISTER NTFY (reg 0x0f data 00) 
DEBU[2024-03-08T17:21:52Z] %PHEV_TCP_SEND_MSG%: [0e] REGISTER ACK  (reg 0x0f data 00) 
DEBU[2024-03-08T17:21:53Z] %PHEV_TCP_SEND_MSG%: [4a] PING REQ      (id c) 
DEBU[2024-03-08T17:21:53Z] %PHEV_TCP_SEND_MSG%: [4a] PING REQ      (id d) 
DEBU[2024-03-08T17:21:53Z] %PHEV_TCP_SEND_MSG%: [4a] PING REQ      (id e) 
DEBU[2024-03-08T17:21:53Z] %PHEV_TCP_RECV_MSG%: [4a] REGISTER NTFY (reg 0x10 data 000000) 
DEBU[2024-03-08T17:21:53Z] %PHEV_TCP_RECV_MSG%: [dc] REGISTER NTFY (reg 0x11 data 00) 
DEBU[2024-03-08T17:21:53Z] %PHEV_TCP_RECV_MSG%: [6c] PING RESP     (id c) 
DEBU[2024-03-08T17:21:53Z] %PHEV_TCP_SEND_MSG%: [4a] REGISTER ACK  (reg 0x10 data 00) 

Without debug I see occasional errors:

Bad sum for (8184de851a)
Bad sum for (8184de851aba8184d98525)
Bad sum for (84de851aba8184d98525)
Bad sum for (de851aba8184d98525)
Bad sum for (851aba8184d98525)
Bad sum for (1aba8184d98525)
Bad sum for (8184de851a)

At some point, a few values got published briefly to HA, but all sensors show unavailable since.

The network connection to the car isn’t amazing, but I don’t lose any pings.

I’ve tried on RPi (internal wifi), RPi (external USB wifi) and also on a separate NUC decive - same results each time.

Any ideas?

Thanks, Paul

MY18 Outlander

Hello everyone, I have an Outlander MY19 and when running ./phev2mqtt client watch I have exactly the same problem that PapaSierra82 described in post 74. ifconfig shows me the address 192.168.8.47 and I can ping it. Registering the car was acknowledged with Success. I tried unsuccessfully to place the rPi closer to the Outlander, to use an older version (as suggested by BunpGhost in post 75) and even changed the default address of the client.go file in the client folder to 192.168.8.47:8080 using the WinSCP editor. Has anyone had success fixing this problem? Any advice would be greatly appreciated.

Has anyone considered an ESP32 to talk to the car over Wifi and then speak to HA using bluetooth? We could then mount the ESP32 somewhere in the car…

is this still working for new Mitsunishi ?

Hi Paul,
Fantastic news .I also own a MY20 Exceed PHEV in australia.
Would you able to share your config file from the ESP32 that your using to connect to the car.
I have to work out what my password is but I have that working on a old phone with the mitshubishi app.

Have some other questions
How have you found the battery level readings, Are they realistic?

Hi,

Having serious problems building the files on a raspberry pi. Getting all sorts of errors on the go compiler but the latest is: go build github.com/buxtronix/phev2mqtt: copying /tmp/go-build3243637644/b001/exe/a.out: open phev2mqtt: permission denied

OR if i run it as root:

github.com/google/gopacket/pcap

/root/go/pkg/mod/github.com/google/[email protected]/pcap/pcap.go:30:22: undefined: pcapErrorNotActivated
/root/go/pkg/mod/github.com/google/[email protected]/pcap/pcap.go:52:17: undefined: pcapTPtr
/root/go/pkg/mod/github.com/google/[email protected]/pcap/pcap.go:64:10: undefined: pcapPkthdr
/root/go/pkg/mod/github.com/google/[email protected]/pcap/pcap.go:103:6: undefined: pcapBpfProgram
/root/go/pkg/mod/github.com/google/[email protected]/pcap/pcap.go:110:7: undefined: pcapPkthdr
/root/go/pkg/mod/github.com/google/[email protected]/pcap/pcap.go:268:33: undefined: pcapErrorActivated
/root/go/pkg/mod/github.com/google/[email protected]/pcap/pcap.go:269:33: undefined: pcapWarningPromisc
/root/go/pkg/mod/github.com/google/[email protected]/pcap/pcap.go:270:33: undefined: pcapErrorNoSuchDevic e
/root/go/pkg/mod/github.com/google/[email protected]/pcap/pcap.go:271:33: undefined: pcapErrorDenied
/root/go/pkg/mod/github.com/google/[email protected]/pcap/pcap.go:272:33: undefined: pcapErrorNotUp
/root/go/pkg/mod/github.com/google/[email protected]/pcap/pcap.go:272:33: too many errors

Any hints?

Ok, actually got through this. Has a working setup now! I needed to use go 1.1.19 and run it as root. Used the same MAC adress as my phones and somehow it started :wink: