Compare Variable: Weather <> Car

blu.italia

New member
Hello!

I would compare the outside weather temperature and the inside car temperature.

I would steer the car climate when the difference between outside weather temperature and inside car temperature is more then 5 degrees for example.

How can I do that?

Best Regards
Falko
 

Endercraft

Moderator
Let's start from the beginning. How do you obtain the temperature inside your car with MacroDroid? Outside is also tricky because weather location is still static and doesn't follow you.
 

blu.italia

New member
Can read out the car temperature via Plugin "Bolt for Tesla" and the Local Variable feature in MacroDroid.

That the weather location is still static is good, because the car is also still static in this case!
 

mapriex

Active member
one problem with static temperature is that it is measuered in the shadow. when you are parking in a sunny parking spot, your idea might not work as expected.
maybe something like this:
a temperature sensors outside on the car.
 

blu.italia

New member
No problem mapriex because the idea is: when the car temperature has more difference than 5 degrees to the outside temperature i will do some climate things.
 

LinerSeven

Active member
Hi, @blu.italia,

If you have a smartphone in your Tesla, and you want to pick up the outside temperature of the vehicle, you can use the longitude and latitude as a basis for the Openwhether map (
https://openweathermap.org/current )
from the temperature of the relevant region?

You need to get a token for the API, but it seems to be free and allows 60 requests per minute, which should be enough for your needs.

I don't have the tokens at the moment, so if I were to try it (it's nighttime in our Japan at the moment) it would be tomorrow... If I knew the longitude and latitude of Berlin, for example, I would be able to use the forecast temperature as a basis, even if I can't give a specific outside temperature.

Best Regards,
Liner Seven,
 

LinerSeven

Active member
Hi, @blu.italia,

How about using such a macro to obtain the temperature around the vehicle?

Best Regards,
Liner Seven,
 

Attachments

  • ________OWM_Temperature_Sample_For_Tesla.macro
    8.5 KB · Views: 2

blu.italia

New member
Hello @LinerSeven,

thanks for your reply.

I don't have a smartphone in my Tesla. I only want compare the outside temperature with the car temperature.

I use the OWM service for a long time and have a API Key.

Thank you for the Macro. It is the right direction. I edited with my Latitude, Longitude and API Key but I always get the same error:
{"cod":401, "message": "Invalid API key. Please see https://openweathermap.org/faq#error401 for more info."}

I don't think, that I've do something wrong.

In the macro I also added the three things but the temperature is always 0 degrees and in the protocol I also get the error code 401.

:(
 

blu.italia

New member
As you can see I can read out inside and outside temperature via the Bolt for Tesla plugin.

Is there any way now to compare these two variables and when the difference is more then 5, that I can do an action?

1000002135.png
 

blu.italia

New member
Problem solved!

Found a good way. Macrodroid now calculate these two temps. After that he deleted the decimal place that I have one number. If this number over 5, I start a climate action.
 

LinerSeven

Active member
Hi, @blu.italia,

How would this work?

I think the error in the previous macro is caused by the API key you are specifying being out of date.

Also, if possible, the language of the macro should be English! :)

Best Regards,
Liner Seven,
 

Attachments

  • Temperature_Check_Sample.macro
    4.3 KB · Views: 1

LinerSeven

Active member
Hi, @blu.italia,
Problem solved!

Found a good way. Macrodroid now calculate these two temps. After that he deleted the decimal place that I have one number. If this number over 5, I start a climate action.
Good!
If you can write down how you solved the problem, please let us know if you can, so that it can be helpful to others.

Best Regards,
Liner Seven,
 
Top