Securing your blog - fast and easy

After the last couple of posts a few people asked me why my blog site is still HTTP-only? Why did I not secure my page and contribute my little bit to normalizing encrypted traffic on the Internet and all that good jazz?

And the answer was - I was lazy and thought that it was complicated.

I could not have been more wrong :D However the key here is not to follow the official guides. In fact doing things the Debian way turned out to be far simpler and straight forward.

If you want to get a free SSL certificate and setup your site correctly, you will likely eventually get to this page and it will then you instrct you to install snap and pull a snap package of certbot. Well, no. I will not be doing that, thank you very much. I have a perfectly functional Debian packaing system right here and I do not want to pollute my system with multiple package managers and updaters. No snap, no flatpack. I am fine with Docker because those are containers, they are not in my system, they run in separated systems above my system.

Turns out all of that was way more complicated than necessary, anyway.

Debian Buster contains a perfectly functional package of certbot and it is fully integrated too!

All I had at the start was my domain configured on HTTP in nginx.

All I did was:

# apt install certbot python3-certbot-nginx
# certbot run

It asked me a few questions about me, which domain to work on (of the configured nginx domains that it automatically found) and then just automagically got the certificates, deployed them and configured nginx to enable HTTPS using those new certificates. As an extra it also asked me if I wanted to redirect all HTTP traffic to HTTPS and that was it. I was done. No extra steps, no config files edited, no complex command lines and no extra package managers installed on my system.

10/10 would recommend!

Edit: it looks like the certbot handled the "aigarius.com" domain perfectly, but missed the redirects from "www.aigarius.com", so I'd have to fix those up manually by just copying the directive that certbot added to nginx config file for "aigarius.com" and editing the domain name.

Ryzen 7000 amdgpu boot hang

So you decided to build a brand new system using all the latest and coolest tech, so you buy a Ryzen 7000 series Zen 4 CPU, like the Ryzen 7700X that I picked, with a new mother board and DDR5 memory and all that jazz. But for now, you don't yet have a fitting GPU for that system (as the new ones will only come out in November), so you are booting a Debian system using the new build-in video card of the new CPUs (Zen 4 generation has a simple AMD GPU build-in into every CPU now - great stuff for debugging and mostly-headless systems) and you get ... nothing on the screen. Hmm. You boot into the rescue mode and the kernel message stop after:

Oct 16 13:31:25 home kernel: [    4.128328] amdgpu: Ignoring ACPI CRAT on non-APU system
Oct 16 13:31:25 home kernel: [    4.128329] amdgpu: Virtual CRAT table created for CPU
Oct 16 13:31:25 home kernel: [    4.128332] amdgpu: Topology: Add CPU node

That looks bad, right?

Well, if you either ssh into the machine or reboot with module_blacklist=amdgpu in the kernel command line you will find in /var/log/kern.log.1 those messages and also the following messages that will clarify the situation a bit:

Oct 16 13:31:25 home kernel: [    4.129352] amdgpu 0000:10:00.0: firmware: failed to load amdgpu/psp_13_0_5_toc.bin (-2)
Oct 16 13:31:25 home kernel: [    4.129354] firmware_class: See https://wiki.debian.org/Firmware for information about missing firmware
Oct 16 13:31:25 home kernel: [    4.129358] amdgpu 0000:10:00.0: firmware: failed to load amdgpu/psp_13_0_5_toc.bin (-2)
Oct 16 13:31:25 home kernel: [    4.129359] amdgpu 0000:10:00.0: Direct firmware load for amdgpu/psp_13_0_5_toc.bin failed with error -2
Oct 16 13:31:25 home kernel: [    4.129360] amdgpu 0000:10:00.0: amdgpu: fail to request/validate toc microcode
Oct 16 13:31:25 home kernel: [    4.129361] [drm:psp_sw_init [amdgpu]] *ERROR* Failed to load psp firmware!
Oct 16 13:31:25 home kernel: [    4.129432] [drm:amdgpu_device_init.cold [amdgpu]] *ERROR* sw_init of IP block <psp> failed -2
Oct 16 13:31:25 home kernel: [    4.129525] amdgpu 0000:10:00.0: amdgpu: amdgpu_device_ip_init failed
Oct 16 13:31:25 home kernel: [    4.129526] amdgpu 0000:10:00.0: amdgpu: Fatal error during GPU init
Oct 16 13:31:25 home kernel: [    4.129527] amdgpu 0000:10:00.0: amdgpu: amdgpu: finishing device.
Oct 16 13:31:25 home kernel: [    4.129633] amdgpu: probe of 0000:10:00.0 failed with error -2

