Domoticz testing as alternative to Vera Controller

In this subforum you can show projects you have made, or you are busy with. Please create your own topic.
gerardosamara
Posts: 22
Joined: Sunday 23 October 2016 19:49
Target OS: Raspberry Pi
Domoticz version: 3.5837
Contact:

Domoticz testing as alternative to Vera Controller

Postby gerardosamara » Sunday 30 October 2016 1:52

Hello ,

I have in mind in the future to migrate my Vera controllers (1 x VeraLite and 1 x VeraEdge in production + 1 x VeraLite for testing) to Domoticz so my primary goal is to first evaluate the Domoticz solution using a Win10 PC as I do not have a RPi .

The hardware configuration used for the test is based on the stable version 3.5.5837 installed on a Windows 10 PC with an USB300 ESP3 EnOcean dongle , an Arduino UNO MySensors serial GW and a Vera Controller as Z-Wave dongle.
Now it is the time to test Domoticz on the Rpi 3 platform with :


1) Domoticz sofware installation & Setup (RPi 3 platform)

- 25/12/2016 : Availability of the RPi3
- 25/12/2016 : Raspbian Jessie (+ ssh file for ssh activation) sur carte SD Kingston 8GO 45Mb/s
- 26/12/2016 : Rpi3 boot and login via Putty
- 26/12/2016 : Installation of Domoticz version 3.5877 stable (sudo curl -L install.domoticz.com | bash)
- 27/12/2016 : Setup of Domoticz ( fixed IP , rasp_config , mail , pushbullet notification , backup)
- 27/12/2016 : Setup RAM drive of 10M in /etc/fstab for future Domoticz log (./var/log)
- 28/12/2016 : Installation of Domoticz Lite Android App version 0.1.343
- 02/01/2017 : Installation of the Imperihome GW "MyDomoAtHome" :

    - nodejs version 0.10.29 outdated in raspbian jessie .
    - Installation npm version 2.15.11
    - installation nodejs version 4.2.2
    - installation MyDomoAtHome GW version 0.2.7
03/01/2017 : Integration of ImperiHome V2.8.5 with "MyDomoAtHome" GW
04/01/2017 : Setup system Sonos Player1 in ImperiHome App ( not in Domoticz)
04/01/2017 : Virtual sensor UPS management (Input.Voltage)
11/01/2017 : Virtual sensor UPS management ( Battery.Voltage)
14/01/2017 : Installation Zwave+ controller Aeotec Z stick Gen5 added (ZW090) - OpenZwave Version: 1.4-2228-gbce4a88-dirty
20/01/2017 : Installation smart switch DSC24 Gen2 (Ok in app Domoticz Lite and Imperihome )
31/01/2017 : Setup of Security Panel ie House Mode ( ok in app Domoticz , only display of security panel in Imperihome as described in PR#3)
06/02/2017 : Setup of Motherboard Sensors hardware and creation of Rpi devices CPU usage , Internal temperature , Memory Usage , Hard Disk usage )
09/02/2017 : "House Mode" blocky managed by security panel in order to have an alarm/automation system setup according presence in the house
18/02/2017 : Installation of the SQLite manager ( SQLite Expert Personal ) and sqlite3_analyser.exe tool

2) ToDoList

- Test Scène avec Lua
- Test House mode
- Geofence
- Events using Blocky
- Events using Lua
- Sonos Player1
- MySensors Serial GW (Arduino)
- Caméra IP
- IR remote control
- Zwave+ device multi-sensor FGMS-001
- Availability of EnOcean devices
- Availability of weather sensor
- Availability of MySensors devices
- Availability of Utility sensor
- Availablilty of IR remote control
- Script speedtest


