Posts Tagged ‘automation’

22€ Olimex ESP32-EVB ESP32 Development Board Features an Ethernet Port and Relays

February 10th, 2017 3 comments

We already have a good choice of ESP32 development boards, but none of the ones I’ve seen make use of the Ethernet MAC interface found in Espressif ESP32 SoC. Olimex has changed that with their ESP32-EVB featuring ESP32-WROOM32 module as well as one Fast Ethernet port and two relays.

Olimex ESP32-EVB specifications:

  • Wireless Module – ESP32-WROOM32 module with 802.11 b/g/n WiFi and Bluetooth LE
  • Wired Connectivity – 10/100M Ethernet RJ45 port
  • External Storage – micro SD slot
  • Relays – 2x 10A/250VAC relays
  • Expansion
    • 40-pin GPIO female header (2.54mm pitch)
    • UEXT connector for sensors and modules
  • Misc – 2x user buttons
  • Power Supply
    • 5V power jack
    • LiPo charger and step up converter allowing ESP32-EVB to run from LiPo battery

The company still have to write software samples, and do some testing to make sure the board work before going into mass production. Once everything is cleared, the board will be sold for 22 Euros.

Barionet 1000 DIN Rail Programmable I/O Controller Runs OpenWrt

February 9th, 2017 1 comment

Barix, a Swiss company specializing IP- based communications and control technology, has introduced a new Barionet programmable I/O controller with Barionet 1000, the first model of the company to run Linux, and in this case OpenWrt, and to offer WiFi and USB connectivity.

Barionet 1000 specifications:

  • Processor – Undisclosed
  • System Memory – 64MB RAM
  • Storage – 16MB flash
  • Connectivity – 10/100M Ethernet, Wi-Fi 802.11 b/g/n; IPv4 & IPv6 support.
  • USB – 2x USB Host Ports
  • Serial – 1x DB9 RS-232 serial port
  • User programmable I/Os
    • 2x relay outputs (30 VDC max, 5 A)
    • 4x open collector digital outputs (4 x 24 VDC, 0.3 A)
    • 8x contact closure inputs (0 – 15 V), including 4x 12-bit analog inputs (0 – 15 V)
    • 1-wire interface for 18DS20 temperature sensor
  • Misc – 11 LED status indicators
  • Power Supply – 9 to 30V DC (2.5 Watts max)
  • Dimensions –  103mm x 85mm x 31mm; plastic DIN Rail Case
  • Temperature Range – Operating: 0 to +50°C; Storage: 0 to +70°C
  • Certifications – CE (A&B), RTT&E, FCC (A&B), RoHS

They also have another similar model, named Barionet 1100, which adds RS-485, an RTC clock, Wiegand capability, and “future optional internal interface” for LoRa. Hardware & software documentation appears to be missing for now, but they’ll certainly update their Wiki, like they did for their previous models.Typical applications for the system include access/door control, environmental monitoring, photovoltaic power management, temperature monitoring & logging, and HVAC control.

Pricing and availability of Barionet 1000 have not been announced, but for reference, the older Barionet 50 is currently selling for $189, so the new model should cost more with the extra features. Barionet is currently showcasing their products at ISE 2017 (Integrated Systems Europe) in Amsterdam, Stand 8-N270. Further details may be found on the product page.

Via LinuxGizmos

How to use Sonoff POW with ESPurna Firmware and Domoticz Home Automation System

January 21st, 2017 10 comments

Sonoff POW is an ESP8266 based wireless switch with a power meter that comes pre-loaded with a closed-source firmware that works with eWelink app for Android or iOS by default. But we’ve also seen Sonoff POW, and other Sonoff wireless switches from the same family, can be flash with open source firmware supporting MQTT (Message Queuing Telemetry Transport) lightweight messaging protocol such as ESPurna, and I initially sent data from Sonoff POW to ThingSpeak via an MQTT broker (mosquitto) to draw some pretty charts. I did that with the switch connected to a lightbulb, but I’ve since installed Sonoff POW in my office to measure the room’s power consumption minus the ceiling light and aircon as shown below.

Wall Mounted Sonoff POW WiFi Switch – Click to Enlarge

