Tuesday, February 28, 2017

Smart Home systems using zwave technology


Install Considerations

Light/Lux sensors
If you're going to sense light levels in the same room where you switch lights on and off then consider that light levels can obviously change depending if lights are on or off. You may want to make some conditional and additional checks depending if night/day, lights are already on or off etc before reading lux levels and determining what to do before hand as you may end up having your lights oscillating on and off by them-selves.
eg...

  • light level low, turn light on
  • light level high, turn light off
  • light level low, turn light on
  • etc
  • etc
You don't want that!
Consider NOT mounting the lux sensor too close to the lights being controlled.
Think about sensing light levels outside to determine whether to switch inside lights.




AEOTEC 4-in-1 sensor

Model: DSB05-ZWAU (921.42MHz)


Motion
Once motion has been sensed it will not be able to re-sense again until a time-out period has lapsed. I can not remember the factory setting but it's an amount somewhere in minutes!!! Often far too long to be practical.
For setting  the above setting using the Veraedge controller, I had to go to the device options. Look for the timeout variable and enter your desired setting.
Remember, the device will need to be awake for the setting to be set. See "Setting device options" under the documentation for the Vera Edge

Sensitivity is set using an adjuster behind the battery compartment.

Wake-up:
A click longer than about 2 seconds then release seems to wake the unit up so it can accept receiving your user programmable parameters.




AEOTEC 6-in-1 sensor


Model: ZW100-8 (921.42MHz)

Settings button:
After inserting batteries etc, put the back lid back in place. There is a button under this lid and it's not intended to be pressed directly.
In one corner of the lid is an indentation. The idea is that you push here with a pointy object to activate the button beneath. In my experience it is best not to use a sharp object as you risk puncturing a hole right through the plastic like I did. The button can easily be activated just by pressing with your finger or thumb!


Factory reset:
Keep the button pressed for about 20 seconds to reset the unit. Eventually you will see the LED change smoothly from one color to the next, the perfect indication that a factory reset has just taken place.

Include mode:
A brief click puts the unit into include mode.

Wake-up:
A click longer than about 2 seconds then release will wake the unit up so it can accept receiving your user programmable parameters.

Repeater:
Yes these units can be used as a repeater but to do this you must power the device via it's USB port.
That means, exclude the device from the controller if already powered by batteries, then re-power the device via its USB port then re-include! Obviously you'll then need to re-set your own parameters for your application. By re-powering the device from a factory reset/exclusion means the device to automatically assign more appropriate config settings to accommodate.

Motion:

Once motion has been sensed it will not be able to re-sense again until a time-out period has lapsed. For this model, the minimum time-out is 10 seconds! Settings less than this will fail to be written to the device! I spent hours on this trying to set a period of 5 seconds, agh!!!
For setting  the above setting using the Veraedge controller, I had to go to the device options and add a configuration setting
When you add a configuration setting you get a row of columns with 4 fields. You need to look up the variable fields in the device documentation somewhere. See example that enables a re-trigger of motion after 10 seconds.
The variable 3 I think can include a comment if you enter for example 3-blahBlahBlah. I have not tested that yet!

Configurable settings variable Data size Desired value Current value Delete buttons
3 2 byte dec 10 10 X (Delete this row)

Remember, the device will need to be awake for the setting to be set. See "Setting device options" under the documentation for the Vera Edge

Sensitivity can be set using the same technique.

Manually wake the device
Press and hold the button for about 2 seconds and release. When the device is awake it's programmable config options can easily be set without waiting for devices to wake up naturally.




VeraEdge

Factory reset
You can hold the rest button on the side for about 30 seconds to factory reset. This will reset all configurations and wipe your included devices etc...

Home / Away / Night / Vacation       modes
Where you configure mode presents, seems best not to set who will get notifications here else you will get repeatedly bombarded with these. Example... when sensor sensed motion, when sensor stops sensing motion... etc etc
You can set scenes to notify anyway and it seems you only get one notification per event which is what we want. Not multiple!

Recording what cameras see
02 March 2017:
First things first, the Vera Edge as I see it, DOES NOT record video but rather a series of single snapshots. As my cameras do not seem to be fully compatible, I can NOT confirm this fully.

