Month: January 2022

  • How to change the color of a Fibaro Wall Plug using Z-Wave PC Controller

    I have been searching for an easy way to change the color of my Fibaro Wall Plugs without coding/scripting/configuring anything… The solution is to use the “Z-Wave PC Controller” from Sigma on a Windows PC!

    Click to Read More

    I have the Fibaro FGWPef-102, documented here. As per that documentation, to set the color of the plug when it’s ON or OFF, one has to send the color code to respectively the parameter 41 or 42 (a parameter of size 1 byte):

    Here is how to do it with Z-Wave PC Controller (version 5 here under). Run the application on your PC, once the controller is plugged into it (I am using a Sigma ACC-UZB3). Click on the gear icon to select the port of your controller and click “OK”.

    Now:

    1. Select a node representing one of your Fibaro Wall Plugs in the top left frame and press Enter (or click the “Node Info” button) to fetch the available commands
    2. Select the Command Class “CONFIGURATION” in the bottom left frame 
    3. Select the Command “CONFIGURATION_SET” to set a new value
    4. Set the Parameter Number to 41 or 42 as documented above. Set the Size to 1 and the Configuration Value to the desired color. Ex.: 08 for Cyan.
    5. Click on Send

    To be sure it works, look the color of your Wall Plugs 😀 

    Or, you can now

    1. Select the Command “CONFIGURATION_GET” to read the value
    2. Put 41 or 42 as Parameter Number
    3. Open the Log file to see the output which will be returned by the Command
    4. Click on Send. You should see in the log a Configuration report with the value set previously. Here “08” (Cyan)

     

    “Z-wave PC Controller” is available inside the free “Simplicity Studio” of SiLabs, as explained here. You only have to subscribe to get it ! (As an alternative, if you have already an SiLabs account, click here to download it directly). The user manual is available here.

    Et voilà.

    Loading

  • How to identify the Philips Hue sensors in OpenHab ?

    When looking at the Things within OpenHab, each “Hue Motion Sensor” device appears as multiple things: the “Motion sensor xyz” itself but also a “Hue ambient light sensor i” and a “Hue temperature sensor i”. “Motion sensor xyz” is the name you gave to the device via the Philips Hue App and “i” is a sequential id which can’t be easily linked to the related “Motion sensor” device… The App Hue Essentials can help you !

    Click to Read More

    On the screenshot bellow, one can see that I have renamed the Motion Sensors into “Motion sensor Door” and “Motion sensors Entry”, within the Philips Hue App. NB.: Only the Motion sensors appears in the Philips Hue App. One doesn’t see the Temperature and Ambient Light sensors…

    In OpenHab, we see all the sensors, but the Ambient Light and Temperature sensors are not named accordingly to the related Motion sensors. Instead, the are named “Hue ambient light sensor i” and a “Hue temperature sensor i” and one has no idea which one is part of the “Motion sensor Door” or “Motion sensor Entry”:

     

    The App Hue Essentials is not free but is really great (opposite to Philips Hue, you can for example control devices from multiples Bridges without switching from one to the other all the time). It’s the first App I found, made for end users (and not for developers), which give access to the internal sensors of a selected device. I.e.: the other Apps list all the sensors but does not tell which sensors belongs to which device.

    One way to identify which sensor belongs to which device is to go to the Devices (1) within the App Hue Essentials, select the device (2).

    Next , select, the menu Details (1 then 2):

    In these details, you see the Identifier of the device. Here, the identifier is 13. 

    Back into OpenHab, you can now filter the list of Things on ‘:13’ and find the device. 

    That was quite useless as the name of the device is the same in OpenHab and Philips Hue… but you can see that, obviously, the “Unique ID” displayed in Hue Essentials (00:17:88:01:06:44:42:35) is not the full id displayed (0107:ecb5fa857069)..

    One can do the same to find the id of the other sensors of this device: instead of the menu “Details”, select now the menu “Temperature” or “Light Level”. One can see immediatly the name of the related sensor (Here under “Hue light sensor 1”). One can also take the menu “Detail” (1) to take note of the identifier (here under “14”) to filter for it in OpenHab’s Things list.

    The best is however to rename these sensors according to their device (The “Hue light sensor 1” could be renamed “Hue light sensor Door”), remove all of them (especially the “Motion Sensors” which were properly named otherwise,  the other sensors won’t be re-detected) and rescan for Hue’s Things in OpenHab.

    Et voilà.

    Loading

  • Install Z-Stick & ConBee II on RPI/Openhabian

    Here is how to configure properly an Aeotec Z-Stick Gen5 and a Conbee II stick on a RPI 4 installed with Openhabian (running OpenHab 3)

    Click to Read More

    First, be sure that openhabian can access the serial ports. The easiest is to configure that via openhabian-config > System Settings > Serial Port:

    sudo openhabian-config 

    You can also do it with raspi-config > Interfacing Options > Serial :

    sudo apt-get install raspi-config
    sudo raspi-config

    > Would you like a login shell accessible over serial? → No
    > Would you like the serial port hardware to be enabled? → Yes

     

    Next, check that the sticks are well plugged with the command:

    lsusb

    You should see something like

    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 011: ID 1cf1:0030 Dresden Elektronik ZigBee gateway [ConBee II]
    Bus 001 Device 005: ID 0658:0200 Sigma Designs, Inc. Aeotec Z-Stick Gen5 (ZW090) – UZB
    Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    In order to always have the USB sticks mounted on the same “port”, instead of being assigned once on /dev/ttyACM0, once on /dev/ttyACM1, … create a UDEV Rule file:

    sudo nano /etc/udev/rules.d/99-usb-serial.rules

    Type the following, using the ID of the USB sticks found above, in this file:

    SUBSYSTEM==”tty”, ATTRS{idVendor}==”0658“, ATTRS{idProduct}==”0200“, SYMLINK+=”ttyUSB-ZWave”, GROUP=”dialout”, MODE=”0666″
    SUBSYSTEM==”tty”, ATTRS{idVendor}==”1cf1“, ATTRS{idProduct}==”0030“, SYMLINK+=”ttyUSB-ZigBee”, GROUP=”dialout”, MODE=”0666″

    If you didn’t prepare openhabian for ZigBee via sudo openhabian-config > System Settings > Serial Port, grant the following access for openhab :

    sudo adduser openhab dialout
    sudo adduser openhab tty

    Now, reboot (sudo reboot) and test if symlink was created with the command :

    ls /dev/tty*

    You should see

    /dev/ttyUSB-ZigBee
    /dev/ttyUSB-ZWave

    Add edit openhab config file to add the symlinks to the PATH variable for Java (NB: for openhab 2, the file is namge openhab2 !!):

    sudo nano /etc/default/openhab

    Search the line with EXTRA_JAVE_OPTS and modify accordingly to complete the parameter ‘Dgnu.io.rxtx.SerialPorts’:

    EXTRA_JAVA_OPTS=”-Xms192m -Xmx320m -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB-ZWave:/dev/ttyUSB-ZigBee

    Now, reboot again (sudo reboot) and install Phoscon, the application to manage the ZigBee devices. The easiest is to install it (on port 8081 as recommended) via openhabian-config > Optional Components > deCONZ:

    sudo openhabian-config

    You can also look here on the phoscon website for a manual setup

    If you have a RPI 4B, also update the WiringPI like this:

    cd /tmp
    wget https://project-downloads.drogon.net/wiringpi-latest.deb
    sudo dpkg -i wiringpi-latest.deb

    You can now open phoscon to login and search for ZigBee devices on http://<your RPI IP>:8081

    If after a reboot, this UI is not available, then enable manually the service:

    sudo systemctl enable deconz

    If you want to change the port of Phoscon, edit the parameter ‘http-port’ in this file:

    sudo nano /lib/systemd/system/deconz.service

     

    Finally, install the following addons (Bindings) in OpenHab :

    • “Dresden Elektronik deCONZ Binding”
    • “Z-Wave Binding”

    The ConBee gateway will be detected automatically by OpenHab and appear twice in the ‘Inbox’: once as Deconz and once as Hue (indeed, it emulates a Philips Hue Bridge). If it was not detected automatically, open the Phoscon UI > Gateway > Advanced (Gear Icon at the bottom of the page) and CLick on “Authenticat App”. Then add the Thing manually into OpenHab using the Scan button of:

    OpenHab UI > Administration > Parameters > Things > + (Add Thing) > Dresden Elektronik deCONZ Binding

     

    The Zwave gateway will only appear if you add it explicitly into OpenHab:

    OpenHab UI > Administration > Parameters > Things > + (Add Thing) > Z-Wave Binding > Z-Wave Serial Controller

    In the field Serial Port, type manually ‘/dev/ttyUSB-ZWave’ (without the quotes) and click ‘Create Thing’

    Wait for about 10 seconds and the gateway will soon become online.

    Et voilà.

    Loading

  • RPI 4/Openhabian into an Argon One Case

     

    If you installed Openhabian onto an RPI hosted into an Argon Once Case, here is how to configure the Argon One.

    Click to Read More

    Install the scripts to manage to Argon One’s features:

    sudo curl https://download.argon40.com/argon1.sh | bash

    Configure the fan cooler, for example depending on the temperature, with the command:

    sudo argonone-config

    Select the option 2 and type 10 for 55 °C, 55 for 60 °C and 100 for 65 °C, meaning that the fan speed will by 10% at 55 °C, etc…

     

    In order to configure the Argon One to turn on automatically after a power failure, you have first to enable the i2C. The easiest is to do it with the raspi-config command, which can be installed with:

    sudo apt-get install raspi-config

    Then run it:

    sudo raspi-config

    And go to the menu “Interface option”, and select the entry “I2C” to enable the loading of the I2C kernel module.

    Now you can check that it works with the command:

    i2cdetect -y 1

    And finally set the Power-On feature with the command:

    i2cset -y 1 0x01a 0xfe

     

    Now, you can press the power button of the Argon One :

    • twice to reboot
    • +3 sec to shutdown and power off
    • +5 sec to force the shutdown

     

    Et voilà

    Loading