Speak EV - Electric Car Forums banner

1 - 6 of 6 Posts

·
Registered
Joined
·
3,122 Posts
Discussion Starter #1
Managed to get this to work in a simplistic fashion now! It runs on my Raspberry Pi, but I think should run on any Linux box.
You can grab the zip file of the compiled Python here. Download it and extract it to somewhere like your home directory.

You will need to install the chromedriver add-on, using:

sudo apt-get install chromium-chromedriver

No Python installation or other libraries should be required but you will need to chmod +x CheckOrderStatus before running this file. It will ask you to enter your order number (or simply copy and paste the whole order number URL in), the email address to send updates to, your Polestar login and your Polestar password.

I promise you none of the confidential information goes anywhere! Anyone who would like to is welcome to peruse the source code here to confirm this (though that file has different checking and email frequency but is otherwise identical). To be honest I don't want anyone's details in any case (none of my business).

The emails are sent via a Gmail account I set up specially; please don't try to reverse engineer the software to get the login details as that's just a bit rude.

At the moment, you will get a first email that says something like this:

Order ID: 12345678 instead of None
Estimated Delivery: December instead of None
Confirmed delivery time: - instead of None
Vehicle registration number: - instead of None
Polestar ID: [email protected] instead of None
VIN: - instead of None

Subsequently it will check every so often (I think I set it to an hour) and email you immediately if it spots a change to the above fields. It will also email you every 12 hours (I think) to confirm that there's no change.

You can watch it working as it opens a Chrome/ium instance on your Pi desktop, does the login and goes to the order page and you can see it doing this in real time. However this will be really annoying if you're trying to use the computer at the time, so I'm going to try and move it to a headless web browser (i.e. one that opens in secret without a window on the screen, but goes through the motions).

It will be tricky for me to spot any further changes down the page as the description text might change and I don't know what it will read yet! But I might add a "Something changed on the web page but I'm not sure what" email as that should cover it, although it may well cause false alerts/excitement if something behind the scenes in the web page structure changes.

I can also make a version for Windows but not many people leave Windows machines running all day and night, hence getting it running on a Pi. You could even run it on a £10 Raspberry Pi Zero and have it just chugging away in the background, watching for you :).

All feedback welcome but remember I'm just doing this for a bit of fun and pass the evenings while waiting for my car to arrive!
 

·
Registered
Joined
·
3,122 Posts
Discussion Starter #3
134728


Install Python, install the chromedriver, pip install selenium parse, run the code... 😎
 

·
Registered
Joined
·
3,122 Posts
Discussion Starter #5
😁It's all special code talk to keep us software engineers in business so that we don't get every Tom, Dick and Harry writing software ;)
 
1 - 6 of 6 Posts
Top