3) Bug closure :
    - PR#1: Node Js version 0.10.29 outdated in Raspbian jessie
    - PR#2 : Nut log error "raspberrypi kernel: [79755.044507] usb 1-1.5: usbfs: USBDEVFS_CONTROL failed cmd blazer_usb rqt 33 rq 9 len 8 ret -110" about every 5s
    - PR#3 : Missing alarm panel part in the github TODO list (house mode change). Only the display of the status of the Domoticz alarm panel is supported , impossible to change the alarm mode ).
    - PR#5 : "Normal" status in the Domoticz security panel to be changed to "Disarm"

Last edited by gerardosamara on Sunday 19 February 2017 17:02, edited 112 times in total.
Domoticz RPi3 V3.5877 + App Android Domoticz Lite V0.1.343 & Imperihome Pro V2.8.4
Zwave+ Z Stick Z90 USB dongle + USB300 Ocean GW dongle + Arduino Serial GW
Smart witch Aeotec DSC24 Gen2

gerardosamara
Posts: 22
Joined: Sunday 23 October 2016 19:49
Target OS: Raspberry Pi
Domoticz version: 3.5837
Contact:

Re: Domoticz testing as alternative to Vera Controller

Postby gerardosamara » Tuesday 01 November 2016 18:11

Domoticz screenshots

Domoticz dashboard

Dz_dashboardsecurity panel.png
Dz_dashboardsecurity panel.png (127.59 KiB) Viewed 165 times
Last edited by gerardosamara on Wednesday 01 February 2017 1:41, edited 6 times in total.
Domoticz RPi3 V3.5877 + App Android Domoticz Lite V0.1.343 & Imperihome Pro V2.8.4
Zwave+ Z Stick Z90 USB dongle + USB300 Ocean GW dongle + Arduino Serial GW
Smart witch Aeotec DSC24 Gen2

gerardosamara
Posts: 22
Joined: Sunday 23 October 2016 19:49
Target OS: Raspberry Pi
Domoticz version: 3.5837
Contact:

Re: Domoticz testing as alternative to Vera Controller

Postby gerardosamara » Sunday 06 November 2016 18:28

HARDWARE CONTROLLERS

VeraLite Zwave controller