Sonoff cable mechanism is really a pain for hard copper wires, as they are hard to push inside the mechanism, and something come out. I finally managed by it took longer than expected to install. I had to cut the mains cable, and rewire the gang box too. The good thing is that I did not need to drill a hole in my wall, as the device is very light.

I could see the power value updated in ESPurna web interface, depending on the load on my computer, and whether I turned on or off other devices. That’s all good, but instead of using ThingSpeak, whose open source implementation is not updated, I decided to try Domoticz, and already wrote a short guide showing how install Domoticz in NanoPi NEO ARM Linux development board. I had not gone through the setup yet, as I had to study a little more, and upgrade Sonoff POW firmware first. I also planned to use vThings CO2 monitor with Domoticz, but canceled since it can’t be configured remotely, and a USB connection is needed.

ESPurna OTA Firmware Update

So I’ll focus only on Sonoff POW in this post, and first we need to update the firmware since Domoticz support is only recent. I’ll assume you have already followed the post entitled How to Build and Flash ESPurna Open Source Firmware to Sonoff POW Wireless Switch.

First we need to update platformio and ESP8266 development platform to the latest version otherwise we’ll get some build issues:

I updated the source code with git pull, but for whatever reasons the build failed, even after cleaning the code. So I did what any developer with enough experience would do in that case: start with a fresh check out ;), and rebuild the OTA firmware from there:

In order to update the firmware over the network, you’ll need to change sonoff-pow-debug-ota section in platformio.ini with your own IP address (upload_port) and password (in upload_flags) used in ESPurna web interface:

Once it’s done, you can upgrade the firmware, and then the file system as follows:

The Sonoff POW will reboot, and cut the power for about 2 seconds after both updates. My Sonoff POW is controlling my computer power, but that’s OK since I’m behind a UPS. Now I can access the web interface, and one of the improvement is that you’re being asked to setup a new password right after the update.

Click to Enlarge

I was then redirected to the Status page showing power, voltage (a bit low?), current, and power factor.

Click to Enlarge

I then jumped to MQTT menu to set the IP address to my NanoPi NEO board, and clicked Update.

Click to Enlarge

There’s a new DOMOTICZ menu which we’ll check out a little later.

Installing and Configuring MQTT in Domoticz

ESPurna communicates with Domoticz via MQTT, so the first task was to follow and adapt Domoticz MQTT wiki.

First login to your Domoticz server (NanoPi NEO) and access a terminal window to update the packages, install npm, node.js, Node RED, and mosquitto:

We then need to go to the Hardware page in Domoticz and configure a new “MQTT Client Gateway with LAN Interface” as shown in the screenshot below.

Click to Enlarge

We can test whether it works or not by creating a new Dummy device in the same Hardware section

Then click on Create Virtual Sensors, to add a new Temperature sensor which we’ll call Fictive Temp.

Now go to the list of Devices (Setup->Devices) to check the idx value (1 in our case), and a publish a MQTT message to update the temperature value of our virtual sensor:

The temperature switch from 0 to 25°C. Our installation is working. Great!

Using Sonoff POW with Domoticz

In theory, we should be able to get two type of data for Sonoff POW: relay status and power levels. However, after looking at ESPurna source code, domoticz.ino only seems to handle the relay status that can be changed from Domoticz web interface, but the power values are only send in pow.ino to the MQTT server, with data not directly compatible with Domoticz. Maybe I missed something as Tinkerman – ESPurna developer – can use Sonoff SC to send temperature data to Domoticz. Alternatively, it might be possible to convert that data somehow with Node RED, but that’s something I’ll try later. So today, I’ll only try to control the switch from Domoticz.

To do so, I created another Dummy device called Sonoff POW Switch, and from there, another Virtual Sensor of Switch type.

Click to Enlarge

Click to Enlarge

We’ve already configured MQTT in ESPurna web interface, and from the screenshot above,we can see that “Sonoff POW Switch” Idx is 3, a value we need to update in the DOMOTICZ section of ESPurna web interface.

Now I can go Domoticz interface in my phone, and not my computer since my office’s Ethernet switch will be turned off, click on the Switch tab, and turn on and off Sonoff POW by clicking on the lightbulb as shown below.

Click to Enlarge

It works fine, however note that the initial switch status was wrong (off instead on on), despite the switch sending regular updates to the MQTT server.

NanoPi NEO Power Adjustments and Installation

