Good afternoon, dear community! The idea of driving auto start was born quite spontaneously, it all started with how I bought a car a couple of years ago and the question arose of installing an autorun system. Over the past two winters (and our winters are cold, because I live in conditions equivalent to the far north) I woke up in the morning, went out, started the car, went home, drank coffee, and drove to work. This winter, laziness took over, and I purchased the Starline sm32 autorun set with gsm and gps module. Autorun is installed, the application is downloaded, everything works fine! And then I thought: “Why not connect the autorun to my smart home system?”. The first thing that came to mind was finding the API for the service, but the searches were not successful. This topic was raised at the official forum, but there was no answer from the support, I left a request through the online consultant in the hope that maybe they would answer me, and a week later they answered:
Yes, there is an API. We provide it after customer:
* provides information about yourself and your company and the purpose of using our API ')
* signs a non-disclosure agreement (NDA)
With this, I did not bother and began to look for other ways. Yes, I forgot to say that besides the application there is also a web service, which opened this opportunity for me.
After receiving requests, I received all the necessary information, and wrote a small script in Python. Please do not scold too much for the code itself and its design; this can be said for my first experience in this case:
This is a script to start the engine, and in order for us to stop it, we change the value of value to 0. But how do we get Siri to run our script? With a long googling and browsing the forums, I found a solution: homebridge-script - this plugin allows you to run sh scripts, how to install homebridge I will not write full instructions on the Internet, put the plugin:
PS: I have been tormented for a long time with the selection of phrases, if siri does not like something, she immediately climbs into the Internet for a search. In general, use, I hope it will be useful to someone!