Monday, December 10, 2018

Linking TP-Link HS100 Kasa WiFi Smart Plugs to your hub

TP-Link HS100 Kasa WiFi Smart Plug, No Hub Required, Works with Alexa Echo & Google Assistant

I got some of these last year as $5 addons and linked them via IFTTT similar to how I did the Sonoff switches. They have been working fine that way but I came across the article Reverse Engineering the TP-Link HS110 today which shows how to control them locally without a bridge or reflashing the firmware. I definitely sounds easily doable from a program if not a script. Someone already did a Domoticz plugin for tp-link HS100/HS110 smartplug in Python. So I'm putting creating a Homeseer version on my todo list. Assuming someone else does not do it first of course.

Saturday, December 8, 2018

The right / best way to control a light.

Given all the flame wars over smart bulbs vs smart switches it seems time to make a post to use in replies. One guy even suggested using both to avoid:

  • People turning off the switch. It should be obvious that even if the switch is smart, if it is off it is off and you can't control the light till you turn the switch on. Covering the switch with something like the Magnetic Switch & Outlett Cover for Toggle Switches ought to make people a think before flipping the switch.
  • Smart bulbs coming on after an outage (they only do this after an outage not a flash). To avoid the power on after an outage all you need to do is put a bulb in an unneeded location and create an event to turn off all or some of your lights if it comes on. Note too the reason these lights come on if the power is cut for about a second is so you can manually override them if other control is lost. Some do have a hidden parameter to turn this off if you really think you need to. Google it. Personally even though I live in the country and have all my computers and AV and network equipment on UPS to handle the flaky electric I've only had the lights get triggered by this a couple times in over a year now so I don't see it as much of an issue.

There really is no point in chaining smart devices and in fact is can cause issues if the smart bulb is Z-Wave or Zigbee in that these are mesh devices and removing power from them means the mesh is regularly disrupted. In the best case this causes lag and in some cases might cause devices to miss commands. Depending on the WiFi bulb it may cause connection issues as well since most of them work via a cloud interface of some sort and disconnecting them will require them to establish a new connection to that cloud to receive commands. Then there is the whole bit about updates which would only be able to install while the the light ia powered. Bottom line these devices are designed to be always on so powering them off for extended times at your own risk.

As for the "right way" to control a light. First off it would depend on the best fit for the env.
Other than a bed room:

  • I would use a motion detector as the primary trigger with voice backup
  • As a secondary I would the dumb switch (with a magnetic cover to avoid accidents) and a timer that shuts off the light after X minutes of it being turned on and/or no motion detected. In many cases this also tied to turn off other devices in the room like a TV.
  • I might use a wall switch or a smart bulb generally dependent on the level of control required. As in a smart bulb if I want to control the bulbs singularly or a smart switch to control a group of bulbs in a room. Just do the math. Which is cheaper to replace the bulb(s) on this circuit or the switch(s). Factor in if dimming or color changing is required of course.
  • If a dimmer is wanted with a single bulb the Hue and Lightify dimmers work great for that and is pretty cheap too. Note the Hue dimmer with bulb bundle is generally a good bit cheaper than the two separately.


For a bedroom or other place where you want more manual control a smart switch is used without a motion detector.

Simple right? Like most of this stuff there is not general "right answer". The best fit is on a case by case basis. Though let me repeat again always try and get devices that work with multiple hubs because it is pretty much a given at some point you will want to move to a new one. Whether is a shutdown like Resolve or Lowes' Iris or issues like SmartThings has been having or incompatibility between version of hubs like Lowes Iris' and SmartThings' V1s and V2s or you just need a feature some other hub has and your current one does not.

Want a second opinion?

Note some of these are a bit one sided and a couple get into Rube Goldberg style options. 

FAQ: Philips Hue and Other Smart Bulbs - What sort of light switches to use with them? (Long FAQ)
Proper way to use both a smart wall switch and smart bulb to control same ceiling light fixture (multi-part question)
5 things to consider before installing smart light switches
Smart Switches vs Smart Lights: Which is best solution?
Which is Smarter: Smart Switches or Smart Bulbs?
Smart Switch vs Smart Bulb: Which Is Best for Your Smart Home