My foscam cameras do not seem to be fully compatible according to the features and instructions that I have read in the documentation thus far. Mainly, the cameras will not record for the given time of 15 - 20 seconds when set to do so! It will take a single snapshot however... regardless if I set system to record the 15-20 seconds or to take a single snapshot
More often than not, with a single snapshot, it is possible that the subject that caused motion to be sensed and therefore a photo to be grabbed from the VIDEO camera... will not be caught in the photograph. This is because my motion sensor can pickup movement before the subject moves into view of the camera.
My work around is this...
  • Create a scene with an action that simply takes a single snapshot immediately
  • Add another action that takes another snapshot 1 second later
  • Add another action that takes another snapshot 2 seconds later
  • Add another action that takes another snapshot 3 seconds later
  • etc
  • etc
  • Then finish off the scene in the usual manner
This for me is working well! With this technique you end up getting a cluster of still photographs.

Note:
Viewing the camera thumbs within the GUI in UI7 is just hopeless. Far too small with only a maximum of 12 snapshots per page. It is best to use your smart phone app for this!

Setting device options
You can enter your desired values here and save the changes. If the variable you want to change within the device is not show, you can simply add it.
When you add a configuration setting you get a row of columns with 4 fields. You need to look up the variable fields in the device documentation somewhere. And see which values are available that you want to set.
Example...

Configurable settings variable
Data size
Desired value
Current value
Delete buttons
3
2 byte dec
10
10
X (Delete this row)


Save your changes!
Settings will be sent to the device.... eventually.  If the device is not awake, then the setting will be written when the device wakes up. This could take a while... minutes!!!!
Better to look for documentation for your device and find out how to manually wake the device. Then set your config options until your done!
Note:
Device > Advanced > Commands-tab > [Configure node right now]
Will send the setting to the device immediately if the device is awake!

Adding devices to custom-named-rooms
03 March 2017
For sub devices...  example....
An AEOTEC 6-in-1 sensor is 6 devices in 1. One of the devices however is what I would call the master device and the remaining devices sub devices. As of this the day the Vera does not allow me to assign one of the sub devices to a room other than the same room as the master device. While the system does actually allow me to do it AND the results show on-screen... after a browser re-fresh????  your changes are messed up. Keep this in mind.
Most multi-devices will be in the same room but you have occasions where it would be nice to split them into different rooms.
Example.. I have a double switch behind a wall-plate with two switches exposed. One switch is for a light in the same room as the wall plate while the other switch is for the light  on the other side of the wall (outside the house). In this circumstance I simply can not assign each switch to different rooms. In my case an inside room and outside!



Open Zwave


04 March 2017:

My system...
Windows 10
AEOTEC Z-Stick Gen5. Model: ZW090-B(921.42MHz)
Visual Studio Community 2015

Download the code from github. URL...
https://github.com/OpenZWave/open-zwave

You will end up with the file...
open-zwave-master.zip

Extract this somewhere. You'll end up with the folder...
open-zwave-master
Inside this folder is another folder of the same name. Take a copy of the internal folder and put it in your Visual Studio Project folder.

Go into folder....

YourProjectsFolder/open-zwave-master/dotnet/examples/OZWForm/build/vs2010

and take a copy of the solution and project files and paste these copies into the src folder.

eg...
yourProjectsFolder\open-zwave-master\dotnet\examples\OZWForm\src

Launch Visual Studio and open the solution file.

Visual Studio may ask you to upgrade the solution. Go ahead and say yes and load up the application.

Run the application.

Visual Studio may state that the projects are out of date. Go ahead and go with the suggestion to update them by building them.

Sit back and wait for the build to complete.

If successful you'll get a form window open up.

If you already have your z-stick plugged in AND you have fluked the coms port for it, you just might see the form get populated with previously-added devices. Including the stick!

If your not getting any activity do the following..

  • Stop the app.
  • Go to Windows Device Manager and check which Com port the stick is attached to. Disconnect and reconnect while observing.
  • Make a not of the Com port.
  • Head back to Visual Studio and load up the file...   MainForm.cs
  • Search for... m_driverPort
  • Edit the Com port to reflect the actual port that the zstick is attached to.
  • Re-run the application. Hopefully you will now get a list of devices...
Good luck!

You can also get the code from the openzwave website...


10 March 2017
I've just upgraded to Visual Studio 2017.
All of the above is the same except you'll get a compile error and it won't run.
The solution for me was to right click on each of the other two projects...

  • OpenZWave
  • OpenZWaveDotNet
and choose...
Retarget Projects

Then all worked as per normal.






No comments:

Post a Comment

Kotlin (Programming language)

Todo