So what you need is to get a new set of Linux Kernel Firmware blobs and upack that in /lib/firmware. The tarball from 2022-10-12 worked well for me.

After that you also need to re-create the initramfs with update-initramfs -k all -c to include the new firmware. Having kernel version 5.18 or newer is also required for stable Zen 4 support. It might be that a fresh Mesa version is also of importance, but as I am running sid on this machine I can only say that Mesa 22.2.1 that is in sid works fine.

Debconf 22 photos

Finally after a long break, the in-person Debconf is a thing again, this time Debconf 22 is happening in Prizren, Kosovo.

And it has been my pleasure to again be here and take lots of pictures of the event and of the surroundings.

The photos can be found in this Google Photo shared album and also on this git-lfs share.

But the main photographic delight, as always is the DebConf 22 Group Photo. And here it is!!!

DebConf 22 Group photo small

You can also see it in:

Long travel in an electric car

Since the first week of April 2022 I have (finally!) changed my company car from a plug-in hybrid to a fully electic car. My new ride, for the next two years, is a BMW i4 M50 in Aventurine Red metallic. An ellegant car with very deep and memorable color, insanely powerful (544 hp/795 Nm), sub-4 second 0-100 km/h, large 84 kWh battery (80 kWh usable), charging up to 210 kW, top speed of 225 km/h and also very efficient (which came out best in this trip) with WLTP range of 510 km and EVDB real range of 435 km. The car also has performance tyres (Hankook Ventus S1 evo3 245/45R18 100Y XL in front and 255/45R18 103Y XL in rear all at recommended 2.5 bar) that have reduced efficiency.

So I wanted to document and describe how was it for me to travel ~2000 km (one way) with this, electric, car from south of Germany to north of Latvia. I have done this trip many times before since I live in Germany now and travel back to my relatives in Latvia 1-2 times per year. This was the first time I made this trip in an electric car. And as this trip includes both travelling in Germany (where BEV infrastructure is best in the world) and across Eastern/Northen Europe, I believe that this can be interesting to a few people out there.

Normally when I travelled this trip with a gasoline/diesel car I would normally drive for two days with an intermediate stop somewhere around Warsaw with about 12 hours of travel time in each day. This would normally include a couple bathroom stops in each day, at least one longer lunch stop and 3-4 refueling stops on top of that. Normally this would use at least 6 liters of fuel per 100 km on average with total usage of about 270 liters for the whole trip (or about 540€ just in fuel costs, nowadays). My (personal) quirk is that both fuel and recharging of my (business) car inside Germany is actually paid by my employer, so it is useful for me to charge up (or fill up) at the last station in Gemany before driving on.

The plan for this trip was made in a similar way as when travelling with a gasoline car: travelling as fast as possible on German Autobahn network to last chargin stop on the A4 near Görlitz, there charging up as much as reasonable and then travelling to a hotel in Warsaw, charging there overnight and travelling north towards Ionity chargers in Lithuania from where reaching the final target in north of Latvia should be possible. How did this plan meet the reality?

Travelling inside Germany with an electric car was basically perfect. The most efficient way would involve driving fast and hard with top speed of even 180 km/h (where possible due to speed limits and traffic). BMW i4 is very efficient at high speeds with consumption maxing out at 28 kWh/100km when you actually drive at this speed all the time. In real situation in this trip we saw consumption of 20.8-22.2 kWh/100km in the first legs of the trip. The more traffic there is, the more speed limits and roadworks, the lower is the average speed and also the lower the consumption. With this kind of consumption we could comfortably drive 2 hours as fast as we could and then pick any fast charger along the route and in 26 minutes at a charger (50 kWh charged total) we'd be ready to drive for another 2 hours. This lines up very well with recommended rest stops for biological reasons (bathroom, water or coffee, a bit of movement to get blood circulating) and very close to what I had to do anyway with a gasoline car. With a gasoline car I had to refuel first, then park, then go to bathroom and so on. With an electric car I can do all of that while the car is charging and in the end the total time for a stop is very similar. Also not that there was a crazy heat wave going on and temperature outside was at about 34C minimum the whole day and hitting 40C at one point of the trip, so a lot of power was used for cooling. The car has a heat pump standard, but it still was working hard to keep us cool in the sun.