Wednesday, December 5, 2018

Thinking of moving to Homeseer? Things you should know

Don't get me wrong, I think Homeseer is a great solution just not for a first timer. 

The interface is really aimed more at installers than end users but when you get to the point you need for instance multiple Z-wave networks it makes sense to  move to the next level with Homeseer. Before you run out and buy there are a few things to keep in mind.

Coming from SmartThings:

I do find it odd no one has made a plugin to use a SmartThings as a ZigBee bridge for Homeseer. Seems like it should not be that hard to do. I might have to do it myself at some point. Just got about 300 things ahead of that in the queue. Especially seeing as how my SmartThings account is locked out right now due to all the recent Samsung conversion mess. The "temp" IFTTT linkages I setup way back seem to still be functioning for now. In case you didn't know many of the SmartThings sensors and devices will not work with most other hubs. Many are ZigBee based which Homeseer has only limited support for. This is why it is important to get devices with cross hub support as much as possible. Many ZigBee devices, like Hue, also have "hubs" (bridges/gateways) available that allow them to work with many brands of hubs and multiple systems at the same time. Being able to connect to multiple system not only give you multiple control paths should one fail but makes migration easier. For instance if you have Hue bulbs linked directly to a SmartThings hub you need to access them through SmartThings and moving to a new hub, even a replacement SmartThings requires pairing the bulbs all over again. Using the Hue "hub" you just link the Hue "hub" to the new one and you are done. They also tend to give you added features and might help avoid issues.

For anyone else thinking of moving to Homeseer:


  • Get it on sale. The software is 50% off a few times a year. Their hardware is discounted frequently too.
  • Try before you buy. You can download a 30 day trial and run it on any PC. Just get a Z-Stick, download the software and go. If you do not like it you can probably send the Z-Stick back and be out nothing.
  • Do not get Pro. Get the standard version. Most the plugins you will want are not included in the Pro version anyway. The only real advantages to getting Pro are the HSTouch Designer and Z-Seer+ Z-Wave Diagnostics are included which at sale prices Pro might save you around $20. But odds are you will not get to using the designer till you get most of the system setup and you can spread the cost over time. You might never use it, I still primarily use the voice or web interface a couple years in now. Note the HSTouch phone apps work without designer. It just has the default interface. If you decide you want a flashy custom GUI you can always pick it up at the next sale. See my post A quick start for HSTouch Designer for an idea of what using the designer is like. Want to see how flashy you can get check out these YouTube videos.
  • Get the software and a PC instead of their "hubs". Especially if you get a refurb or used PC you get a lot more power for the cost. Even though you might not need it for Homeseer it gives you power to run other things on there as well. Or if you have a PC that is always on and not maxed just use that. For example I'm running on a 4th gen i7 with 19 plugin instances, 4 Z-wave networks, 4 Hue networks, 3 Harmonies among other things. As I'm writing this mine shows 1928 connected Homeseer "devices" (data/control streams not physical things). I also have several external things hitting the Homeseer API updating values. The CPU rarely reaches 24% .
  • Go Windows. I hate Windows but some plugins only work on Windows so if you go Linux you limit yourself. Windows 7 if you can, just to avoid Windows 10 things like updating at the most inconvenient times. Another reason to go refurb / used PC.
  • Get a Z-Net instead of a Z-Stick. You can put the Z-Net anywhere that has WiFi or an network port letting you put it in the middle of your network to reduce mesh hops. Or in an area of high interference. Or my fav another building from the controlling server. Note Homeseer supports multiple Z-Wave networks which work as one.This is the best way to reach other buildings and problem areas. Assuming you are not just doing an eval of course. You could probably send the Z-Net back too if the eval did not live up to your expectations but the price of the Z-Stick is easier to tolerate if you end up not being able to send it back.

Tuesday, November 13, 2018

Added filterable sheet to camera compare