A spare Veralite is available for use as a Zwave controller with its zwave devices shown as virtual sensors.
The configuration required is Vera as Master and Domoticz as Slave in order to get informations froms devices like sensors , power switch etc
The current limitation is that no action can be sent to Zwave devices like wall switch etc. ( http://www.domoticz.com/wiki/VERA )
This hardware is unusable for a production application

Hardware : Aeon Labs Z-Stick Z-Wave Plus Gen5 ZW090-A

An USB Z-Stick Zwave Plus has been added to support zwave devices

13/01/2017 : Aeon Z-Stick Zwave Plus received

2017-01-14 16:13:44.188 OpenZWave: Starting...
2017-01-14 16:13:44.203 OpenZWave: Version: 1.4-2228-gbce4a88-dirty
2017-01-14 16:13:44.203 OpenZWave: using config in: /home/pi/domoticz/Config/
2017-01-14 16:13:44.442 OpenZWave: Driver Ready
2017-01-14 16:13:44.458 OpenZWave: All Nodes queried


Hardware : EnOcean USB300 ESP3 dongle

04/01/2017 : USB300 integrated in hardware section

2017-01-05 02:33:27.033 EnOcean: Using serial port: /dev/ttyUSB0
2017-01-05 02:33:27.034 EnOcean Send: 55 00 01 00 05 70 08 38
2017-01-05 02:33:27.034 EnOcean Send: 55 00 01 00 05 70 03 09
2017-01-05 02:33:27.109 EnOcean: 02 (05/01) 00 FF F1 93 00 0A
2017-01-05 02:33:27.109 EnOcean: Transceiver ID_Base: 0xfff19300
2017-01-05 02:33:27.309 EnOcean: 02 (21/00) 00 02 08 02 00 02 04 04 00 01 85 E3 26 45 4F 01 03 47 41 54 45 57 41 59 43 54 52 4C 00 00 00 00 00
2017-01-05 02:33:27.309 EnOcean: Version_Info, App: 02.08.02.00, API: 02.04.04.00, ChipID: 01.85.e3.26, ChipVersion: 45.4f.01.03, Description: GATEWAYCTRL
Last edited by gerardosamara on Sunday 15 January 2017 0:27, edited 2 times in total.
Domoticz RPi3 V3.5877 + App Android Domoticz Lite V0.1.343 & Imperihome Pro V2.8.4
Zwave+ Z Stick Z90 USB dongle + USB300 Ocean GW dongle + Arduino Serial GW
Smart witch Aeotec DSC24 Gen2

gerardosamara
Posts: 22
Joined: Sunday 23 October 2016 19:49
Target OS: Raspberry Pi
Domoticz version: 3.5837
Contact:

Re: Domoticz testing as alternative to Vera Controller

Postby gerardosamara » Wednesday 04 January 2017 22:45

HARDWARE DEVICES

Smart switch DSC24 Gen2
Last edited by gerardosamara on Thursday 02 February 2017 0:05, edited 3 times in total.
Domoticz RPi3 V3.5877 + App Android Domoticz Lite V0.1.343 & Imperihome Pro V2.8.4
Zwave+ Z Stick Z90 USB dongle + USB300 Ocean GW dongle + Arduino Serial GW
Smart witch Aeotec DSC24 Gen2

gerardosamara
Posts: 22
Joined: Sunday 23 October 2016 19:49
Target OS: Raspberry Pi
Domoticz version: 3.5837
Contact:

Re: Domoticz testing as alternative to Vera Controller

Postby gerardosamara » Tuesday 10 January 2017 20:39

VIRTUAL DEVICES

Virtual switch es"UPS input.voltage" and "UPS battery.voltage"

To read the input voltage of the UPS using nut ( to monitor the stability of input AC from electricity company
To read the battery voltage of the UPS using nut ( to monitor the load of the battery)

Installation of nut in Rpi (UPS manager)
    - installation usbutils
    - installation nut
    - configuration nutclient in /etc/nut/nut.conf file (mode=standalone)
    - configuration of the UPS Forza SL-761 in /etc/nut/ups.conf file (driver = blazer_usb)
    - test of the UPS bash script : sudo upsc Forza_UPS
- create virtual sensor ups in Domoticz
- create bash script "/home/pi/domoticz/scripts/ups.sh" to read UPS data and upload to Domoticz UPS virtual device (cron 5 mn)

--- bash script ups.sh ------

#!/bin/sh
# Settings
DOMO_IP="192.168.1.xxx" # Domoticz IP Address
DOMO_PORT="8080" # Domoticz Port
UPSINVOLT_IDX="1" # Virtual switch UPS INPUT VOLTAGE
UPSBATVOLT_IDX="2" # Virtual switch UPS BATTERY VOLTAGE
LOGIN="xxxx"
PASSWORD="yyyyy"
UPS_INVOLT=`upsc Forza_UPS 2>&1 | grep -v '^Init SSL' | grep 'input.voltage:' | awk '{print $NF}'`
UPS_BATVOLT=`upsc Forza_UPS 2>&1 | grep -v '^Init SSL' | grep 'input.voltage:' | awk '{print $NF}'`
#echo $UPS_INVOLT
#echo $UPS_BATVOLT
# Upload to Domoticz
curl "http://$LOGIN:$PASSWORD@$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$UPSINVOLT_IDX&nvalue=0&svalue=$UPS_INVOLT" > /dev/null 2>&1
curl "http://$LOGIN:$PASSWORD@$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$UPSBATVOLT_IDX&nvalue=0&svalue=$UPS_BATVOLT" > /dev/null 2>&1

------------

Security panel

The alarm panel is on the TODO list of the MyDomoAtHome . It is partially supported ( it means display the status of the Domoticz alarm panel but no change Arm Home , Arm Away , Disarm).

There is a work around proposed by @mlamie.

1) Under setup - hardware include the Dummy device, this allows you to create dummy devices
2) Press create virtual sensor and type a name (i used AlarmActive) and select Switch as sensor type
3) Under setup - devices you will find the Dummy device created and also it will be shown as a Switch (AlarmActive)
4) Create a new event as shown in the below Domoticz screenshot
5) Now you can arm and disarm the alarm via a selector switch in ImperiHome (In ImperiHome you can protect the switch with a passcode)