The car was able to plan a charging route with all the charging stops required and had all the good options (like multiple intermediate stops) that many other cars (hi Tesla) and mobile apps (hi Google and Apple) do not have yet. There are a couple bugs with charging route and display of current route guidance, those are already fixed and will be delivered with over the air update with July 2022 update. Another good alterantive is the ABRP (A Better Route Planner) that was specifically designed for electric car routing along the best route for charging. Most phone apps (like Google Maps) have no idea about your specific electric car - it has no idea about the battery capacity, charging curve and is missing key live data as well - what is the current consumption and remaining energy in the battery. ABRP is different - it has data and profiles for almost all electric cars and can also be linked to live vehicle data, either via a OBD dongle or via a new Tronity cloud service. Tronity reads data from vehicle-specific cloud service, such as MyBMW service, saves it, tracks history and also re-transmits it to ABRP for live navigation planning. ABRP allows for options and settings that no car or app offers, for example, saying that you want to stop at a particular place for an hour or until battery is charged to 90%, or saying that you have specific charging cards and would only want to stop at chargers that support those. Both the car and the ABRP also support alternate routes even with multiple intermediate stops. In comparison, route planning by Google Maps or Apple Maps or Waze or even Tesla does not really come close.

After charging up in the last German fast charger, a more interesting part of the trip started. In Poland the density of high performance chargers (HPC) is much lower than in Germany. There are many chargers (west of Warsaw), but vast majority of them are (relatively) slow 50kW chargers. And that is a difference between putting 50kWh into the car in 23-26 minutes or in 60 minutes. It does not seem too much, but the key bit here is that for 20 minutes there is easy to find stuff that should be done anyway, but after that you are done and you are just waiting for the car and if that takes 4 more minutes or 40 more minutes is a big, perceptual, difference. So using HPC is much, much preferable. So we put in the Ionity charger near Lodz as our intermediate target and the car suggested an intermediate stop at a Greenway charger by Katy Wroclawskie. The location is a bit weird - it has 4 charging stations with 150 kW each. The weird bits are that each station has two CCS connectors, but only one parking place (and the connectors share power, so if two cars were to connect, each would get half power). Also from the front of the location one can only see two stations, the otehr two are semi-hidden around a corner. We actually missed them on the way to Latvia and one person actually waited for the charger behind us for about 10 minutes. We only discovered the other two stations on the way back. With slower speeds in Poland the consumption goes down to 18 kWh/100km which translates to now up to 3 hours driving between stops.

At the end of the first day we drove istarting from Ulm from 9:30 in the morning until about 23:00 in the evening with total distance of about 1100 km, 5 charging stops, starting with 92% battery, charging for 26 min (50 kWh), 33 min (57 kWh + lunch), 17 min (23 kWh), 12 min (17 kWh) and 13 min (37 kW). In the last two chargers you can see the difference between a good and fast 150 kW charger at high battery charge level and a really fast Ionity charger at low battery charge level, which makes charging faster still.

Arriving to hotel with 23% of battery. Overnight the car charged from a Porsche Destination Charger to 87% (57 kWh). That was a bit less than I would expect from a full power 11kW charger, but good enough. Hotels should really install 11kW Type2 chargers for their guests, it is a really significant bonus that drives more clients to you.

The road between Warsaw and Kaunas is the most difficult part of the trip for both driving itself and also for charging. For driving the problem is that there will be a new highway going from Warsaw to Lithuanian border, but it is actually not fully ready yet. So parts of the way one drives on the new, great and wide highway and parts of the way one drives on temporary roads or on old single lane undivided roads. And the most annoying part is navigating between parts as signs are not always clear and the maps are either too old or too new. Some maps do not have the new roads and others have on the roads that have not been actually build or opened to traffic yet. It's really easy to loose ones way and take a significant detour. As far as charging goes, basically there is only the slow 50 kW chargers between Warsaw and Kaunas (for now). We chose to charge on the last charger in Poland, by Suwalki Kaufland. That was not a good idea - there is only one 50 kW CCS and many people decide the same, so there can be a wait. We had to wait 17 minutes before we could charge for 30 more minutes just to get 18 kWh into the battery. Not the best use of time. On the way back we chose a different charger in Lomza where would have a relaxed dinner while the car was charging. That was far more relaxing and a better use of time.