On my Camera spec compare sheet I added a transposed version of the HD cams sheet called HD filterable. It is not as readable as the other given it is over 200 columns by almost 30 rows but it had the advantage of being able to filter the camera models by all the features you are interested in. Just go to the HD filterable sheet and create a temporary filter

Then click on the down arrow of each column you want to filter.
For instance here I selected Brand, Color and Viewing Angle such as
To get a view like this

Monday, November 12, 2018

A quick start for HSTouch Designer.

HSTouch Designer like all Homeseer software goes on sale for 50% regularly so keep an eye out for sales.

There is a fair bit of help documentation online but I found I still needed to sort a few things out on my own.

First issue you might run into is it only seems to work on the Homeseer box. It is unclear why it will not connect to a remote Homeseer instance but seems not to be firewall related as it still fails with the firewall off and the HSTouch client works fine from all my Windows PCs I've tried it on which are supposed to be using the same ports. I also tried various compatibility options that did not help. Given this you probably want to install it on the same computer your Homeseer is on.
UPDATE: a week later I brought Designer up on my Windows 10 box just to look at something and saw the devices were populating so my previous issue might have been some sort of limited glitch that corrected itself with a reboot or upgrade in the last week.

Note too I found a lot of references to a HSTouch server and plugin which appear to be outdated. The server is included these days and does not show as a plugin. Instead just confirm it is enabled by bringing up your Homeseer web interface, selecting Tools -> Setup and then the Network tab. Near the bottom you will see the HSTouch options. Enable it if not already checked and adjust the other options as needed.


Next you need to either start with a template. The Android one seems a good one to start with. Especially if you are using Fire Tablets as consoles as I am. You might be happy with most of what is there and just want to remove a few thing you are not using like cameras or energy. For this example my cameras have their own dedicated consoles and video distribution system and I want an alarm status screen so I will swap that out.

In this case it is simplest to start with a new screen. To add a new screen choose File menu

Add a background by clicking on the screen and then selecting ImageBackground or just set the background color with ColorBackground.


To add a status icon for a device drag a device from palette onto the new screen.
Note in device picker dialog top selector is Category (Location 2 Label) and second is Room Location 1 Label). Only the Room one seems to filter while the other is ignored.

In the properties window click on StatusTrackingNormal and set similar to

Note you can start typing in the drop downs to filter the list. Resize the icon with With and Height properties


I suggest you copy the Appearance-Text property to Identification-Name (Label 084 in pic) to make finding elements easier. For status icons you probably want to set ColorPressed to transparent (top of color list) And remove the text is you are using status graphics located relative to each other.

Here is an example of a mix of icons with text and without.


Once you have a screen you can link it to the main screen. To keep it simple I'm just changing the camera button on the main screen First changing the ImageNormal and ImagePressed images to  Documents\HSTouch\Skins\Tabletop2\Graphics\windowclosed.png. Then change ActionsWhenPressed to go to your new screen. In this case "Alarm".

Here is my almost finished alarm screen.
Any red icon means a warning condition (motion or open door or window) making it easy to see where the problem is even though there is a ton of sensors on the screen with no labels in site. Other than the text status button at the bottom.

Note some of the status icons still need changed. They looks fine in the web interface with value set and no corresponding status icons they seem to default to the right ones. But here the icons chosen when not set seem to be random so you need to make sure each is set.

The background was grabbed from Google maps zoomed all the way in and rotated to fit best on screen.

Note too the back and home buttons. Though really you only need one or the other. Simplest way to add is to copy / paste from another screen.

Saturday, November 10, 2018

Triggering Homeseer from Blue Iris

Using MyMonitor is is more reliable and more automatic than just using trigger URLs but using triggers URLs is quick and simple.

First you need a virtual object to update. An easy way to do this is using the createMonDev method in MyMonitor.vb call it from an event with Parameters of Name,type like
Shot of HS event calling the script

This gets you a device similar to this
Shot of HS object
Note this a full MyMonitor object. If you are just using trigger URLs you only need status for values 0, 3 and 4. Note the ref ID of the object created http://10.10.1.45/deviceutility?ref=5596&edit=1

