- 1 Project Framing
- 2 Code Leverage Options
- 3 References
- 4 Content
- 5 Context
- 6 Like this:
- Measuring systems (sensors) which provide the inputs to the controller that define state,
- Controllers which attempt to perform the regulation of the system to be controlled based on state, and
- Activation mechanisms, typically embedded in other systems, which make the changes to the environment dictated by the controller.
Baango / CC by SA 4.0
In the home heating example shown in the context discussion the sensor is the thermocouple which measures temperature, the controller is the thermostat, and the activator is the on/off switch mechanism component of the furnace.
In home automation sensors come in a variety of forms. These include:
- the human occupants of the home
- time of day, day of week, date and periodicity
- motion, temperature, humidity and other physical phenomena
Home automation sensors tend to come in three forms:
- Control mechanisms which are integrated as part of electro-mechanical systems which have been updated for control via automation. These include systems such as home heating systems, garden controllers, etc. which are designed to trigger activation of behaviors with or without home automation; but which can also be interfaced to, or paired with, home automation controllers.
- Independent commercial product sensors which are becoming available and marketed specifically for home automation. These include motion detectors, cameras, etc which are not specifically designed to activate changes in the environment but which are designed to trigger alerts as to sensed behaviors.
- Open source, DIY, maker technology.
DIY home automation utilizing the first two types of sensors is dependent on the commercial availability of sensors for the task to be automated, the willingness of the vendors of the technology to open their API for interface to DIY controllers, and the ability to interface the DIY controllers to the sensors by means of the technology protocols chosen by the vendors to expose their technology function as services. These bindings become a, if not the, critical factor in developing effective controllers sufficient to the task.
The third form of home automation sensors offers a scheme to gain necessary leverage to overcome the challenge by providing an abstraction layer between the controller and some, or all, of the sensors and activators in the system similar to the way channel architectures separated concerns of peripheral device management from the other tasks of Central Processing units in early computer architecture. The principal open source offering in this space is MySensors.
MySensors is an open source hardware and software community focusing on do-it-yourself home automation and Internet of Things.
We’re here to help people who’d like to create original and affordable sensors and actuators based on components like, Arduino, ESP8266, Raspberry Pi, NRF24L01+ and RFM69. Does it sound complicated? Don’t worry, we’ll explain everything.
We provide easy to follow build instructions, ready to use code examples and adaptable open source hardware designs. All of this runs on the MySensors software library for secure communication that has been battle-tested with more than 20 of the leading home automation controllers on the market.
The technology architecture for EATSv5 is based on Java and Eclipse. The logical architecture is based on whole system encapsulation for in-frame functions, and architected gateways to out-of-frame functions; where in-frame and out-of-frame define internalized functions and external functions. Internalization versus externalization reflects loose versus tight coupling of architected components, partly from a code sharing basis, and partly from a platform sharing basis. This reflects a historical balancing exercise which was first emphasized in a formal way by Glenford J. Myers in his Reliable Software through Composite Design book in 1975.
The determination of how to approach home automation for 148Avenida reflects design choices in 2020 that are essentially similar to the design choices made in 1975 around how to package and modularization COBOL programs in the assembly of application systems, which was the primary space the being addressed in Glenford Myer’s book at the time it was written. The modules have changed in size and composition but the underlying conceptual issues remain the same. The Myer’s book was a key contributor to the the shift in design practice for computer programs to what are defined as component-based systems from the direction toward monolithic systems of the late 1960’s and early 1970’s. The problem is that components have become megaliths and composition involves running away from fundamental problems rather than resolving and solving them. The fundamental, unsolved problem is DLL Hell, or Dependency Hell. Separating large blocks of code from interfering with each other through virtualization, and containerization doesn’t make the problem go away, it just postpones resolution, while allowing the problem to multiply and grow in multiple containers, while using increased cost of hardware and maintenance rob performance to pay for lack of good practice. Composite Design is just as much about integration and reuse as it is about separation of concerns.
In the design and implementation of EATSv5 what we strive for is internalization of features which have high functional and informational coupling, and externalization of features which have low functional and informational coupling. At the same time while coding everything as integral components with consistent design would yield the most cohesive design, that approach is ineffective as a development strategy expected to yield practical results in a timely form. Bridging is also required to a dynamic marketplace in the form of externally developed tooling which is geared toward supporting that task.
A survey of home automation products yields 4 proprietary frameworks, and at least 24 open source efforts as identified in the references. These are broken out by primary language as follows:
The prevalence of C++ makes sense as it is the oldest language and the most suited to the creation of device drivers required to interface with the multitude of protocols and technologies used to interface with home automation devices. Because of the desire to integrate home automation with EATSv5 we limited the selection to the five Java systems.
Code Leverage Options
The Java options are:
Because of the tight integration of openHAB and Eclipse it was the preliminary favorite and was installed with some success as an independent system to experiment with home automation. Home Assistant was also look at closely in a preliminary review of the field, as was HomeSeer. Home Assistant was not pursued for integration due to the choice of Python as it’s language base which immediately created a need to address a language bridge as a foundation task. HomeSeer appeared to have support across a wide range of home automation peripherals, but is packaged as a closed, for purchase product. Preliminary investigation of openHAB as a code-base to be integrated with EATSv5 generated some hesitation in the structure of the code and how well suited it might be toward actual integration. That hesitancy generated a desire for a second review of what other open-source projects existed and whether a better suited partner project might be available. That review generated the discovery of the other four Java home automation projects identified here. In addition, there were other projects identified which are non-Java, but which indicate movement and direction in the field which open the potential rationale for including home automation into EATSv5 as an internal development which does not fully utilize any one solution, but rather attempts to leverage code from one or more of these projects without a wholesale adoption of any particular project. The primary driver toward adoption of openHAB is toward device interaction, which may not be a sufficient reason to engage in the effort required. It may make more sense to build a correct housing, and adopt other schemes, such as MySensors, for device interface.
One appeal of openHAB is integration with Eclipse, which includes the use of Jetty as a webserver. OpenNetHome is GPLv3, not EPL, but is also based on use of Jetty as a webserver.
On attempting to use the current version of OpenNetHome the system throws exceptions after attempting to bind to the Wink2 home controller.
Jun 27, 2020 12:11:13 PM nu.nethome.home.impl.HomeManagerStarter go INFO: **Starting HomeManager 3.0-6ae52** Jun 27, 2020 12:11:13 PM nu.nethome.home.impl.HomeManagerStarter go INFO: Logging to: C:\Users\joeva/HomeManager%g.log Jun 27, 2020 12:11:13 PM nu.nethome.home.impl.HomeItemFileLoader loadItems INFO: Loading Items from demo.xml SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. CyberGarage warning : error setting options java.net.SocketException: error setting options at java.net.TwoStacksPlainDatagramSocketImpl.join(Native Method) at java.net.AbstractPlainDatagramSocketImpl.joinGroup(Unknown Source) at java.net.MulticastSocket.joinGroup(Unknown Source) at org.cybergarage.upnp.ssdp.HTTPMUSocket.open(HTTPMUSocket.java:153) at org.cybergarage.upnp.ssdp.HTTPMUSocket.open(HTTPMUSocket.java:166) at org.cybergarage.upnp.ssdp.SSDPNotifySocket.(SSDPNotifySocket.java:65) at org.cybergarage.upnp.ssdp.SSDPNotifySocketList.open(SSDPNotifySocketList.java:89) at org.cybergarage.upnp.ControlPoint.start(ControlPoint.java:867) at org.cybergarage.upnp.ControlPoint.start(ControlPoint.java:923) at nu.nethome.home.items.UPnPScanner.activate(UPnPScanner.java:67) at nu.nethome.home.item.HomeItemAdapter.activate(HomeItemAdapter.java:70) at nu.nethome.home.impl.HomeServer.loadItems(HomeServer.java:529) at nu.nethome.home.impl.HomeServer.run(HomeServer.java:201) at nu.nethome.home.impl.HomeManagerStarter.go(HomeManagerStarter.java:145) at nu.nethome.home.start.StaticHomeManagerStarter.main(StaticHomeManagerStarter.java:32) CyberGarage warning : HTTP/1.1 200 OK ST: upnp:rootdevice USN: uuid:4d4f30c3-eb42-4653-a78d-5ce4ee9fb039::upnp:rootdevice LOCATION: https://192.168.7.147:8888 CACHE-CONTROL: max-age=1800 DATE: Sat, 27 Jun 2020 19:11:18 GMT SERVER: node.js/6.1.0 UPnP/1.1 node-ssdp/2.9.1 EXT: CyberGarage warning : HTTP comunication failed: no answer from peer.Unable to retrive resoure -> https://192.168.7.147:8888 org.cybergarage.xml.ParserException: HTTP comunication failed: no answer from peer.Unable to retrive resoure -> https://192.168.7.147:8888 at org.cybergarage.xml.Parser.parse(Parser.java:88) at org.cybergarage.upnp.ControlPoint.addDevice(ControlPoint.java:263) at org.cybergarage.upnp.ControlPoint.searchResponseReceived(ControlPoint.java:544) at org.cybergarage.upnp.ssdp.SSDPSearchResponseSocket.run(SSDPSearchResponseSocket.java:79) at java.lang.Thread.run(Unknown Source) Exiting listener Jun 27, 2020 12:11:20 PM nu.nethome.home.impl.HomeServer loadItems INFO: Activated 25 of 25 Items
Removing the Wink2 controller from the network eliminates the second of the two errors, the lines highlighted in red above, but not the first, the remaining lines.
User’s Manual: forum
Developer’s Manual: forum
Primarly this project was started to support MySensors.
User’s Manual: https://freedomotic-user-manual.readthedocs.io/en/latest/
Developer’s Manual: https://freedomotic-developer-manual.readthedocs.io/en/latest/
MySensors supported as a plugin
Freedomotic is an open source, flexible, secure Internet of Things (IoT) development framework, useful to build and manage modern smart spaces. It is targeted to private individuals (home automation) as well as business users (smart retail environments, ambient aware marketing, monitoring and analytics, etc).
Freedomotic can interact with well known standard building automation protocols as well as with “do it yourself” solutions. It treats the web, social networks and branded frontends as first class components of the system.
The Department of Information Engineering and Computer Science (DISI) at the University of Trento had several research teams working on sensor networks for home monitoring and automation.
They needed a framework capable of easily integrating different projects developed in heterogeneous languages. This framework needed to make those projects work together, help simplify testing, and produce visual demos to show to research partners. Using a common framework, teams at DISI could focus on the core of their research instead of developing custom solutions for each individual project. The Freedomotic project was created to fulfill these needs.
The main goals and requirement of Freedomotic were: maintain a framework which was flexible and modular which could be easily integrated and adapted to different (and potentially unknown) needs, allowed for simple testing, and could produce visual demos.
These same goals and requirements continue to hold true today.
- Commercial Frameworks
- Open Source Frameworks (a/o June 2020)
- openHAB – Java, Eclipse, Jetty
- Home Assistant – Python
- OpenMotics – Python, custom Maker hardware
- Jeedom – C++ (Community edition)
- ioBroker – Node.js
- AGO Control – C++, Python
- Domoticz – C++
- FHEM – Perl
- Freedomotic – Java
- Calaos – C++
- Pimatic – CoffeeScript, C++
- Homebridge.io – Typescript
- Smarthomatic – Perl
- EventGhost – Python, C++
- MyController – Java
- PiDome – Java
- HomeGenie – C#
- eGeoffrey – Python
- MisterHouse – Perl
- LinuxMCE – C++
- OpenNetHome – Java, Jetty
- MajorDoMo – C++
- Node-RED – Node.js
- Gladys – Node.js
- The Thing System – Node.js
- Pytomation – Python
- 148Avenida HABot
- Home Automation Bus
- 148Avenida Use Case View
- 148Avenida Logical View
- 148Avenida Process View
- 148Avenida Physical View
- 148Avenida Configuration
- Security Configuration
- 148Avenida Developer View
- v2.5.5 Runtime Issues
- Development Setup Issues
- Eclipse SmartHome Framework
- Coding Guidelines
- Eclipse Community
- Framework Utilities
- Package Dependencies
- REST API
- Testing Eclipse SmartHome
- Textual Configuration
- openHAB Installation Packaging
- Eclipse SmartHome
- Home Automation Bus
- Home Automation Control
- IoT Architecture