We also tried charging at an Orlen charger that was not recommended by our car and we found out why. Unlike all other chargers during our entire trip, this charger did not accept our universal BMW Charging RFID card. Instead it demanded that we download their own Orlen app and register there. The app is only available in some countries (and not in others) and on iPhone it is only available in Polish. That is a bad exception to the rule and a bad example. This is also how most charging works in USA. Here in Europe that is not normal. The normal is to use a charging card - either provided from the car maker or from another supplier (like PlugSufring or Maingau Energy). The providers then make roaming arrangements with all the charging networks, so the cards just work everywhere. In the end the user gets the prices and the bills from their card provider as a single monthly bill. This also saves all any credit card charges for the user. Having a clear, separate RFID card also means that one can easily choose how to pay for each charging session. For example, I have a corporate RFID card that my company pays for (for charging in Germany) and a private BMW Charging card that I am paying myself for (for charging abroad). Having the car itself authenticate direct with the charger (like Tesla does) removes the option to choose how to pay. Having each charge network have to use their own app or token bring too much chaos and takes too much setup. The optimum is having one card that works everywhere and having the option to have additional card or cards for specific purposes.

Reaching Ionity chargers in Lithuania is again a breath of fresh air - 20-24 minutes to charge 50 kWh is as expected. One can charge on the first Ionity just enough to reach the next one and then on the second charger one can charge up enough to either reach the Ionity charger in Adazi or the final target in Latvia. There is a huge number of CSDD (Road Traffic and Safety Directorate) managed chargers all over Latvia, but they are 50 kW chargers. Good enough for local travel, but not great for long distance trips. BMW i4 charges at over 50 kW on a HPC even at over 90% battery state of charge (SoC). This means that it is always faster to charge up in a HPC than in a 50 kW charger, if that is at all possible. We also tested the CSDD chargers - they worked without any issues. One could pay with the BMW Charging RFID card, one could use the CSDD e-mobi app or token and one could also use Mobilly - an app that you can use in Latvia for everything from parking to public transport tickets or museums or car washes.

We managed to reach our final destination near Aluksne with 17% range remaining after just 3 charging stops: 17+30 min (18 kWh), 24 min (48 kWh), 28 min (36 kWh). Last stop we charged to 90% which took a few extra minutes that would have been optimal.

For travel around in Latvia we were charging at our target farmhouse from a normal 3 kW Schuko EU socket. That is very slow. We charged for 33 hours and went from 17% to 94%, so not really full. That was perfectly fine for our purposes. We easily reached Riga, drove to the sea and then back to Aluksne with 8% still in reserve and started charging again for the next trip. If it were required to drive around more and charge faster, we could have used the normal 3-phase 440V connection in the farmhouse to have a red CEE 16A plug installed (same as people use for welders). BMW i4 comes standard with a new BMW Flexible Fast Charger that has changable socket adapters. It comes by default with a Schucko connector in Europe, but for 90€ one can buy an adapter for blue CEE plug (3.7 kW) or red CEE 16A or 32A plugs (11 kW). Some public charging stations in France actually use the blue CEE plugs instead of more common Type2 electric car charging stations. The CEE plugs are also common in camping parking places.

On the way back the long distance BEV travel was already well understood and did not cause us any problem. From our destination we could easily reach the first Ionity in Lithuania, on the Panevezhis bypass road where in just 8 minutes we got 19 kWh and were ready to drive on to Kaunas, there a longer 32 minute stop before the charging desert of Suwalki Gap that gave us 52 kWh to 90%. That brought us to a shopping mall in Lomzha where we had some food and charged up 39 kWh in lazy 50 minutes. That was enough to bring us to our return hotel for the night - Hotel 500W in Strykow by Lodz that has a 50kW charger on site, while we were having late dinner and preparing for sleep, the car easily recharged to full (71 kWh in 95 minutes), so I just moved it from charger to a parking spot just before going to sleep. Really easy and well flowing day.

Second day back went even better as we just needed an 18 minute stop at the same Katy Wroclawskie charger as before to get 22 kWh and that was enough to get back to Germany. After that we were again flying on the Autobahn and charging as needed, 15 min (31 kWh), 23 min (48 kWh) and 31 min (54 kWh + food). We started the day on about 9:40 and were home at 21:40 after driving just over 1000 km on that day. So less than 12 hours for 1000 km travelled, including all charging, bio stops, food and some traffic jams as well. Not bad.