Code:
commandArray = {}
if (devicechanged['AlarmActive'] == 'Arm Away') then
commandArray['DomoticzSecurityPanel']='Arm Away'
print('Setting Arm Away')
end
if (devicechanged['AlarmActive'] == 'Arm Home') then
commandArray['DomoticzSecurityPanel']='Arm Home'
print('Setting Arm Home')
end
if (devicechanged['AlarmActive'] == 'Disarm') then
commandArray['DomoticzSecurityPanel']='Disarm'
print('Setting Disarm')
end
return commandArray


-----------------
Last edited by gerardosamara on Wednesday 08 February 2017 0:35, edited 2 times in total.
Domoticz RPi3 V3.5877 + App Android Domoticz Lite V0.1.343 & Imperihome Pro V2.8.4
Zwave+ Z Stick Z90 USB dongle + USB300 Ocean GW dongle + Arduino Serial GW
Smart witch Aeotec DSC24 Gen2

gerardosamara
Posts: 22
Joined: Sunday 23 October 2016 19:49
Target OS: Raspberry Pi
Domoticz version: 3.5837
Contact:

Re: Domoticz testing as alternative to Vera Controller

Postby gerardosamara » Sunday 22 January 2017 17:00

HOUSE MODE BLOCKY


The "Security Modes" of Domoticz ( Disarm , Arm Home , Arm Away) allows to automate multiple functions according the presence of persons in the house.
The house mode can be changed from the Domoticz dashboard or from the Android App Domoticz and Imperihome.

A blocky script has been designed to handle the following functions :

Mode « Disarm »
Disable all the IP camera motion sensors by a http request to the camera API
Change the house mode to Arm Away at 6PM if still "Disarm" or "Arm Home"
Mode « Arm Home»
Activate the IP camera motion sensors of the primeter of the house (basement) by a http request to the camera API
Mode «Arm Away»
Activate the IP camera motion sensors of the basement and first floor by a http request to the camera API

JSON interface to security panel

Get Password:
GET http://ip:port/json.htm?type=settings
JSON: "SecPassword" : (for example) "2adcefe38fbcd3dcd45908fbab1bf628",

ARM HOME:
GET http://ip:port/json.htm?type=command&pa ... fbab1bf628

ARM AWAY:
http://ip:port/json.htm?type=command&pa ... fbab1bf628

DISARM:
http://ip:port/json.htm?type=command&pa ... fbab1bf628

GET STATUS
GET http://ip:port/json.htm?type=command&param=getsecstatus
Attachments
House mode bloky.png
House mode bloky.png (70.36 KiB) Viewed 83 times
Last edited by gerardosamara on Thursday 09 February 2017 20:14, edited 5 times in total.
Domoticz RPi3 V3.5877 + App Android Domoticz Lite V0.1.343 & Imperihome Pro V2.8.4
Zwave+ Z Stick Z90 USB dongle + USB300 Ocean GW dongle + Arduino Serial GW
Smart witch Aeotec DSC24 Gen2

gerardosamara
Posts: 22
Joined: Sunday 23 October 2016 19:49
Target OS: Raspberry Pi
Domoticz version: 3.5837
Contact:

Re: Domoticz testing as alternative to Vera Controller

Postby gerardosamara » Thursday 09 February 2017 20:06

reserved for videosurveillance
Domoticz RPi3 V3.5877 + App Android Domoticz Lite V0.1.343 & Imperihome Pro V2.8.4
Zwave+ Z Stick Z90 USB dongle + USB300 Ocean GW dongle + Arduino Serial GW
Smart witch Aeotec DSC24 Gen2


Return to “Show your projects”

Who is online

Users browsing this forum: No registered users and 1 guest