Hello! Today, I finally can share with you the results of my work over the past two years! Last night I released a new version 3.0 of the ThinkingHome smart home control system.
ThinkingHome is a program (.NET Windows service), with the help of which you can organize on your computer a smart home control center. This center, which is friendly with each other "glands" with different interfaces from different manufacturers, allows you to automate work with them (write scripts in JavaScript) and manage the entire economy through a web interface.
Under the cat a more detailed description of the system, a list of changes in the new version and a small announcement for those who hate Windows :)
ThinkingHome is not just a program that controls devices! This is a platform on the basis of which you can implement (as plug-ins) any functionality available for a computer, without worrying about solving basic tasks, such as logging or saving data between system launches.
The script plugin adds scripts to the system — small JavaScript programs that are written via the web interface. With their help, you can implement any logic for the automatic control of home devices (plugins API is available for this in scripts). For example, you can write a script that automatically turns off the warm floor and lights in the whole house, if no motion sensor worked for more than an hour during the day.
The script editor looks like this:
The MQTT plugin is simple: you can receive data from other devices and send them commands using the MQTT protocol. For example, this protocol supports the Wiren Board controller.
The nooLite plugin allows you to control electrical appliances using the nooLite system . You can control the lighting, ventilation, floor heating and any other electrical appliances. Even a teapot :)
The microclimate plug-in collects and stores in the database information on temperature and humidity from nooLite sensors . Data is displayed as graphs in the web interface.
It looks like this:
The alarm clock / timer plug-in allows you to turn on a sound signal at a specified time or execute a specified script. For example, you can set up that at 8 am, the blinds in the whole house would open themselves, and at 22 hours they would close themselves.
Weather forecast plugin - displays the weather forecast for specified cities in the web interface. Weather information is downloaded from the OpenWeatherMap API . The result looks like this:
In the new version we have made a large number of new improvements. In addition, many parts of the system were completely rewritten to increase the speed of work and make a more convenient API.
To a stranger at least somehow possible it was easier to deal with all these things, we wrote documentation . We tried very hard to describe everything in detail and clearly! The result was almost 50 pages of text (if printed on A4) and more than a hundred code examples (we wrote this for almost 3 months).
The result is posted on the site http://system.thinking-home.ru .
Historically, the project was written in C #. In principle, this is a good option, given the number of ready-made libraries and the very high quality of development tools. However, this option has a significant (for many, a critical) flaw - the application needs the .NET Framework, which works only under Windows.
It was so until recently, but now the situation has changed. In the summer, cross-platform .NET Core was released, and in November, version 1.1 was released. We are pleased to announce that we have already begun to port ThinkingHome to .NET Core.
Development is conducted in a separate repository . All code is written on a Mac and tested on macOS and linux. Now the system kernel and part of the base plugins are ported (timers, work with the database, scripts). When porting, much of the code is completely rewritten. Definitely a new version will be much better than the old one in terms of architecture, API and performance.
If you suddenly want to participate, we will be glad to any help! (And if you don’t want to participate, go to github anyway and click on the star :)
I wanted to tell a lot, I'm not sure that everything was clear. I will be glad to answer questions in the comments.
Try installing the application and write your own plugins . Create issues if you find errors and send pull requests . Add to our VKontakte group to keep abreast of the project news.
I will be very pleased if you like it!
UPD: 12/24/2016 8:00 PM
Fixed a flaw in the distribution. Those who downloaded the distribution, please download again.
Source: https://habr.com/ru/post/370003/
All Articles