Now let's take a look at all the apps and data connections that a technically minded customer can have for their car. Architecturally the car is a network of computers by itself, but it is very secured and normally people do not have any direct access. However, once you log in into the car with your BMW account the car gets your profile info and preferences (seat settings, navigation favorites, ...) and the car then also can start sending information to the BMW backend about its status. This information is then available to the user over multiple different channels. There is no separate channel for each of those data flow. The data only goes once to the backend and then all other communication of apps happens with the backend.

First of all the MyBMW app. This is the go-to for everything about the car - seeing its current status and location (when not driving), sending commands to the car (lock, unlock, flash lights, pre-condition, ...) and also monitor and control charging processes. You can also plan a route or destination in the app in advance and then just send it over to the car so it already knows where to drive to when you get to the car. This can also integrate with calendar entries, if you have locations for appointments, for example. This also shows full charging history and allows a very easy export of that data, here I exported all charging sessions from June and then trimmed it back to only sessions relevant to the trip and cut off some design elements to have the data more visible. So one can very easily see when and where we were charging, how much power we got at each spot and (if you set prices for locations) can even show costs.

I've already mentioned the Tronity service and its ABRP integration, but it also saves the information that it gets from the car and gathers that data over time. It has nice aspects, like showing the driven routes on a map, having ways to do business trip accounting and having good calendar view. Sadly it does not correctly capture the data for charging sessions (the amounts are incorrect).

Update: after talking to Tronity support, it looks like the bug was in the incorrect value for the usable battery capacity for my car. They will look into getting th eright values there by default, but as a workaround one can edit their car in their system (after at least one charging session) and directly set the expected battery capacity (usable) in the car properties on the Tronity web portal settings.

One other fun way to see data from your BMW is using the BMW integration in Home Assistant. This brings the car as a device in your own smart home. You can read all the variables from the car current status (and Home Asisstant makes cute historical charts) and you can even see interesting trends, for example for remaining range shows much higher value in Latvia as its prediction is adapted to Latvian road speeds and during the trip it adapts to Polish and then to German road speeds and thus to higher consumption and thus lower maximum predicted remaining range. Having the car attached to the Home Assistant also allows you to attach the car to automations, both as data and event source (like detecting when car enters the "Home" zone) and also as target, so you could flash car lights or even unlock or lock it when certain conditions are met.

So, what in the end was the most important thing - cost of the trip? In total we charged up 863 kWh, so that would normally cost one about 290€, which is close to half what this trip would have costed with a gasoline car. Out of that 279 kWh in Germany (paid by my employer) and 154 kWh in the farmhouse (paid by our wonderful relatives :D) so in the end the charging that I actually need to pay adds up to 430 kWh or about 150€. Typically, it took about 400€ in fuel that I had to pay to get to Latvia and back. The difference is really nice!

In the end I believe that there are three different ways of charging:

  • incidental charging - this is wast majority of charging in the normal day-to-day life. The car gets charged when and where it is convinient to do so along the way. If we go to a movie or a shop and there is a chance to leave the car at a charger, then it can charge up. Works really well, does not take extra time for charging from us.

  • fast charging - charging up at a HPC during optimal charging conditions - from relatively low level to no more than 70-80% while you are still doing all the normal things one would do in a quick stop in a long travel process: bio things, cleaning the windscreen, getting a coffee or a snack.

  • necessary charging - charging from a whatever charger is available just enough to be able to reach the next destination or the next fast charger.

The last category is the only one that is really annoying and should be avoided at all costs. Even by shifting your plans so that you find something else useful to do while necessary charging is happening and thus, at least partially, shifting it over to incidental charging category. Then you are no longer just waiting for the car, you are doing something else and the car magically is charged up again.

And when one does that, then travelling with an electric car becomes no more annoying than travelling with a gasoline car. Having more breaks in a trip is a good thing and makes the trips actually easier and less stressfull - I was more relaxed during and after this trip than during previous trips. Having the car air conditioning always be on, even when stopped, was a godsend in the insane heat wave of 30C-38C that we were driving trough.

Final stats: 4425 km driven in the trip. Average consumption: 18.7 kWh/100km. Time driving: 2 days and 3 hours. Car regened 152 kWh. Charging stations recharged 863 kWh.

Questions? You can use this i4talk forum thread or this Twitter thread to ask them to me.

