Copy

Home Control Assistant Newsletter for January 10

Have you looked over the version 17 release notes? Lots of changes that you can incorporate into your designs right away. Easy upgrade.

Looking for answers to the most common questions about HCA? Check out our
Frequently Asked Questions page.
 
Never assume
I’ve been working with an HCA user to create programs for monitoring environmental conditions in a greenhouse. To do this we are using three multi-sensors managed by Hubitat. These report all sorts of conditions, but I’ll focus in on temperature. You might assume that determining the inside temperature is straightforward: Just take the average of the three sensor temperatures and you are done. Well, no, not if you want to do a good job.  As I was building this, I realized that for a good job I must consider some potential problems.

Is there reported data for each sensor?
These sensors are nice because they auto report when conditions change. To make this work they must be powered by a USB power widget, but we can do that in this case. The implementation of HCA and Hubitat uses “tags” to hold the various sensor values as they are reported. The first problem to consider is that maybe the sensor didn’t report temperature. That is, there would be no “HE_Temperature” tag. We need to check for that.


Is the sensor data current?
Second issue is to check if the last reported temperature is reasonably current? Maybe the sensor has died, and the last reported temperature value is too old to be valid. We don’t want to make decisions based upon old data. The Hubitat package records the date and time of the last report, and we can test that.


Do the sensors agree?
While having three sensors provides redundancy in case one stops working, what if there is a disagreement between what the sensors report? What if one is producing false data? We should check to see if they all are reporting within a few degrees of each other.


Because of this good implementation we can alert – send a message to the greenhouse owner – not only if the temperature goes out of range, but also if a sensor has stopped reporting or if a sensor appears broken. Also, this handles two other possible failures. Maybe the sensors are all working but the Hubitat itself has died. In that case the test for recent data catches that. Or that the sensors and the Hubitat are working, but the connection to HCA is no longer active. Again, the check for recent data catches that.

The bottom line in all this is “Never Assume”. To create a robust system, expect that any form of communication could fail. Any time you send a message you must have a way of giving up after an interval and do something when that happens. Whenever receiving data from outside your system try to create an implementation that handles that data not being formatted as you expected.

You can see both problems handled in the programs that implement Hubitat. Each HTTP operation handles a timeout condition. Each time data that is expected to be in JSON format is processed, the case where it isn’t in that format is handled.

You want your automation to be there 24/7 and handling all conditions. Spend the time up front to deal with what you expect and what you don’t expect.

(“Never Assume” is also a famous line from one of my classic movie favorites. Gold star to anyone who can tell me the movie).

 
User-to-User forum

An HCA User who wanted to set up a forum for user-to-user communication. I'm passing this on, but please know that this is not a HCA company project and I will not be spending much time there so I don't know how this will work out. Here is a link to what he set up.


https://www.reddit.com/r/HomeControlAssistant/

 
Want to take the next step in automation? Want to get started with Amazon Alexa and Google Assistant and control HCA by voice commands? Even if you are a long-time user of HCA, the Getting Started guides have all the info you need on client-server, mobile applications, DDNS, and voice assistants.

All of the
Getting Started Guides are available on the support website.
 
Copyright © 2021 Advanced Quonset Technology, Inc, All rights reserved.


Want to change how you receive these emails?
You can update your preferences or unsubscribe from this list.

Email Marketing Powered by Mailchimp