Now open the camera properties and set action on the Alerts tab for the profiles you use

When triggered
HS_IP/JSON?user=USERNAME&pass=PASSWORD&request=controldevicebyvalue&ref=5596&value=3

When reset
HS_IP/JSON?user=USERNAME&pass=PASSWORD&request=controldevicebyvalue&ref=5596&value=4

Replace the bits in yellow with the value for your setup.


The URLs are set via Configure

Now set the Watchdog URLs
Watchdog triggered (offline)
HS_IP/JSON?user=USERNAME&pass=PASSWORD&request=controldevicebyvalue&ref=5596&value=0
When reset
HS_IP/JSON?user=USERNAME&pass=PASSWORD&request=controldevicebyvalue&ref=5596&value=4


If you want to go the other way (trigger cameras from Homeseer) look at this post in my camera blog

Wednesday, November 7, 2018

Sonoff switch linkage to home automation

Hooking up a Sonoff 4 Gang Smart Switch, Interlock Switch for Generator, Inching/Self-locking WiFi & RF Wireless Switch 90~250V AC/ 5~24V DC,Work with Alexa,& Google Home & IFTTT (1-16s delay in inching mode) to Homeseer.

There are other versions of these switches that these instructions will work for too. The single switch unit bought in packs can be way cheaper than this 4 switch unit but are also AC only. In my case I'm wanting to switch individual cameras connected to a single power supply so the above switch is the way to go. Note unlike most WiFi smart switches, these are all inline units meaning you need to connect wires to them.

The most helpful instructions I found To help save time you will also want to know:

Make sure your phone is connected to the 2.4 GHz WiFi you want the Sonoff unit to use.before adding a new switch to the app. Note in this app, this just works. No need to find and connect to WiFi coming from the unit.

Unless you want it to work in the default, only one active relay at a time mode, you need to change the switches.

Remove power from the unit before changing any switches!

You do not need to take the cover off to connect up the relays. There is a hinged hatch but taking the lid off  might make connecting the wires easier. The connections are of the pinch type so smaller gauge wires may not be held well. In most you are probably using 18 ga though which work fine.

Tools you will need:

To get the lid off so you will need a larger phillips screwdriver but with a thin bit so you can get enough torque to turn the tight screws and fit in the small holes to get to them. Something that looks like this.


There is a film cover K5 and K5 that is hard to see but will need to be removed to toggle the switches. You will probably want a good pair of fine point tweezers for this. If the are not sturdy enough to toggle the K5 and K6 switches you may need something else for that.

The switches are tiny.so you may want some sort of magnifying glasses.

Setting the switches:

The text can be a bit confusing. Such as it will say "Toggle to the right" when the pictures are not all the same rotation.

To set it up to turn off on each of the 4 channels separately and immediately the config you want is:
S6 toggled "right" (toward the LEDs)
remove film cover on K5 and K6 switches.
K5 (mode) and K6 (delay) toggle all the switches to 1, ON (toward the terminals.)

Note the yellow tint to the switches. It is from these film covers. (Photographed through magnifying glass.)

Wiring

Hook up your 12 volt wiring like this

I'm using these cables for the wiring.

Software config

Note if this unit loses power it returns all relays to the off position. So for instance if you are using this as a camera power reset you probably want to reverse the actions as in ON in your home automation is "OFF" / NC on the switch. 
Also note a lag of up to a couple seconds in not unusual going through IFTTT. 

Create Homeseer device

First you will want to create a virtual device in Homeseer like this.



Note it might take IFTTT a few minutes to pick up changes so best of create your virtual devices all up front then wait a bit for proceeding.

Link through IFTTT

As with all such IFTTT linkages you will want at least and off and on IFTTT applet for each direction.

First to control the plug when the Homeseer device changes create and applet like this

To get Homeseer to reflect changes to the Sonoff relays by others create applets like this