Keeping it as simple as possible

You know that you've had the same server too long when they discontinue the entire class of servers you were using and you need to migrate to a new instance. And you know you've not done anything with that server (and the blog running on it) for too long when you have no idea how that thing is actually working.

Its a good opportunity to start over from scratch, and a good motivation to the new thing as simply as humanly possible, or even simpler.

So I am switching to a statically generated blog as well. Not sure what took me so long, but thank good the tooling has really improved since the last time I looked.

It was as simple as picking Nikola, finding its import_feed plugin, changing the BLOG_RSS_LIMIT in my Django Mezzanine blog to a thousand (to export all posts via RSS/ATOM feed), fixing some bugs in the import_feed plugin, waiting a few minutes for the full feed to generate and to be imported, adjusting the config of the resulting site, posting that to git and writing a simple shell script to pull that repo periodically and call nikola build on it, as well as config to serve ther result via ngnix. Done.

After that creating a new blog post is just nikola new_post and editing it in vim and pushing to git. I prefer Markdown, but it supports all kinds of formats. And the old posts are just stored as HTML. Really simple.

I think I will spend more time fighting with Google to allow me to forward email from my domain to my GMail postbox without it refusing all of it as spam.

Debconf 19 photos

The main feed for my photos from Debconf 19 in Curitiba, Brazil is currently in my GPhoto album. I will later also sync it to Debconf git share.

The first batch is up, but now the hardest part comes - the group photo will be happening a bit later today :)

Update: the group photo is ready! The smaller version is in the GPhoto album, but full version is linked from DebConf/19/Photos

Update 2: The day trip phtos are up and also the photos are in Debconf Git LFS share.

Automation of embedded development

I am wondering if there is a standard solution to a problem that I am facing. Say you are developing an embedded Debian Linux device. You want to have a "test farm" - a bunch of copies of your target hardware running a lot of tests, while the development is ongoing. For this to work automatically, your automation setup needs to have a way to fully re-flash the device, even if the image previously flashed to it does not boot. How would that be usually achieved?

I'd imagine some sort of option in the initial bootloader that would look at some hardware switch (that your test host could trip programmatically) and if that is set, then boot into a very minimal and very stable "emergency" Linux system, then you could ssh into that, mount the target partitions and rewrite their contents with the new image to be tested.

Are there ready-made solutions that do such a thing? Generically or even just for some specific development boards? Do people solve this problem in a completely different way? Was unable to find any good info online.

BMW 330e first 20 000 km review

So, just to start this thing off - I am quite biased in the regards of this car as I am now working for BMW for a year and this is my company car. Also I have not had the pleasure of testing its direct competition. But I still wanted to share my experiences with this rather special product. I have now driven 20 000 km in this car, so it is time for a first review.

Before this car I only had one other - a sweet 2013 Mercedes C 180D that I traveled around the Europe in and that made me start to appreciate cars and made me seriously consider applying for a job at BMW when they sponsored Debconf 15 in Germany. It was a comfortable high quality car with enough power and a whole lot of tech toys.

After 6 months working at BMW it was time for me to choose a company car (and sell my old car). It is not mandatory, but the value in this proposition is very significant and you'd be missing out a lot by not taking that. So I started looking at the BWM website and selecting a car for myself.

I am a big fan of electric cars. I love Tesla and everything that Elon Musk is doing to the car and energy markets. Unfortunately the Model S was out of my price range and Model 3 is still not there yet. BWM also has a few full and partial electrified options, but the selection is rather limited so far. i8 is outside my price range and rather unpractical. i3 was a serious contender, but I am not a fan of its looks that scream "I am an electric car!" and the charging infrastructure was not yet there to allow me to drive from Germany to Latvia easily. And that was one of the goals that my new car would have to be able to do. I was also very interested in travelling all over the Alps on weekends and having to stop at a charger for an hour every couple hours would really limit the places that one could feasibly visit in a day or two and still return home. Even with the battery upgrade (announced after I already made my order) and range extended the i3 is not really fun to drive on highways.

So the selection really was between BMW 225xe and BMW 330e. These cars basically have very similar powertrains - the 87hp electric motor is combined with either a 134hp (225xe) or 182hp (330e) gasoline engine and both have a small 7.7 kWh battery that realistically is enough for around 20 km. After trying the BMW 225xe Active Tourer, I decided for the 330e - I did not feel too comfortable in the higher seating position. It was safe and stable, but at highway speeds I had the feeling that the face of the car was really working hard to push the air out of the way.

