Open control system “smart house” MajorDoMo
In this article I will tell about one project, which involved for quite a long time and that some time is available to the General public. We are talking about a management system “smart house” to MajorDoMo (Major Domestic Module), which is the Central unit of the complex software and hardware solutions, which I, because of their modest possibilities, implement in your household.
But everything in order...
Restrictions
The project is not a product in any form. The status of the project – development and research. The project is not quite easy to understand and is intended for enthusiasts in the field of home automation. Deep implementation and project settings to suit your needs will require programming skills and at least basic understanding of object-oriented approach in development. The following opportunities may not be realized fully or adequately tested. Do not use the system in cases when the reliability of the functioning elements of the system may depend on the life or health of people.
But let's not talk about gloomy :)
Concept
The project is based on a few fundamental principles that determine the direction of development.
The principle of the first (“conceptual”): the smart house is not only (not so much) hardware.
In my understanding, much more important is the formation of a “smart” environment that is not limited to the sensors and actuators. Yes, sensors and actuators needs to provide comfort and security, but is the minimum program. The environment must be internal and be able to use external information resources, to adequately manage the existing technical base, and even to help the person in his life.
The second principle (“down to earth”): interaction of system elements build on the HTTP Protocol.
First, the presence of a home network is not something “out of the ordinary” Ethernet/Wi-Fi simple to deploy, flexible in configuration, and, in many cases, it is already available. Second, the HTTP access is embedded in an increasing number of devices from specific controllers to network cameras, not to mention the presence of the HTTP-API protocols in many applications and services. By the way, this principle does not exclude the integration of zoo-specific protocols and devices, but only through the support of software or hardware controllers. Under this principle it is necessary to tell about the inner world of the system – it works based on the web server and the user interface is a web-based site so to access office from any device with a web browser.
The third principle (“flexibility in integration”): the depth of integration of the system is determined by the needs of the user (well, and the degree of confidence in the system).
This means that the role of the system may be different. In one extreme case, the system can be a control center and be responsible for the logic of the functioning of the entire periphery, i.e., to process the signals and issue commands to all “slave” devices. In the other, the system is only part of a distributed network among the sensors and the controller, whose reliability is significantly higher in mind the specialization of tasks. In the latter case, the controller simply tells the system about its status, but don't rely on it in decision-making. As practice shows, in home environment, best results are obtained with the combined solution, and the degree of bias in one or the other extreme is determined by the specific task.
The principle of the fourth (“ease on rise”): the system must be easy to install to look at and something to try.
Installation on a Windows computer is not more difficult than installing any other application. For a Linux system is not difficult to raise the site to a local web server. No need to do any hardware — you can use info-applications and programming response to the data from the Internet.
But we digress from the theory and go to practice :)
Opportunities
Below I will list the features which have been implemented with MajorDoMo. On the website of the project is the description of the various use cases — I believe that it gives the visual representation of the system.
So...
the
Use cases of the system are constantly updated with new scenarios from users. To implement many script programming is not necessary at all – just configure the existing modules and management interface. For some, it is still necessary scripting for internal script use the PHP programming language, to know which is of course useful, but in many cases it is sufficient to use a simple design from existing examples and to do by analogy.
Hardware and software
As the head unit uses ordinary PC running MS Windows, but the system can be installed on Linux-computer – will need some adapting, but overall, nearly everything works the same on both systems right out of the box. As the platform uses the Apache web server, MySQL database, and already mentioned, PHP. Large part of the functionality is performed via the web server, but additionally runs the so-called script main cycle is responsible for starting tasks on timers.
As already mentioned, the system can operate without peripheral iron, but, of course, the more connected to the system sensors and actuators, the more opportunities open for use.
Original basic hardware module for communication with the outside world was a controller for Arduino with Ethernet shield-Ohm on-Board and the connected sensors. The controller is connected to the home network and its task is to initiate HTTP requests to the Central nervous system when changes in the sensor values. Another version of the firmware allowed you to use it as a device to control the relay through built-in web server. Such controllers may be any number. It was later made a software adapter that allows you to use the Arduino without ethernet and connected directly to the computer via USB. The concepts of controller and firmware source code is also available on the project website.
In addition to the Arduino in the system was embedded controller support 1-wire network. In this case, the system is able to communicate with the network via the OWFS module, which is itself cross-platform and is responsible for communicating directly with the hardware.
Of the optional peripherals can be noted the Bluetooth adapter whose task is to scan MAC addresses available in the broadcast devices.
About Ethernet network, Wi-Fi and access setting from outside I'm here to stay I won't – is a separate issue and you can find a lot of information.
In General and all. Further development support “iron” protocols will be implemented as needed :)
Plans
A lot of plans! :) Firstly, with the increasing number of people testing the system, pop up errors and wishes – that, in General, good. Whenever possible, these requests will be closed.
Further, it will brought to mind the multi-lingual interface is already in place, but while the interface is mixed: in Russian, English, and something interesting at all under pseudonyms like “SCRIPT_DESCRIPTION”.
A lot of ideas for adding info internal applications and integrate with existing web services (mail, task lists, social networks, etc.)
There are some advances in the development of the system towards reaction to user behavior patterns, when will be automatically allocated to the sequence of events and offered them to automate (if the system “sees” that morning, leaving the bedroom, I walk through the hallway and turn the light on in the bathroom, and it is repeated NN times, then why not offer this sequence to use – for example, turning on a light automatically or to use this sequence for additional steps – including the coffee maker). But that's only a matter of research.
conclusion
The article came out more of a review than a technical one. Perhaps, it thought.
Project site: smartliving.ru
On the website you can find much more technical information, screenshots, a description of built-in functions, code examples for usage scenarios, as well as the distributions of the system. In addition, the site has a Forum section to discuss details and ideas.
The system is distributed under the MIT license, i.e., practically without any restrictions (including commercial use), but with the obligatory indication of authorship.
Source code is also completely open and available in Google-code: code.google.com/p/majordomo-sl
Take this opportunity to invite stakeholders to work together on the project tasks full, enough for everyone :)
Article based on information from habrahabr.ru
But everything in order...
Restrictions
The project is not a product in any form. The status of the project – development and research. The project is not quite easy to understand and is intended for enthusiasts in the field of home automation. Deep implementation and project settings to suit your needs will require programming skills and at least basic understanding of object-oriented approach in development. The following opportunities may not be realized fully or adequately tested. Do not use the system in cases when the reliability of the functioning elements of the system may depend on the life or health of people.
But let's not talk about gloomy :)
Concept
The project is based on a few fundamental principles that determine the direction of development.
The principle of the first (“conceptual”): the smart house is not only (not so much) hardware.
In my understanding, much more important is the formation of a “smart” environment that is not limited to the sensors and actuators. Yes, sensors and actuators needs to provide comfort and security, but is the minimum program. The environment must be internal and be able to use external information resources, to adequately manage the existing technical base, and even to help the person in his life.
The second principle (“down to earth”): interaction of system elements build on the HTTP Protocol.
First, the presence of a home network is not something “out of the ordinary” Ethernet/Wi-Fi simple to deploy, flexible in configuration, and, in many cases, it is already available. Second, the HTTP access is embedded in an increasing number of devices from specific controllers to network cameras, not to mention the presence of the HTTP-API protocols in many applications and services. By the way, this principle does not exclude the integration of zoo-specific protocols and devices, but only through the support of software or hardware controllers. Under this principle it is necessary to tell about the inner world of the system – it works based on the web server and the user interface is a web-based site so to access office from any device with a web browser.
The third principle (“flexibility in integration”): the depth of integration of the system is determined by the needs of the user (well, and the degree of confidence in the system).
This means that the role of the system may be different. In one extreme case, the system can be a control center and be responsible for the logic of the functioning of the entire periphery, i.e., to process the signals and issue commands to all “slave” devices. In the other, the system is only part of a distributed network among the sensors and the controller, whose reliability is significantly higher in mind the specialization of tasks. In the latter case, the controller simply tells the system about its status, but don't rely on it in decision-making. As practice shows, in home environment, best results are obtained with the combined solution, and the degree of bias in one or the other extreme is determined by the specific task.
The principle of the fourth (“ease on rise”): the system must be easy to install to look at and something to try.
Installation on a Windows computer is not more difficult than installing any other application. For a Linux system is not difficult to raise the site to a local web server. No need to do any hardware — you can use info-applications and programming response to the data from the Internet.
But we digress from the theory and go to practice :)
Opportunities
Below I will list the features which have been implemented with MajorDoMo. On the website of the project is the description of the various use cases — I believe that it gives the visual representation of the system.
So...
the
-
the
- in the Morning (not before 6: 11) upon detection of the first movement in any of the rooms (except bedrooms), the system tells about the current state (the outside temperature, time of sunrise/sunset) and includes music (random folder added to favorites) the
- When you open the garage or gate system reported. Also reminds if they are not closed (every 15 minutes, but easily disconnected if needed)
- the System knows what the temperature outside and in the rooms of the house the
- the System can accept commands through the internal chat, using skype from your smartphone (including voice control) the
- the system Interface is available on any device in the home network, and via Internet (closed password). The interface itself is optimized for mobile devices (used jQueryMobile). the
- In the system interface can access the image from IP cameras and the system can respond to the detected camera movement the
- the System controls the individual elements of the external lighting, including its half an hour after sunset and off an hour before dawn the
- Is control access to the devices connected to your home network – it is possible to identify the problem or to determine the presence of someone from home (automatically connected to Wi-Fi gadgets) the
- the System periodically scans the bluetooth range for new or previously identified devices (by MAC address) in the radius of these marks as identifying the presence of people the
- Smartphone automatically transmits the GPS coordinates and the system maintains a history of user movement in response to entry/exit from specific locations (knows when I come to the house and in the future will be able to open the entrance gate and at the entrance to the store may remind you that a shopping list not empty) the
- Via the system interface, you can control the playback of media content from the local server on any of the home computers (control VLC player, and XBMC media center) the
- In the system have an application for keeping records of products and making a shopping list
Constantly monitored the temperature in the heating circuit when the nominal range, there is a notification voice on Skype (for example: “boiler Temperature 65 degrees Celsius. Note — above normal and continues to grow!”) the
Use cases of the system are constantly updated with new scenarios from users. To implement many script programming is not necessary at all – just configure the existing modules and management interface. For some, it is still necessary scripting for internal script use the PHP programming language, to know which is of course useful, but in many cases it is sufficient to use a simple design from existing examples and to do by analogy.
Hardware and software
As the head unit uses ordinary PC running MS Windows, but the system can be installed on Linux-computer – will need some adapting, but overall, nearly everything works the same on both systems right out of the box. As the platform uses the Apache web server, MySQL database, and already mentioned, PHP. Large part of the functionality is performed via the web server, but additionally runs the so-called script main cycle is responsible for starting tasks on timers.
As already mentioned, the system can operate without peripheral iron, but, of course, the more connected to the system sensors and actuators, the more opportunities open for use.
Original basic hardware module for communication with the outside world was a controller for Arduino with Ethernet shield-Ohm on-Board and the connected sensors. The controller is connected to the home network and its task is to initiate HTTP requests to the Central nervous system when changes in the sensor values. Another version of the firmware allowed you to use it as a device to control the relay through built-in web server. Such controllers may be any number. It was later made a software adapter that allows you to use the Arduino without ethernet and connected directly to the computer via USB. The concepts of controller and firmware source code is also available on the project website.
In addition to the Arduino in the system was embedded controller support 1-wire network. In this case, the system is able to communicate with the network via the OWFS module, which is itself cross-platform and is responsible for communicating directly with the hardware.
Of the optional peripherals can be noted the Bluetooth adapter whose task is to scan MAC addresses available in the broadcast devices.
About Ethernet network, Wi-Fi and access setting from outside I'm here to stay I won't – is a separate issue and you can find a lot of information.
In General and all. Further development support “iron” protocols will be implemented as needed :)
Plans
A lot of plans! :) Firstly, with the increasing number of people testing the system, pop up errors and wishes – that, in General, good. Whenever possible, these requests will be closed.
Further, it will brought to mind the multi-lingual interface is already in place, but while the interface is mixed: in Russian, English, and something interesting at all under pseudonyms like “SCRIPT_DESCRIPTION”.
A lot of ideas for adding info internal applications and integrate with existing web services (mail, task lists, social networks, etc.)
There are some advances in the development of the system towards reaction to user behavior patterns, when will be automatically allocated to the sequence of events and offered them to automate (if the system “sees” that morning, leaving the bedroom, I walk through the hallway and turn the light on in the bathroom, and it is repeated NN times, then why not offer this sequence to use – for example, turning on a light automatically or to use this sequence for additional steps – including the coffee maker). But that's only a matter of research.
conclusion
The article came out more of a review than a technical one. Perhaps, it thought.
Project site: smartliving.ru
On the website you can find much more technical information, screenshots, a description of built-in functions, code examples for usage scenarios, as well as the distributions of the system. In addition, the site has a Forum section to discuss details and ideas.
The system is distributed under the MIT license, i.e., practically without any restrictions (including commercial use), but with the obligatory indication of authorship.
Source code is also completely open and available in Google-code: code.google.com/p/majordomo-sl
Take this opportunity to invite stakeholders to work together on the project tasks full, enough for everyone :)
Комментарии
Отправить комментарий