Normally, at this stage, it should be easy simply install NanoPi NEO outside the office close to my router in the living room. But I’ve come across a few issues doing so, which I’m going to report.

First I decided to make a very short Ethernet cable to connect NanoPi NEO directly to my router. I have done a couple of Ethernet cables in the past a few meters long, and they all work. I tested my ultra short straight Ethernet cable connections with a multimeter, and the 8 wires were properly connected, however, when I connected NanoPi NEO to the router with that cable it failed to get a link. Maybe there was aonther issue with the cable, so I made another one just as short… Another fail. It turns out very short Ethernet cables may cause issues, which are normally solved by twister pairs, but with such short cables the length of the twisted pairs is also extremely short, maybe 2 to 3 cm which may not be sufficient. So I ended up using a “normal” 1.5 meter cable, not as neat but it works.

The power strip close to my router was full, and since I did not want to add another, I decided to use the spare USB port on my modem router in order to power NanoPi NEO board. A USB 2.0 port can only deliver 2.5W max, so I was clearly looking for problems here. In order to avoid an issues, I made use of h3consumption script to adjust the behavior of CPU cores and disable unused peripherals.

Let’s check NanoPi NEO current settings in a terminal:

h3consumption allows us to change the following settings:

So I decided to disable USB, and use two CPU cores at most in order to limit the board’s power consumption, and avoid random reboots:

The changes were properly applied after a reboot.

I powered the board with my modem router, and could use it without issue. I’ll monitor NanoPi NEO’s uptime to check if this works.

How to Install Domoticz Home Automation System in NanoPi NEO and Other ARM Linux Boards

January 19th, 2017 7 comments

I’ve recently started experimenting with IoT projects, and the first hurdle is to select the hardware and software for your projects are there are simply so many options. For the hardware your first have to choose the communication protocols for your sensors and actuators, and if you are going to go with WiFi, ESP8266 is the obvious solution, used together with your favorite low cost Linux development board such as Raspberry Pi or Orange Pi to run some IoT server software locally or leveraging the cloud. But the most difficult & confusing part for me was to select the server software / cloud services as there are just so many options. I prefer having a local server than something running only in the cloud, as my Internet goes a few hours a month, so I started with a solution combining ThingSpeak with MQTT gathering data from Sonoff power switches running ESPurna firmware and vThings CO2 monitor. This works OK, but while cloud service is continuously update, its open source version has not been updated since mid 2015. Among the many service and software framework available, one seems to have come more often than other, is supported by vThings air monitoring platforms, and recently been added to ESPurna. I’m talking about Domoticz described as:

a Home Automation system that lets you monitor and configure various device like lights, switches, various sensors/meters like temperature, rain, wind, UV, Electra, gas, water and much more. Notifications/Alerts can be sent to any mobile device.

The system can run on Linux, Mac OS, Windows on x86 platform, but also on 32-bit and 64-bit ARM Linux boards such as Raspberry Pi and Cubieboard with just 256MB memory recommended, and 200MB free hard disk space. It can also generate charts from the data like the ones below.

Click to Enlarge

On top of that, the forums appear to be very active, and the last stable version was released in November 2016, and the last beta release yesterday according the download page.

I’m going to take it slow, so today I’ve just tried to install it on NanoPi NEO since it’s compact and runs Linux. However, it does not appear to be officially supported by Domoticz, so we’ll have to see whether it’s possible to install it on the board.

Domoticz is not a Linux distributions but a framework, so first we need to install a Linux distributions on the board, and the obvious choice for NanoPi NEO is to use the latest Armbian release either Debian Jessie or Ubuntu Xenial.

I downloaded Debian, extracted the image, and flashed it to a micro SD card on a Ubuntu computer:

Replace /dev/sdX with your own SD card device, which you can find with lsblk command.  If you are a Windows user, you can flash the firmware like you’d do for a Raspberry Pi using Win32DiskImager after uncompress Armbian firmware.

Now we can insert the micro SD card into the board, and connect the power to start the board. If you have not connected the serial console to your board, please be patient for the first boot as the system may take around 3 to 4 minutes to boot before you can login to it, as it expands the micro SD card to full capacity, and creates a 128MB emergency SWAP file.

Once it’s done we can login through the serial console or SSH using root / 1234 credentials. The first time, you’ll be asked to go through the first setup, changing the root password, and creating a new user with sudo privileges.

