Project news MajorDoMo (a home automation platform)
it has been nearly two months since the publication on habré of the first introductory article about the project of MajorDoMo and I have some news.
Just this week was released update version 0.1.8 b, which includes a number of minor changes and some quite interesting innovations, which I would like you to meet.
Scene
The interface works with the Smart Home via the menu system was and still is quite a comfortable. Especially if you have to work on the small screen of a smartphone. However, if we have the screen bigger, why not to use it more efficiently. After thinking a while, I came to the concept of creating scenes.
So, what constitutes a scene. The stage is, first and foremost, a great space with a background image, which should set the context. As background, it is logical to use the plan area (room), but the background could be a photo (of the facade) or a neutral image (Wallpaper). Scenes, by the way, can be any number between and easily switch.
Next on the scene you can add elements that specify the dynamics of the scene. Elements are of two types — image, or an html block. In the first case, you need to specify the coordinates of the location, and the second more information about width/height of the block. The behavior of the element are defined by a set of States, each of which specifies the item's appearance and condition display, tied to the values of environment variables.
But as they say, better to see what happens:
Learn more about the stages can be read on the website of the project, while limited to a common conclusion — through the mechanism of the scenes you can create visually appealing interfaces and dynamic, reflecting in real time the status of the various systems and mechanisms, as well as posmalaysia these mechanisms to operate. Interface scenes looks great when you run on the big TV screen and on the screen of the tablets of all stripes.
Eventually, I hope, will gather a library of graphics for different elements, as well as a mechanism of widgets, simple to embed complex code/structure elements.
Visual programming
Another innovation concerns the settings and programming scenarios. Some time ago on habré there was a small article about the project visual programming with Google Blockly. Learning about this wonderful project, I couldn't rest until I figured out how to tie it to MajorDoMo. In fact, there are many people for whom writing scripts in any programming language is an obstacle, although with logical thinking there is no problem. That's why I decided that visual programming in the project to be.
Download from google code the last version of Blockly, I saw how it works — after that he told me more like it. As it turned out, there is no problem with adding my own "cubes", and writing your own Converter from the visual environment in the software code. Blockly out of the box supports conversion in JavaScript, so I picked up this Converter as a basis and transformed it into a generator of PHP code, which is used in MajorDoMo for scripts.
Here is a simple scenario:
Is now possible being played in "cubes" to collect enough complex scenarios. Those who are standard "bricks" is not enough, you can always switch the mode to work directly with code, or install a special "cubes" to insert code blocks in a block diagram.
I even tried to Russify the block diagram, but so far refused to do — somehow it looks really quite unusual, although it may to this sometime back. Here is an example of a block diagram in Russian:
Miscellaneous
In addition to the above, it is possible to note the following changes:
the
Also updated information on the project website — publish articles describing the use cases of the system, related equipment, new versions of firmware code for the controller.
Overall, the project is developing — formed community, the forum discussed interesting ideas, different hardware solutions. The plans for the future to go with the project on the wider international community with its rich tradition in this field.
I take this opportunity to thank all the participants of project, to the extent possible contribute to its development — place system, find bugs, propose ideas, talk about interesting equipment.
Traditionally invite to the project's website: smartliving.ru.
Article based on information from habrahabr.ru
Just this week was released update version 0.1.8 b, which includes a number of minor changes and some quite interesting innovations, which I would like you to meet.
Scene
The interface works with the Smart Home via the menu system was and still is quite a comfortable. Especially if you have to work on the small screen of a smartphone. However, if we have the screen bigger, why not to use it more efficiently. After thinking a while, I came to the concept of creating scenes.
So, what constitutes a scene. The stage is, first and foremost, a great space with a background image, which should set the context. As background, it is logical to use the plan area (room), but the background could be a photo (of the facade) or a neutral image (Wallpaper). Scenes, by the way, can be any number between and easily switch.
Next on the scene you can add elements that specify the dynamics of the scene. Elements are of two types — image, or an html block. In the first case, you need to specify the coordinates of the location, and the second more information about width/height of the block. The behavior of the element are defined by a set of States, each of which specifies the item's appearance and condition display, tied to the values of environment variables.
But as they say, better to see what happens:
Learn more about the stages can be read on the website of the project, while limited to a common conclusion — through the mechanism of the scenes you can create visually appealing interfaces and dynamic, reflecting in real time the status of the various systems and mechanisms, as well as posmalaysia these mechanisms to operate. Interface scenes looks great when you run on the big TV screen and on the screen of the tablets of all stripes.
Eventually, I hope, will gather a library of graphics for different elements, as well as a mechanism of widgets, simple to embed complex code/structure elements.
Visual programming
Another innovation concerns the settings and programming scenarios. Some time ago on habré there was a small article about the project visual programming with Google Blockly. Learning about this wonderful project, I couldn't rest until I figured out how to tie it to MajorDoMo. In fact, there are many people for whom writing scripts in any programming language is an obstacle, although with logical thinking there is no problem. That's why I decided that visual programming in the project to be.
Download from google code the last version of Blockly, I saw how it works — after that he told me more like it. As it turned out, there is no problem with adding my own "cubes", and writing your own Converter from the visual environment in the software code. Blockly out of the box supports conversion in JavaScript, so I picked up this Converter as a basis and transformed it into a generator of PHP code, which is used in MajorDoMo for scripts.
Here is a simple scenario:
Is now possible being played in "cubes" to collect enough complex scenarios. Those who are standard "bricks" is not enough, you can always switch the mode to work directly with code, or install a special "cubes" to insert code blocks in a block diagram.
I even tried to Russify the block diagram, but so far refused to do — somehow it looks really quite unusual, although it may to this sometime back. Here is an example of a block diagram in Russian:
Miscellaneous
In addition to the above, it is possible to note the following changes:
the
-
the
- (!) Russian and English interface language — Yes, all strings are taken from the dictionary and it will be possible to easily connect additional languages. the
- To work with scripts in the code view now uses an editor with syntax highlighting the
- Added new info-module "Calendar/events" the
- Voice alerts are spoken without imposing on each other, and in order of priority the
- the Module "web variables" supports pulling information from closed password page the
- Automatic backup and recovery of damaged database tables of the system at the start the
- Full support for 1-wire Protocol: reading and writing to devices connected via the 1-wire bus. the
- a large number of very small fixes and improvements
Also updated information on the project website — publish articles describing the use cases of the system, related equipment, new versions of firmware code for the controller.
Overall, the project is developing — formed community, the forum discussed interesting ideas, different hardware solutions. The plans for the future to go with the project on the wider international community with its rich tradition in this field.
I take this opportunity to thank all the participants of project, to the extent possible contribute to its development — place system, find bugs, propose ideas, talk about interesting equipment.
Traditionally invite to the project's website: smartliving.ru.
Комментарии
Отправить комментарий