Найдите исполнителя для вашего проекта прямо сейчас!
Разместите заказ на фриланс-бирже и предложения поступят уже через несколько минут.

See more about project

https://mm.tt/app/map/3027034761?t=ffog2p2BkC

Project Task

We have smart air conditioner, have a prices for an electricity in different hours. Knowing this information, as well as methods for accessing a smart air conditioner, I need to analyze prices for the last 48 hours for today and tomorrow, and then make a schedule for when the air conditioner will turn on and off. We should also take into account the comfort of our tenant in the same apartment with air conditioning, to maintain temperature limits. There are also rules for the minimum time a room can be heated, and the maximum time a room can remain unheated. In addition, we need to add the ability to control the operation of the bot, as well as the same parameters about the minimum and maximum heating and non-heating time, respectively. You also need to draw conclusions for some information, just about these config parameters, how many kilowatts per hour he spent in total over a certain period of time, and also the schedule for controlling the air conditioner.

Project Solution

So the challenge with controlling the smart air conditioner was resolved by creating new account in telegram, it sends trigger messages to the ifttt bot to turn the air conditioner on and off. And yes, we implemented air conditioner control via an ifttt bot. Why can't the telegram bot we need send these messages? Because a bot can't read bot messages! Therefore, we need a user bot. This user bot also reads messages from the ifttt bot that the temperature in the room is lower or higher than critical, from which the user bot transmits information to the main algorithm, and it already works so that the temperature is restored, changing the schedule in parallel to suit our situation.

The prices for each hour for today and tomorrow script scraps from website, it's maybe the easiest part of the project. Also I add all commands that needs so easy too. To protect my client from searching my client from unwishers I add admin control, so only my client can use it. I used my template that base in aiogram3. It costs from 60 dollars when use bots that based in my template, but I decided make a discount for my client! He was happy :)

The most big problem, challenge or pain in the ass is the analysis to found the cheapest way to heating. I used so many algorithms, methods from stat analysis and methods to optimize code. Almost all of them were invented by me. I think they were already invented before me, but I didn’t have much time to look, and besides, I love mathematics, you won’t believe even mathematical analysis. This is one of thousands of orders where you can find such a large use of mathematics, so I couldn’t pass up the opportunity to try myself! I made 3 attempts to make this algorithm, and in the end I succeeded! I would even say that it performs its function 110%! I'm still happy with the result. Unfortunately, neither here nor in mindmeister I described the operation of this algorithm due to its size; it is written in 200 lines of pure algorithm. Therefore, I can only leave photos of the code here. Perhaps, someday, I’ll finally get around to finishing the analysis of my own algorithm.

As a result, I completed my task and the customer was satisfied, and I received my money. It's really a pity that he didn't leave a review because it was impossible.

It was an interesting and exciting experience! Every time I'm glad to receive such orders, because there are few of them.