So now that we have Linux running on the board, and after login again as the new user, we can follow the instructions for Raspberry Pi board and other ARM boards to install domoticz with a single command line that works on systems running Debian/Ubuntu:

After a minute or two, as the system update the packages, and download domoticz, the setup wizard should start.

At some points we’ll need a fixed IP address, either by configuring Linux with static IP, or setting a permanent IP linked to the board MAC address in the router. The second option is usually my favorite option. Nevertheless, let’s click on OK to proceed.

You’ll be asked whether you want to enabled HTTP or/and HTTPS access. I selected both for now, but it’s probably a good idea to only select HTTPS for better security.Next is the HTTP port number set to 8080 by default, followed by the HTTPS port number to 443 by default (no screenshot), and finally the installation folder which defaults to ~/domoticz. You should now have reached the Installation Complete! window, and you can click Ok to exit the installation wizard.
Wow.. That was easy, and no errors. But does it work? Let’s access from a web browser.

We have a “Your Connection is not secure” error, but it’s expected as Domoticz simply generated a self-certificate, you can safely add exception to your browser to avoid this issue next time. Your data will still be encrypted, but if you plan to access your Domoticz setup from the Internet, you should probably install an other certificate using Let’s Encrypt certificate authority for example.
Once we have added an exception to the web browser we can indeed access Domoticz web interface, so the installation worked, but it will only show “No favorite devices defined…” Again that’s normal, because we need to configure it for example by clicking on the Hardware link.

Adding Hardware to Domoticz – Click to Enlarge

This will allow you to configure the system with MQTT, local I2C sensors, all sort of gateways, and even Kodi Media Center.  I’m pretty sure all devices working over the network or USB should work, but things like “Local I2C Sensors” which may be connected directly to the board may or may not work. Anyway, that looks promising, but I’ll stop here for today, as I have a lot more to study before going further, including upgrading Sonoff firmware, and configuring vThings CO2 monitor for Domoticz.

Qorvo GP695 “Smart Home” SoC Integrates 802.15.4, Zigbee 3.0, Thread, and Bluetooth LE

January 4th, 2017 No comments

GreenPeak Technologies ultra-low power, short range RF communication technology company was acquired by Qorvo last year, and Qorvo has recently announced a GP695 system on chip (SoC) for smart home devices part of GreenPeak’s previous family of devices, and supporting multiple short range RF protocols.

qorvo-gp695GP695 key features:

  • MCU Core – ARM Cortex M4
  • Connectivity
    • IEEE 802.15.4
    • ZigBee 3.0
    • Thread
    • Bluetooth Low Energy (BLE)
    • Qorvo Wi-Fi interference mitigation technology

GP695 has been designed to be used in device such as a door locks, smart HVAC, smart security systems, connected video doorbells and intercoms, lightbulbs, smoke alarms, and leak detectors, and complements GP712 multi-protocol SoC designed for smart home gateways.

Qorvo will feature live demonstrations of its smart home and IoT solutions at its booth during CES 2017, at Sands Expo, Halls A-D Booth #42114. There’s very limited public information, and no product page could be found in their website.

Samsung Introduces IoT-Ready POWERbot VR7000 Robot Vacuum Cleaner Compatible with Amazon Echo

December 29th, 2016 1 comment

2017 is the year where the future starts. You’ll be wandering in your automated home or office where lights and heating system are fully handled by a gateway taking into account sensors values, and equipped with a CO2 level controlled ventilation systems, your eyes constantly looking at your phone, wearing neckband speakers likely connected to your Amazon Echo to let you know when it’s time to get up, eat, go to work, brush your teeth, and get back to bed again. All your life will be taken care of on your behalf by the Internet of Things, relieving you of the stress of taking routine daily decisions… Luckily, you’ll still be have an illusion of control thanks to your “IoT-ready” Samsung POWERbot VR7000 vacuum cleaner that can be controlled with your voice via that Echo thing, giving your life a purpose.

Click to Enlarge

Click to Enlarge

