Smart home and car
It is clear that a smart home is some kind of computer, some sensors, integration, Internet connection. If you collect information about the car on it, you can use it in scripts and make various reminders related to the car. Smart cars are usually now called so, but of course they are like any other smart smart devices are not very smart and do not exactly integrate with smart home systems, at least manufacturers certainly will not somehow make both the home system and the car at the same time. Well, maybe only Xiaomi will mature and make cars and the smart home system will continue to do the same.
So far, I have decided to just collect information about the movement of the car, for this I made a decision such that just from the phone I go to a special telegram bot and turn on the share geolocation function in it, and this information is sent to the smart home system and I just save it there, in parallel I also calculate the change in coordinates and distance by this phone, or rather by this car. And of course, it is important not only to enable this share geolocation function in a timely manner, because in Telegram it can turn on for a maximum of 8 hours, and when, for example, I go somewhere for a very long time, then of course I have to restart at some regular gas station and check if there is not enough time left, then I just turn it off and.
Then, of course, I can make a special map in the smart home system on which I can also see all the movements, I record how much distance I have traveled, but here it is important not only to turn on this bot, this function, but also to turn it off. Because if after some time, for example, I go out and walk or use some public transport, then it still continues to count as if it is moving a car, and then it will not be clear how to use this information at all.
But by and large, of course, I don't really need these coordinates yet, I used to just record all my routes using special programs built into the navigator, and then I just found an application that allows you to record only the track itself without the navigation function and saved these tracks for some analysis, how many kilometers were covered and other information.
But in principle, if you get this information from the car, then you can, for example, and correctly track it, then you can, for example, calculate how much was passed, how much approximately was spent, for example, fuel, and somehow make reminders that you need to fill up the car or do some other actions. But in order not to forget to turn the phone on or off when I use the car, it was an idea to put some kind of phone or tablet in the car, so that it was always there, make it a constant power supply, and that all this would work from it, but leaving it constantly turned on in the car seems like it's not very safe it's better not to do that either.
Instead of Telegram, I then found a special program that allows you to use geolocation quite well in principle, and moreover it is the program itself. In practice, it turned out that it actually does not affect battery consumption and sends it to the smart home system. There you can configure it in different ways, if there is no traffic, then it sends very rarely, if it does not see satellites, it can also send using GSM, and it shows that the signal quality is not very good and this can also be processed correctly, or use some other sources of information like wi-fi points. Well, the plus point is that you can track not only geolocation, but also the parameters of this phone, if for example it is connected in a car, then you can quite well see what is the charge of this phone, what is the remaining charge in the battery, and in principle you can even make some solution, for example, connect the same outlet to this phone and you can even distribute wi-fi on your phone, and then you can control this smart socket, some relay, turn on and off the power of this phone so that it is not constantly turned on. I have such relays this relay is based on ESP-01, this is a simplified version of the very first of esp 8266, in which very few different conclusions are made, but this module is assembled together with the relay and it works up to 5 Volts from USB, that is, in theory, you can simply connect it from a USB adapter and the phone itself and the relay itself, and in this way it will be possible to control the on and off charging of this phone, or just do it directly there from a 12-volt power supply to make some kind of step-down, I have modules that can lower from 12 volts to 5 volts, and even then, you can simply connect and basically use this relay in the car. But if, of course, a phone is constantly turned on in the car or some relay works, then it is not very clear how much the car battery will last at all, but in fact you can track the on-board network voltage, and if some consumption is quite large or the battery suddenly runs out, then you can send it from this phone a message to the home system that the charge has stopped, for example, or that the power supply voltage has dropped significantly and use this reminder to arrive in a timely manner, and for example there, charge or start the car and charge the battery. Well, also in general, this microcontroller, for example, can be used in general as a mini gateway for a smart home, or so for a smart car that it can, in principle, raise a small web server, and in principle handle different scenarios related to the movement of the car and it can also connect via wi-fi, via a phone for example, it can connect to a smart home, receive some parameters and transmit them itself, or for example, instead of ESP 01, you can use a more advanced module, for example ESP 32, which already has BLE support, and it will be possible, for example, to track different devices, which is located in the car, and also transmit this information to the smart home system, and also make some scenarios based on this. Well, if this is some kind of private house or dacha, then you can track the coordinates in general in advance, for example, turn on the heating at the dacha or open the gate at the entrance of the car, that is, in principle, you can also implement quite a lot of interesting functions by understanding where the car is now. There was also an idea such that, for example, this microcontroller itself, for example, it can also work as a wi-fi point if, for example, it is detected either as wi-fi or through BLE the presence of, for example, this car near the garage is detected, then for example the camera can turn on and recognize this car, or simply when realizing that, let's say that a microcontroller with such a bluetooth identifier has appeared in the range, then the smart home system can simply make a signal to open the garage.
Well, not so long ago I also purchased a scanner for connecting to the car's CAN bus, it also works and you can connect it to the phone, but so far there are no normal solutions that allow, for example, the same ESP32 to connect to it and somehow process this information and send it to the smart home. It would be very interesting if I could use the bus to send various information about the car, driving speed, and other values from the car's on-board computer to the smart home system.
Automation in a smart home should be useful and create additional comfort, but sometimes everything goes wrong… The reasons for this, and how to configure everything, see on my channel.