A little more than a week ago we opened the pre-order for Wiren Board Smart Home - our controller for home automation. In the previous article, we talked about hardware, and in this one we’ll start working with different peripherals and pay attention to the software. This time, we will show work with relays, open collector outputs, 1-wire thermal sensors, as well as radio work with wireless consoles and Noolite lighting control units and Oregon sensors.
')
So, to demonstrate the work, we assembled a stand:
First of all, the DIN-rail is fixed on the stand, where our Wiren Board Smart Home controller (1) and the power supply unit for 12V (2) are located. The controller is connected to the Internet via Ethernet.
Directly connected to the controller:
to relay output: controlled crane (3). The valve opens when 12V voltage is applied to it. It is also possible to connect a load of 220V to 1 kW to the relay outputs.
to open collector transistor outputs: LED strips. A piece of white LED strip (4) (under the cap) is connected to the output FET4, the RGB tape (5) is connected to the outputs FET1-FET3.
Two digital temperature sensors based on DS18B20 (9.11) are connected in parallel to one of the 1-wire inputs.
A standard contactless contactless card reader with a Wiegand interface (6) is connected to the inputs of R1, R2. Digital inputs up to 12V can be connected to these inputs (in this case, the operating voltage of the Wiegand protocol is 5V). Also, analog resistive sensors can be connected to the inputs of R1-R4; while on the stand they are not.
On one of the two RS-485 buses , there is a MSU21 module (14) of the Sensible House system , designed to connect different sensors. In our case, a temperature sensor (13) of type LM135 is connected to the module. These modules work under the Modbus protocol and, accordingly, can coexist with other devices on the bus.
The stand also contains the equipment with which our controller operates using the built-in radio module for a frequency of 433Mhz:
The executive module (10) of the Noolite system ( ST111-500 ). This power unit is used to control the incandescent lamp (12)
Wall-mounted wireless controller (7) of the Noolite system ( PU-111-1 ). The remote works from batteries and transmits signals wirelessly to the controller.
For clarity, two thermometers connected, respectively, via 1-wire and RS-485, are located next to the incandescent bulb, which is controlled through the Noollite unit. When you turn on the bulb thermometer readings grow.
Control
In this demonstration, we used Ninja Blocks software, one of the two systems we support. This is a cloud system, data from the device is sent to the server Ninja Blocks. You can control devices and sensors using the a.ninja.is web interface.
Main dashboard system:
Each device has its own widget. You can see widgets for controlling relay and transistor inputs, a widget for controlling Noolite devices, temperature and humidity widgets with readings from various sensors, etc.
The Ninja Blocks web interface allows you to create various rules. For example, a rule is created here that lights up the green LED strip if the temperature of the thermometer at the bulb is below 32 ° C:
Each sensor can view the history of changes in readings or even download it in machine-readable form:
For Ninja Blocks, there are applications for iPhone and Android for system management:
Ninja Blocks also provides a REST interface for external applications and web services for managing devices and retrieving data from them. There are several official external web applications from Ninja Blocks, for example, an application for building a simple home security system with event response.
BY
To implement all of the above, we have implemented: a library for working with a radio transceiver; a daemon serving receiving and transmitting data from a radio transceiver and encoding / decoding protocols Noolite and Oregon Scientific, device drivers for Ninja Blocks (1-wire thermometers, outputs, noolite and oregon, as well as Intelligent Home modules).
Actually demonstration of work with the web interface of the Ninja Blocks system:
Control via smartphone app (Ninja Blocks Remote):
Conclusion
Once again, we remind that the pre-order is open for the Wiren Board Smart Home controller. Orders are accepted until March 15, shipment is scheduled before the May holidays.
In the following articles we will tell you more about working with a radio transceiver, about reverse engineering of the Noolite protocol, and, of course, about connecting other peripherals. Follow the news!