It took 4 months from the order to delivery of my 330e - they are very, very popular. BMW can't make enough of them to satisfy demand.

Despite my screwup in the ordering (I managed to miss ticking the tech package, so no HUD for me), I was floored by the car as soon as I got in and then again when I first got on the autobahn with it.The car is amazing. It has its weaknesses, but the strengths clearly overpower them.

Basically BMW made a car that is: a green eco daily driver around town and a beast on the autobahn and a powerhouse in the twisty Alpine roads and just another great BMW 3 series car and also a positive way to transition any petrolhead to electric. Let me explain in detail how that works.

Starting with the price - BMW 330e has the same petrol motor as BMW 320i, but the electric motor added to that brings the total power to the same level as BMW 330i and it costs just 1k€ more than the 330i. However, selecting 330e already pre-selects a few additional options with combined worth of 810€, so in fact choosing the hybrid system itself only costs you 190€ (comparing to to gasoline-only 3 series car with the same power level).

There are a few drawbacks that get a bit hidden here. Fuel tank of 300e is reduced from 60l down to 45l. There is no underfloor storage in the boot of the car (where there is usually a spare wheel). Top speed of the 330e is limited to 235 km/h unlike the 330i that is limited to 250 km/h. The 330e is almost 200kg heavier than the 330i, this can be felt in acceleration, but does not hinder cornering as much because this weight is very low. There is no option to have a trailer coupling or have a wagon (touring) version of the 330e for more cargo space. This can be annoying sometimes, but in the end none of these were a deal-breaker for me.

If you (or someone you know) is a petrolhead and you want then to transition over to the electric side slowly and happily - get them to buy this car and soon enough they will be seeking out charging stations and seriously considering getting a full electric next. BMW 330e is a real BMW - it is a driver's car. It accelerates, corners, breaks and even drifts with the best of them. However (and here where petrolheads get hooked), it does this best when there is some charge in the battery. When there is charge in the battery and you press the gas pedal, you get the rush of instant, electrical acceleration while the gasoline engine turbines are still spooling up to speed. And that instant electrical power works at all speeds - from standstill up to the max speed, because the electrical engine is mounted before the gearbox, so it can assist the gasoline engine at all speeds. However, if you do not plug your car in to recharge it will revert back to the power levels of a BMW 320i with a couple big passengers in the back - it will still be quick, but you will feel (and miss) the difference. And that feeling will be what will drive even the heartiest petrolhead to install a charging station map app or start using the build-in navigation with its extensive list of charging station points of interest. From there it is just a small step to a charger at home and then to a fully electric car as a serious consideration. In fact if you switch on the Sport mode of the car, it will try to keep the battery charged up to 10-15% so that it could give you the full power of the car when needed, just like a KERS system in Formula 1. Cars such as this are essential in bringing people from gasoline to electric propulsion gradually and also gradually building up demand for charging infrastructure and forming habits at all levels - from personal to institutional.

Hopefully by the time people start looking for replacements for their BMW 330e there will be new plugin hybrid and fully electric options in this category with larger batteries and much better fast and slow charging infrastructure all over the world.

I was pleasantly surprised by the iDrive navigation interfaces. I was very used to driving using Waze before this, because the build-in maps in cars are often bad and outdated and also usually take more attention to operate than the apps on the phones nowadays. Not so with the new BMW navigation software (I have the Professional version). I found that I could do common operations like navigating to an address of a contact or adding a stop at a fuel station along the route much faster, with fewer actions and with less attention to the screen than with a phone. In addition having the destination programmed into the car turned out to have multiple additional benefits. For example the hybrid system in this car communicates with the map to know when the route goes uphill or downhill and adjust power regeneration for that. Also the car will automatically save up some battery towards the end of a journey if it is inside a city so that you can drive the last few kilometers on pure electric and reduce your in-city pollution (both air and noise). The car will also then be able to display information about the next turn or how exactly are you supposed to drive through the next complex intersection in the instrument cluster (or HUD) so that you don't have to glance to the central screen for that info.