Note there are other options out there that involve flashing the single switch unit by soldering a USB port to the single switch board to get local control. With the stock firmware I scanned mine and found there are 0 open ports on the unit so reflashing might be the only way to make these cloudless. Though this blog post seems to say you can control one locally by pointing at a local Node.js server as a bridge. Since I'm mainly looking for a cheap way to repower hung cameras on an infrequent basis it seems more than it is worth. If the Sonoff / IFTTT connection starts playing up like the Etekcity one has been then it might be worth looking into.

Lifx after a year

LIFX Mini White (A19) Wi-Fi Smart LED Light Bulb, Dimmable, Warm White, No Hub Required, Works with Alexa, Apple HomeKit and the Google Assistant

WiFi / Reliability

I bought one of these a year ago to see if it would work better in a area I have where RF devices seem to have issues. Hue bulbs and even Z-wave devices out there  Unfortunately the WiFi is so weak in these bulbs that it is no more reliable than the Hue bulb I had in the same place. Note Hue and WiFi operate in the same frequency range so strength of signal is the main deciding factor between them working reliably. Hue tends to operate at shorter distances but works in a mesh so the distance to the next bulb is more important than distance to the hub. How bad you ask. Here is the signal strength stats for it and a Wyze v2, which has the worse WiFi performance of any IP camera I've tried, sitting near each other. The Unifi Outdoor+ AP is less than 20 feet away though a single interior wall.


It also seems these bulbs can occasionally just lose WiFi connection and have to be setup again to get them back. Adding them back is fairly simple but you probably do not want to have deal with doing it without a serious feature to balance that out. Especially since you are paying extra.

Note after adding mine back in today I noticed there was a firmware update so I attempted update the bulb via the Android app. So far it has failed 4 times over 7 hours even with that 92% signal strength. I tried to get the Windows app too but it seems to be hanging at install. That might mean there are Lifx server issues. The bulb does seem to work fine from the Android app but not Homeseer till I also restarted the plugin.

Price

A 4 pack of Hue white bulbs will run you around $40 to $50.

As I write this the Mini White I have is going for $25 each. Even the cheapest used price is $14 so cost is not really a pro.

Oddly however if you want off white, LIFX Mini Day & Dusk (A19) Wi-Fi Smart LED Light Bulb is running a dollar cheaper right now.

I also thought about getting some of their LIFX + (BR30) Wi-Fi Smart LED Light Bulb with Infrared for Night Vision, Adjustable, Multicolor, Dimmable, No Hub Required, Works with Alexa, Apple HomeKit and Google Assistant bubs. In 4 packs they can be had for about $60 per. Last year they dropped as low as $46 per in a 4 pack. Still though unless you need color it is a hard sell given IR floods like the Univivi Infrared Illuminator, 850nm 6 LEDs 90 Degree Wide Angle IR Illuminator Night Vision,Waterproof LED Infrared Light IP Camera,CCTV Security Camera go for $23. If you are wanting color outdoor lighting though Lifx is competitive even if you do not need IR illumination. As a white flood / IR combo though a Z-wave switch on regular floods and adding the above IR flood would seem to be the most cost effective and reliable solution. Especially if you already have a home automation hub.

Saturday, November 3, 2018

Homeseer status pages

One of the cool things about Homeseer of the status pages.

There is a quick overview video on YouTube.

Tricks 

Watch the cursor carefully. Both icons and windows can be resized and moved.



Right clicking on an icon will get you these options
Right clicking in a window gives you these background and title options.
Lastly right clicking in the page background allows you the change the background behind the windows.

Tricks to make alignment easier. 

Default alignment can be way off so you have to go into edit mode and expand the window to find the icons. Somethings to multiples of the screen height. If you can not see all the icons in a window, drag the window as high on the pags as you can then drag the lower right corner of the window off the bottom of the screen. You should not get a scroll bar on the page. Scroll down. Repeat till all icons are visible in the window. Getting all the icons repositioned one by one can be a slow and tedious process. So far I have not found anyway to speed this up.

