phev-remote / phevcore Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
One of the features of the app is a button to cancel the charging timer. It's very useful on older models without the relevant button on the keyfob. If the car is configured to be charged at night, sometimes you do want to force it to be charged immediately, even during the day, and this is where this command is handy. Can this be added?
I've been trying to build phevcore for a while but without success.
The docker build fails, probably because the ubuntu:latest
tag is too new for some of the dependencies so I've been trying to build locally on an ubuntu box running focal.
Following the build instructions I get the following:
nicols@ha:~/git/ext/phevctl/phevcore/build$ make
Scanning dependencies of target phev
[ 12%] Building C object CMakeFiles/phev.dir/src/phev_register.c.o
/home/nicols/git/ext/phevctl/phevcore/src/phev_register.c:3:10: fatal error: logger.h: No such file or directory
3 | #include "logger.h"
| ^~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/phev.dir/build.make:63: CMakeFiles/phev.dir/src/phev_register.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/phev.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
Hi,
Would it be possible to get this project working via an Arduino sketch with the following device?
https://www.olimex.com/Products/IoT/ESP32/ESP32-POE-ISO/open-source-hardware
It has Wifi and POE so I'd like to have it hardwired to my network while it talks to the car via WiFi.
I've built a few Arduino projects so wouldn't mind giving it a go but I'm not familiar with Docker and how it relates to an Arduino project so thought i'd ask.
I am willing to invest time in porting this brilliant library to java. Will benefit automations that are coded in java. I run my java based automation hub on raspberry pi and I have a personal interest in adding support for PHEV to my hub so that I can simplify preheating routine (cancel charge schedule, start aircon, stop aircon, re-enable charge schedule) as the native app is utterly rubbish. Projects like https://www.openhab.org can they use the java port to add connectors.
I am an experienced java dev, but nearly zero in C. The library is simple enough though, so I don't think there will be major problems. I am sure I'll have some questions when I am stuck though, so if you are all interested at all, I'd appreciate some form of contact (email would be enough). If not - fair enough, I hope I can manage.
I'll start in my own repo, and then maybe you could create a repo under phev-remote.
Hello papawattu,
I am thinking About writing a simple app which uses the default direct iPhone WiFi connection to connect to my outlander 2014 and makes api calls to 192.168.8.46:8080 to get information using about the car. The next step would be to change settings of my car.
I’m massively under impressed by the quality of the old school official Mitsubishi app.
As you have built a kind of interface for the car, do you have experience sending api calls using http requests directly to the 192.168.8.46:8080 endpoint when connected to the cars wifi?
Any help would be appreciated,
Kind regards,
Léon van de Broek
Jamie, you are doing a fantastic job here. Many thanks for this. I was able to integrate the battery level in my openhab home automation which is fantastic. However, I noticed a few things:
I need to run phevctl battery
a couple of times to get the latest value. The first time I start it, it returns an old battery level.
Headlights and air-condition do not work for me. Most of the time I get a segmentation fault and even if it runs through, it sadly does not work.
RogerG
Hi all,
I have a 2020 PHEV and couldn't get it to register with the code as it stands. Is there anything you need me to do to contribute to the project, like perhaps capture some packets from a normal registration with the iPhone app ?
Cheers
Ellis
There looks to be a non breaking space (utf-8 c2a0) in src/phev_tcpip.c
# head -50 src/phev_tcpip.c | tail -1 | xxd
00000000: 2365 6c69 6620 6465 6669 6e65 6428 5f5f #elif defined(__
00000010: 6c69 6e75 785f 5f29 207c 7cc2 a064 6566 linux__) ||..def
00000020: 696e 6564 285f 5f75 6e69 785f 5f29 0d0a ined(__unix__)..
Which causes make to fail
# make
Scanning dependencies of target phev
[ 12%] Building C object CMakeFiles/phev.dir/src/phev_tcpip.c.o
/root/phevcore/src/phev_tcpip.c:50:28: error: token "▒" is not valid in preprocessor expressions
50 | #elif defined(__linux__) ||▒▒defined(__unix__)
| ^
/root/phevcore/src/phev_tcpip.c: In function ‘tcp_read’:
/root/phevcore/src/phev_tcpip.c:169:20: warning: implicit declaration of function ‘TCP_READ’ [-Wimplicit-function-declaration]
169 | int read_len = TCP_READ(soc, buffer, len);
| ^~~~~~~~
/root/phevcore/src/phev_tcpip.c: In function ‘phev_tcpClientConnectSocket’:
/root/phevcore/src/phev_tcpip.c:272:21: warning: implicit declaration of function ‘TCP_HTONS’ [-Wimplicit-function-declaration]
272 | addr.sin_port = TCP_HTONS(port);
| ^~~~~~~~~
/root/phevcore/src/phev_tcpip.c:277:16: warning: implicit declaration of function ‘TCP_SOCKET’; did you mean ‘SOL_SOCKET’? [-Wimplicit-function-declaration]
277 | int sock = TCP_SOCKET(AF_INET, SOCK_STREAM, 0);
| ^~~~~~~~~~
| SOL_SOCKET
/root/phevcore/src/phev_tcpip.c:285:15: warning: implicit declaration of function ‘TCP_CONNECT’ [-Wimplicit-function-declaration]
285 | int ret = TCP_CONNECT(sock, (struct sockaddr *)(&addr), sizeof(addr));
| ^~~~~~~~~~~
/root/phevcore/src/phev_tcpip.c: In function ‘phev_tcpClientWrite’:
/root/phevcore/src/phev_tcpip.c:334:15: warning: implicit declaration of function ‘TCP_WRITE’ [-Wimplicit-function-declaration]
334 | int num = TCP_WRITE(soc, buf, len);
| ^~~~~~~~~
make[2]: *** [CMakeFiles/phev.dir/build.make:128: CMakeFiles/phev.dir/src/phev_tcpip.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/phev.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
When changed back to a normal space this seems to be fine.
This is on a fresh install of Ubuntu 20.0, which has
# make -v
GNU Make 4.2.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Is it even possible to unlock the vehicle? Couldn't find any info on it.
I'm running phevctl on raspbian/raspberrypi 3 connected to car wifi.
I'm not able to register even though there is only 1 device registered
Can someone verify if they have connected to this vehicle software version 0.030.
/home/pi/bin/phev-remote/phevcore/src/phev.c:482:22: error: expected ‘;’ before ‘}’ token
return error == 3 // errACinfo. True if Door is Open or Main battery level is Low.
^
;
}
~
@vzakharcheko looks to be your change
I can't compile the source, there appears to be a missing ;
/src/phevcore/src/phev.c: In function 'phev_isACError':
/src/phevcore/src/phev.c:482:22: error: expected ';' before '}' token
return error == 3
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.