Samsung Electronics’ latest POWERbot vacuum cleaner will be unveiled at CES 2017 in January with a slimmer design (97mm), and more powerful cleaning capabilities. POWERbot VR7000 vacuum cleaner will feature “Visionary Mapping Plus” and “FullView Sensor 2.0” in order to detect obstacles and generate a map of the room, its Intelligent Power Control feature will also automatically adjusts the level of suction power to surface type (hardwood, carpet, etc…). I think it’s also the first “IoT-ready” vacuum cleaner I’ve seen, and you can control it using a mobile app, or through voice commands thanks to its compatibility with Amazon Echo. TizenExperts also reports that the device will run Tizen, and can also be integrated with the SmartThings hub. I guess you could also have some sort of dust sensor(s) to decide when to start the vacuum cleaner, beside scheduling cleaning times.

Click to Enlarge

Click to Enlarge

POWERbot VR7000 will be showcased on Samsung Electronics’ CES booth #15006, between January 5th and January 8th 2017.

vThings WiFi CO2 Monitor Quick Start Guide

December 28th, 2016 5 comments

I’ve already checked out vThings CO2 Monitor hardware and we’ve seen it’s based on ESPrino ESP8266 board, and my model includes CM1106 CO2 sensor and BMP180 temperature and pressure sensor. I’ve now installed it in my kitchen, about 3 to 4 meters from the gas stove, and getting data to ThingSpeak.


The door and window of my kitchen are open all day, and the wall have ventilation holes. That’s important for CM1106 sensor since it auto calibrates every 3 days in clear air. If you plan to use such sensor in a closed environment, you should buy Vthings with CM1102 CO2 sensor that costs more, but does not require calibration.

Since all WiFi systems I’ve just so far starting AP mode for configuration, I first looked for an access point, but… nothing… Then I decided to read the documentation (might be useful at times), and the monitor is actually configured via a Chrome (desktop only) add-on through USB. There are three types of devices made by vair-monitor, and I first used  vThings Configuration Utility add-on, but eventually found out I had to use vThings – Dual Beam Configuration Utility.


vThings Configuration vs Things – Dual Beam Configuration Utility

I used Ubuntu (Linux), but if you are using a Windows or Mac computer, you’ll need to install drivers first. Once you’ve connected the monitor through USB and started “vThings- Device Configuration Tool” the following windows should be shown.

Click to Enlarge

Click to Enlarge

The fist thing to do is to connect the monitor to your WiFi router by entering its SSID and password, and click on Set WiFi.

Click to Enlarge

Click to Enlarge

It should connect to your router, and the first time updated the firmware automatically. Wait a couple of minutes for it to complete, and you can go to the next step to configure one or more of the following Public, Private or Generic services:

Public Private Generic
BeeBottle DomoticGa HTTP DomoticZ MQTT FHEM RF 433/315
EmonCMS Homeseer
ThingSpeak HomeAssistant
UbiDots JeeDom

I decided to go with ThingSpeak since I got familiar with it while writing Sonoff POW tutorial.

Click to Enlarge

Click to Enlarge

Select the data provided by the sensors inside your vthings Co2 monitor, in my case CO2 levels, temperature, and pressure, and nothing else, or connection will fail, as I found out when I used 4 default fields including humidity, and ThingSpeak was not updated at all. You’ll also need ThingSpeak API write key, that you can get my create a channel on as shown below.


Once the channels is create on ThingSpeak website, and you’ve added the API write key in vThings Device Configuration Tool, you could go to Generic Services->HTTP and notice an HTTP request has been created, so if you have installed ThingSpeak locally, you could change to your own IP address.

Click to Enlarge

Click to Enlarge

By default the data will be updated every 120 seconds, but you can change that in Settings->Update Interval. Once configuration is done, you can unplug it from your PC, and connected to the location you want to monitor. vThings Device Configuration Tool requires a USB connection to find the device, it can not find it over WiFi, so if you want to change configuration, you’ll need to connect it back to your computer. There’s a function to (auto)start a webserver in vESPrino, but it did not seem to work for me.

After a few hours or minutes depending on your update internal you should get some nice charts on ThingSpeak with CO2 levels, temperature and pressure, or other data based on the sensors you’ve selected while purchasing the hardware.

Click to Enlarge

Click to Enlarge

The channel is public if you are interested/curious in seeing the data. ThingSpeak will show 60 samples (2 hours in my case) by default, but let’s see what happened over the last 12 hours with CO2 levels.

Click to Enlarge

Click to Enlarge