To move an icon a long vertical distance click and hold it while using the scroll wheel to scroll the page back up to where you need to place it. Note the icon will not redraw till you move the mouse. Move the mouse side to side to see where you are. Note page up, page down, home and end keys also work. Try them to see which works best for you.

Drag the icon all the way to the left. It will stop at the edge of the window.

With two windows aligned side by side and you can use the the special cursors near the edge to help align them vertically to each other.as well.
There is a faint border around each icon but as you can see above it is almost impossible to see. If you can make them out though alignment can be quicker and more precise.

Be sure to click exit edit mode before leaving the page or risk losing your changes.

Just using icons you can stuff a ton of info into a very small space. For instance here is my page showing all data for my 17 UPSs.

UPS status display

Or if you use MyMonitor linked to Homeseer you can get a display like this which echos the MyMonitor GUI.
Here is my alarm setup

Thursday, November 1, 2018

Etekcity WiFi Smart Plug

Test Etekcity WiFi Smart Plug, Voltson Mini Outlet with Energy Monitoring (2-Pack), No Hub Required, ETL Listed, White, Works with Alexa, Google Home and IFTTT

So far have not found an API to allow Homeseer to talk to them directly though you can easier connect them via IFTTTNote however I found I needed to reconnect IFTTT to Etekcity at least once so far to get things working again even though no errors seemed to be reported anywhere in the chain. So a heartbeat system might be in order.

Update: 

I did find this sample code for control via Python you might find useful for creating a plugin or bridge. There is no documentation I could find for this API and the examples people have posted seems to vary some but I was able to use it to create a Homeseer VB script documented at the end of this post. While still cloud based it is working as I write (update) this while the IFTTT still appears to be broken over 2 weeks past my original post.

Create Homeseer device

First you will want to create a virtual device in Homeseer. Since this maker supports state change triggers for off. on, online and offline make it dimmable 

and with and status values like this.

Link through IFTTT

Note it might take IFTTT a few minutes to pick up changes so best if create your virtual devices all up front then wait a bit for proceeding.

As with all such IFTTT linkages you will want at least and off and on IFTTT applet for each direction. In this case we will also want a 5th applet to send offline notices back to Homeseer.

First to control the plug when the Homeseer device changes create and applet like this

To go back the other way create on like this

Note about the time I started writing this the IFTTT Etekcity linkage seems to have quit working. Checking back a week later it is still not working.


The hidden API way

As mentioned above I found a very few posts claiming "direct control" (still through Vesync servers) of the plugs. Many refer to hosts and ports that seem to be incorrect or no longer active. But I did get this sample code for control via Python to work.

While you can install python and required modules then modify the scripts to be called from Homeseer events (I did this as a test) you lose logging and remote editing options so I did the work of converting it to VB. vesync.vb us pretty much standalone but I keep all my logins in a seperate file to make sharing easier.

To leverage the above objects in GUIs I created on and off events triggered state change of the matching virtual object (see above). They should look something like this

Lastly add a reset event

Then you can add a rest event to tie it all together. Note since this controls the virtuals and the virtuals trigger controls this works with the IFTTT, API call method or both. My reset events look like this.

Note for triggers I'm using MyMonitor to set Homeseer virtuals based on state info from Blue Iris. You could also use the Blue Iris Plug-In by Highpeak Software plugin. I have multiple Blue Iris servers though and the Highpeak plugin only supports one. Also MyMonitor can run on a seperate PC which can be helpful if load or number of plugins is an issue. Plus of course MyMonitor lets you monitor about anything accessible from the network and it is open source / free to use.

Wednesday, October 10, 2018

Interesting contrast to 4 years ago.

Funny I shared this article on Facebook 4 years ago when feeling depressed at the phone and cloud centric home automation then. Interesting to read again in light of the voice and cloud centric home automation we see now. Though SmartThings has been moving away from the cloud most have not and the voice interfaces are being marketed as "home automation" even though they are basically just remote controls.  Four years ago was also before I scrapped my Veras and upgraded to Homeseer which pretty much ticks all the boxes. The only real missing bit for Homeseer is Zigbee support. Though between Hue and SmartThings hubs that can be linked into Homeseer as well. Plus there are very few Zigbee devices that are not available in Z-wave and or WiFi versions these days.


