Do you have an raspberry pi running the emonPI software already up and running? If not, that’s the first step - follow the guides on this site.
If you do, all you need to do is logon to emonCMS (on your local raspberry pi) and click the setup menu, and “emonhub”.
Click the red “edit config” button and paste the below after the “[interfacers]” line on the screen.
### This interfacer manages communication to BMW API for electric car monitoring
[[BMWi3]]
Type = EmonHubBMWInterfacer
[[[init_settings]]]
timeinverval =600
duringchargetimeinterval=60
nodeid = 28
tempcredentialfile = /tmp/bmwcredentials.json
bmwapiusername = YOUREMAIL
bmwapipassword = YOURPASSWORD
[[[runtimesettings]]]
pubchannels = ToEmonCMS,
You need to change the email and password above, to match the username and password you use at the https://www.bmw-connecteddrive.co.uk website.
@stuart Cool! We have two i3 that I would like to get online, but they are hooked up to https://www.bmw-connecteddrive.de What do I need to do to get that to work? Thanks
No, I havn’t tried the current solution, just assumed it would not work for a “.de” connected-drive. We have two cars connected to the account, and the emonCMS config file doses not seem to have any parameter for selecting the car. Anyhow, guess it’s best to give it a go and see what happens
so if it doesn’t work, if you find the “EmonHubBMWInterfacer.py” file on your emonhub (PI) install and edit the URL at the top of the file to “.de” you might find it works!
We could always move that setting into the configuration file if you find it works for you. I don’t know whats going to happen as you have two cars on 1 account though - looking at the code it should pick the first one returned by the API
Stuart, tried to implement the mod, but alas; updating my raspberry Pi have all but bricked it Guess I have been unfaithful and not followed and updated my setup regularly and now have to pay the ultimate price. Will post back when I get things up running again
OK, up running again It’s not working straight off the bat, so I’m trying to locate the EmonHubBMWInterfacer.py file on my Pi. Do you have a hint as to where it is located?
I tried changing the url ending to “.de”, but that didn’t do it. I don’t get any inputs and I don’t see anything in the EmonHubLog. Will there be a log-file saved somewhere that I can use for debugging? There is no bmwcredentials.json file in the /tmp directory, so guess the interfacer is not starting
Got it up running now, fault 40 - sorry - had put the interfacer into the node area. Not sure if the “.de” change is required, I can test it out if you want to know? I have not had a close look at the input yet, but I assume they are for the first car, I’ll keep an eye on this to se if its consistent.
Actually I have it running on two RPi’s now, found a Pi3 in the drawer and decided to use that for experimenting. I have decide to keep them both running, then they can each monitor one of our two SMA Inverters. I do though have a problem getting the BT turned on on the Pi3 - seems it should work, but when I do the “sudo hciconfig hci0 up” it returns “Can’t get device info: no such device”