The CO2 levels started at about 500 to 600 ppm while I did the configuration in my office (windows closed), and dropped to around 404 ppm once I installed in the kitchen. That value correspond roughly to the current CO2 ppm value in the atmosphere (in Hawaii). Three times around 18h00 people warmed food and CO2 jumped to around 500 ppm. During the night, CO2 levels slowly increased to 480 ppm, likely because of the plants cycle (producing oxygen during the day, and carbon dioxide during the night). This morning CO2 levels spiked at around 900 ppm when cooking right after 6am and 8am.

That’s all fun, but is there a real benefit to measuring CO2 levels in your house? In the kitchen I could probably trigger an alert over 1,500 ppm in which case it may mean something is burning, but smoke detectors are much cheaper and better suited to the task. Vladimir Savchenko, vThings developer, found a study claiming that high CO2 levels may decrease creative thinking and lead to bad sleep, so he used vThings CO2 monitor in his bedroom and discovered CO2 levels reached close to 4,000 ppm, and that just open the door or window would greatly reduce the concentration of the gas.

sleepwithcloseddoortext-co2-levelsvThings CO2 monitor does not only monitor CO2 levels as we’ve seen above, as temperature, humidity, and/or pressure sensor can be included in the case, as well as a PM2.5 & PM10 laser dust sensor.

vThings CO2 Monitor v3 is sold for 60 Euros with CM1106 CO2 sensor, and more if you use a better CO2 sensor, or add extra environmental sensors. 135 Euros would get you a top of line monitor with a laser dust sensor, CDM7160 CO2 sensor, temperature and humidity sensor, and RF connectivity.

SmartHomy Hybrid TV Box with DTV Tuner Triples as a Game Console & Home Automation Gateway (Crowdfunding)

December 26th, 2016 25 comments

SmartHomy Homy Player is a TV box running Android TV that includes an ATSC, DVB-T2/C,DVB-S2, or ISDB-T tuner, is said to be powerful enough to be used as a 3D gaming platform, and serves as a security system and home automation gateway using Z-Wave, Bluetooth, WiFi and IR blaster to control your things.

smart-homyHomy player specifications [Updated on January 19th, 2017]:

  • SoC – Amlogic S912 octa-core Cortex A53 processor with Mali T820MP3 GPU
  • System Memory – 3 GB DDR3
  • Storage – 32 GB eMMC flash
  • Video Output – HDMI 2.0 up to 4K @ 60Hz with HDCP 2.2, HDR, CEC
  • Audio Output – HDMI and optical S/PDIF
  • Video / Audio Capabilities – 10-bit 4K H.265 @ 60 fps, HD audio pass-through, Dolby Digital & DTS licenses
  • DRM – Widevine Level 1, Microsoft PlayReader, Netflix license
  • Digital TV Tuner – DVB-S2 (satellite), DVB-C/T/T2 (Cable/Terrestrial), ATSC, and ISDB-T
  • Connectivity – Gigabit Ethernet, dual band 802.11 b/g/n/ac WiFi, Bluetooth 4.0, Z-Wave (Plus 500 series)
  • USB – 2x USB 2.0 ports
  • Dimensions – 200 x 143 x 40 mm
  • Weight – 530 grams

The device ships with Homy Remote, a backlit Bluetooth 4.0 LE remote control that includes gyroscope, and allows to control the player with voice commands. Smart Homy appears to mostly targets the US markets as seen in the comparison table with some home automation solution, media players. and game console.


Click to Enlarge

It would have been a little more fair to include the non-pro version of NVIDIA Shield Android TV since the price without hard drive is also $199, and it still lacks home automation support and the tuners. While you can play games with Amlogic S912 SoC, the performance will be much lower than the NVIDIA box.

In order to maximize Z-Wave interoperability, Homy Player supports more than 50 command classes for Z-Wave devices, and the player/gateway also supports more than 70 Security Devices, including common security cameras. Configuration of home automation is allegedly simplified thanks to a “patent pending” Scene Recording System where you can easily record trigger and action using your physical devices.

SmartHomy has launched Homy Player on Indiegogo (flexible funding), where the company targets to raise $59,000 or more. A $199 pledge should get you Homy Player with the remote and an extra 64GB storage. Shipping adds $30, and delivery is scheduled for July 2017. You may also get more details on SmartHomy website.