One other big feature that I loved in the 330e is the remote climate control. As the car already has a large battery inside of it, it can use this battery for all kinds of nice things, for example you can command the car from your phone to start pre-conditioning the climate in the car. In the winter that would warm the car up and in the summer cool it down to the temperature you last set in the car. Some gasoline cars also have such service available as options, but as they do not have the battery, adding this option requires complex additional hardware that starts up the car's engine remotely to provide enough power for the climate control to work. As you might imagine that kind of option is not cheap. And you can also set this to work on a timer too. The pre-conditioning will fail if there is not enough power in the battery, so that is another reason to plug in your car into the charger early and often.

The remote services also remove the anxiety of thinking if you actually locked the car or not - you can always just take your phone and send a remote lock signal.

The real life fuel consumption of 330e is something that is quite hard to find online and I understand why - it varies. Really, really varies.

If you have a power plug you can and do use either at work or at home, then you might go weeks without using any fuel at all. BTW it takes 3 hours to fully charge from a normal 220V 16A socket and 2 hours from any Type 2 socket. Unfortunately the car can not take more than 3 kW from any source, so all the fast charger power is kind of wasted on this car. But you still can recover 10-15 km of range from a half an hour lunch stop at a free Type2 charger at IKEA and sometimes that is all you really need to get where you need to go.

At the other extreme of fuel use is flying at 200-220 km/h on the unlimited sections of the German autobahn. It is a delight to do this in this car - it is rock solid, stable and very predictable even at top speed. It has great brakes for that moment when someone does not notice you in their rearview mirrors. Your attention focuses on the next moment, the next breath, then next car, the next bend. Most of the time you do not even hear the engine (unless you turn on to the Sport mode) - the cabin is well insulated and wind and tire noise only start to penetrate it at speeds over 200 km/h. For that experience you have to be then prepared to pay with average fuel consumption around 8 l/100km and frequent refueling stops due to smaller fuel tank.

If you are outside Germany and the highway speed is limited to 130 km/h then your cruising fuel consumption is likely to be closer to 4 l/100km. Park yourself on the tail of a trailer truck following it with active cruise control at 90 km/h in EcoPro mode and you might find your "Remaining range" indication actually increasing while the car sips 2-2.5 l/100km. Been there, done that a few times.

One other cool feature that my car has (it is an option) is the Adaptive LED far light. I was already used to automatic far light on my Mercedes that turned off the far lights as soon as it saw another car in front. However, this BMW system does more than that - it actually keeps the far lights active while creating a "shadow" area pointing at the detected car(s) so that even if there is a car in front of me I can still have the road sides fully illuminated all the time. Sometimes, when I am driving behind another car the system works so well that my far lights shining around the car in front illuminate the surroundings better  and further than the lights of the car in front. This does confuse a lot of people however as they think that I will blind them as my high beams are still on as they approach. So there a lot of angry high beam blinking. But I guess people will get used to such systems soon enough.

I will not go into much details about the costs of the car for me except to say that BMW Car IT is a great employer and thanks to their company car program I am paying less per month for this 2017 BMW 330e than I paid for my 2012 Mercedes C 180D (when insurance, maintenance, depreciation, tires and fuel are included). And I am driving significantly more with it as well - I was driving an average of 1900 km per month with the Mercedes and now I am averaging 3500 km a month in the BMW. Having company paid fuel inside Germany helps in that a lot. ;)

If I was choosing a new car now then I would also very seriously consider the new BMW 530e - basically it is the same kind of setup except some 10k€ more for a new level in style and comfort, newer version of the iDrive, completely new chassis platform with carbon fiber and other fancy stuff, new engine generation, more advanced driving assistance and parking assistance options and even more space in the back. There are way more fancy options in the 5 series lineup, such as massage seats or gesture control or rear seat entertainment screens or remote vision - where you can see in your phone video from the surround cameras of your car. I expect that some of this will also trickle down to 3 series when it will get its next refresh that is rumored to be in the next couple of years. And there will be more options - the BWM future model readmap as already stated multiple times publicly includes plans for electrified cars in all segments (mostly plugin hybrids) as well as more specific plans for fully electric Mini and BMW X3 models in the next couple years. And then there will be the much rumored iNEXT car due in 2021 model year which will not only be electric, but also capable of authonomy up to Level 5. These really are interesting times in the automotive world. Thanks, Elon! :)

I have driven this car since it was manufactured in January 2017. It started with 3km on its odometer. Now it is at 20 000 km. I expect to drive it until January 2019 and I expect the final odometer to be between 80 and 100 thousand km. We will see how the car holds up over the time.