My latest blog posts

Tips and Trics


Tesla climate control based on agenda using Flow

Since last week I have been the proud driver of a Tesla Model 3. After first trying Autopilot and then experiencing the acceleration capacity, I started looking at the Tesla app. In it you can control everything on the car, but what you can’t do is create a schedule when the climate control must be turned on and off. After some research I found out that a Tesla API could be used and that is how I came up with the idea to heat / cool the Tesla based on my agenda.

Now I also block my travel time in my agenda so I can use that as a trigger. At every meeting in my agenda, Flow checks 5 minutes before time to see if the word ‘Reizen’ appears in the title (that is dutch for travel).

If it really concerns ‘Reizen’ then we will log in to my Tesla account and create an access token. With this token we have access to execute further commands to the car.

If the login is successful, I will save the access token. We then collect from Tesla which car(s) are connected to this account. Multiple cars can be linked to 1 account. In my Flow, however, I assume that it is only 1. You can also see that I use the access token in the header for authorization.

I then request the current status of the car. I do this because I want to check if someone is currently in the car and the car is locked. Of course I don’t want Flow to change the climate control if someone is driving. That’s why I check if nobody is present and the car is locked.

We are dealing with a battery-powered car. And I would like to get into a car with a nice temperature, but not if this means that I can then no longer drive because the battery is empty. Hence I first check whether the battery is more than 30% full.

Then I get the current climate status. With that data (current inside temperature and set climate control temperature) I can check whether the climate control should actually be on. If this deviates more than 2 degrees, I will continue with the Flow.

If all these conditions are met, I activate the climate control of the Tesla. This makes me nice and warm in the winter and I don’t have to scratch ice. And in the summer it is nice and cool.

I still have a 15 minute delay built in after the activation of the climate control. Of course I don’t want ‘Reizen’ to be in my agenda but for some reason I didn’t go. And then my climate control has been on indefinitely. That is why Flow checks after fifteen minutes if someone is in the car. If not, he switches the climate control off again.

No more cake for the entire department

It has probably happened to you too. You walk away from your workplace and you forget to lock it. Colleagues see that and to teach you a lesson, they send an email under your name to the department that you will treat cake tomorrow. One laughs about it, the other doesn’t…

The fact is that you have created an unsafe situation by not locking your workplace. Think about which websites you are already logged in by default, which programs you have open and which documents can be put on a USB stick.

Dynamic Lock

Microsoft has created a feature in Windows 10 that helps you lock your workplace. Because what do you take 9 out of 10 times when you walk away…. your phone. And that is what Dynamic Lock checks for, which automatically locks your workplace as soon as your phone gets out of reach of your workplace.

Fortunately it’s not a requirement that your phone must be nearby to be able to log in. So it is only if your phone is nearby and has a Bluetooth connection with your laptop, and that connection is disconnected. Then your workplace locks.

Read here how you can activate Dynamic lock

Test Dynamic lock

You can test whether it works by walking away from your desk and when you return, your workplace must be locked. Now the range of Bluetooth per workplace and telephone is very different. It is therefore best to walk to a completely different floor or room.

See Dynamic Lock as a supplement to self-locking. The best thing of course is to lock your laptop yourself (for example with the key combination Windows key + L). But for those times you forget, Dynamic Lock makes sure you don’t have to buy a cake for the entire department.