Monday, October 1, 2018

Wanting to monitor your fridge / freezer?

For fridge / freezer monitoring this Wireless Tag is definitely the way to go.   They also give you motion alerts, talk to about anything, cheap compared to most and will even give you verbal alerts in a browser.

There is both a simple interface for things like basic notifications


And a scripting interface called Kumo Apps that lets you do even more and call local URLs making it easy to interface with home automation like Homeseer. There are lots of templates to get you started.

Here is an example of how to send the data to Homeseer
var tags = <#tags_[12|13|26|32|52|62|72|21]_N#>;
tags.forEach(
function (tag) {
tag.updated = function () {

//KumoApp.Log("Updating:"+tag.name);
if(tag.name === "Comp Rack 0"){
 KumoApp.httpCall("http://10.10.1.45/JSON?user=USERNAME&pass=PASSWORD&request=controldevicebyvalue&ref=3121&value="+(tag.batteryVolt / 3.2),"GET");
 KumoApp.httpCall("http://10.10.1.45/JSON?user=USERNAME&pass=PASSWORD&request=controldevicebyvalue&ref=3122&value="+(tag.moisture),"GET");
 KumoApp.httpCall("http://10.10.1.45/JSON?user=USERNAME&pass=PASSWORD&request=controldevicebyvalue&ref=3123&value="+(tag.eventState),"GET");
 KumoApp.httpCall("http://10.10.1.45/JSON?user=USERNAME&pass=PASSWORD&request=controldevicebyvalue&ref=3126&value="+(tag.rssi),"GET");
 KumoApp.httpCall("http://10.10.1.45/JSON?user=USERNAME&pass=PASSWORD&request=controldevicebyvalue&ref=3124&value="+(tag.temperature * 9 / 5 + 32),"GET");
}


How well do they work?

I've been using them for years and on a whim stuck one in the fridge and another in freezer last February along with a AcuRite 00782A2 Wireless Indoor/Outdoor Thermometer (outdoor module in freezer). They stayed close to each other in readings. Note battery life is reduced by the cold. Freezer one lasts only about 3-4 months. Generally they last closer to a year.

You will need a hub "Ethernet Tag Manager" for them to talk to but it is low cost too.

Note though I have had no luck with the Wireless Water/Moisture Sensors The soil moisture never worked and even the temp sensors seem erratic in the new ones. Plus the batteries are not replaceable like the indoor models.

Also if you start seeing random false motion alerts it probably means the battery is about ready to be changed.

Monday, September 10, 2018

Monitoring: the often overlooked automation.

What do I mean by monitoring

Being able to control things like your lights, TV excreta with your voice is nice and seems to be enough for a lot of people. At least till they discover a few well placed sensors with turn those lights off and on automatically. That is making the jump from remote control to automation and in a way could be considered monitoring but is not what I'm referring to. Simple monitoring would be like:

  • What I posted in UPS monitoring to tell me if a UPS monitor is offline.
  • Having IFTTT update a Homeseer virtual timer that triggers an alert if your Fitbit has not posted sleep in over 30 hours to monitoring the system itself. 
  • Having a smart plug power a cycle a camera that has dropped offline for several minutes

Stuff breaks, crashes or batteries simply die. In the case of batteries they might die while the system is still reporting them as good. Unless you are watching for missing data you might not know it is missing until you try and use the data or the control it is linked to.

My ChkSensors.vb script

Inspired by the BLRadar Plug-In for HomeSeer I wrote simple script ChkSensors.vb that is called hourly and looks at any Homeseer device object not in an ignored location and has the HomeSeerAPI.Enums.dvMISC.SET_DOES_NOT_CHANGE_LAST_CHANGE flag unset. The HomeSeerAPI.Enums.dvMISC.SET_DOES_NOT_CHANGE_LAST_CHANGE flag when set only updates the Last Change value if the value is changed from the previous update. The rub of course is that while many hardware devices update all values at the same time not all so and some plugins even set the HomeSeerAPI.Enums.dvMISC.SET_DOES_NOT_CHANGE_LAST_CHANGE flag during updates so those need to be ignored.  Currently my script is checking 449 of my 1788 "devices". Note a device in Homeseer is data stream or control so an Aeon 6in1 sensor for example is 8 Homeseer devices.

That may not seem like much but it covers all my Z-wave, Hue and Harmony devices along with several things monitored via Ethernet / WiFi. For example My alarm panel is seen by Homeseer as 19 devices. 16 zones and 3 other devices. In know "Root" and "Partition 1" change every time I open a door or change modes so that will happen at least a few times a day. Even if I was out of town someone would have to come feed the animals. Anyway that means I really only need to monitor 1 device to confirm Homeseer and the alarm are still talking to each other.
You will notice the script tags the devices (not in ignored locations) that it is not monitoring with a  which is a bit of a hack but makes it easy to know which devices have the flag set without having to open them up. Especially since, as mentioned above, some plugins force that flag unset.
There to you will notice with the Aeon 6in1 above I'm monitoring only Humidity, Luminance, UV and Temperature. Root nodes on Z-wave devices never seem to update. UV never reaches this sensor so it is never sent. Motion and tamper are not monitored because the location is were there should not be any animals and I want to alert me is any get in there. Hence the motion and Home Security devices should not update unless there is a problem.

Note too the script checks devices at 3 age levels. Anything not ignored over 48 hours old, any in the chk24 group over 24 hours old and anything in the chk1 group over 1 hours old.

Reporting

If a device is found to be last updated too long ago has its current Location2 (called Category in my system) saved to the device's UserNote field before setting its Location2 to offline. This makes listing all the devices that need looked at simple. The last thing the script does if there are any devices found offline is to give you a verbal warning. Assuming warnings are not muted. See SayIt.vb. What you get is something like this
To give some examples the Laundry door sensors tell me for some reason I have not opened that door in 24 hours which is odd but not a big deal. Same UPSBox_DC_Sensor_chan4 not getting triggered since yesterday when I went out get a package. Again normally I open the box each evening when filling the south feeder but yesterday it was raining so I skipped it. The WirelessTag ones though are an issue. And a very strange one at that. Looking on the server all the data is there and no errors are in the logs. Even stranger there appears to be no pattern to which data is getting updated and what is not. I have 8 tags linked. Each has 4 data streams (plus battery level which has never worked for some reason). This happened once before. Then tags 0 and 2 were not updating. Rebooting the WirelessTag hub did not help but repowering it did. This time 0 and 1 are the only ones updating. Worse yet only the temp of tag 1 has updated since I repowered this time.
There was an exception in the logs this time at 9/8/2018 at 5:06 PM but nothing before or since which makes me suspect the hub is going out. Though it might be a bad update from what I see here.

Want some more examples of why you might need monitoring?

Last week my Rachio got knocked offline by a storm. It shows in the list. I reboot it and all is well. Better than finding when wondering why the plants are wilting.

Today I had an alert for the north lights in the barn. A Z-wave wall switch. A quick check and I found the breaker had tripped. Better than finding by needing to see in the barn and not having lights that work.

An event example in case you need

If you have read this far you probably already know how to trigger this from an event but in case you are not that deep in the woods yet here is what the event looks like.

Helper methods

There are a couple other helpful things in that script as well to simplify life. For example
fixFlagsByType lets you set the HomeSeerAPI.Enums.dvMISC.SET_DOES_NOT_CHANGE_LAST_CHANGE flag on any device in offline by passing it part of the type name. For instance any BLOnkyo Plug-in device
fixFlagsByRoom does similar by room (dv.Location)

initFlags unsets HomeSeerAPI.Enums.dvMISC.SET_DOES_NOT_CHANGE_LAST_CHANGE flag on all devices not in the filtered locations to get you started.