Skip to main content

Posts

How to use the Home Assistant config add-on for VSCode

I've resisted moving from Atom as a yaml editor as I was so used to its ease of use and its shortcuts. Every now and then I'd dable with VSCode but it was pretty overwhelming. Well, after several months of use, I'm pleased to announce that it's freak'n awesome, especially when you install a couple of add-ons that make Home Assistant yaml edits a breeze. Contents of the video: 1. Home Assistant Config add-on 01:50   2. Atom Keymap add-on 04:00   3. Indent Rainbow add-on 05:20   4. Rainbow Brackets add-on 06:15   5. Home Assistant Tools 07:10   6. Home Assistant config in action 08:20   7. Global Search 11:30   8. File Search 14:05   9. Managing Tabs 15:10 P.S For those wanting mdi icon auto-complete like the VSCode Home Assistant add-on, simply search the extension library for materialdesignicons-intellisense and install that. Wait about 2 minutes for it to update and now when you type icon mdi: it will start searching the MDI icon l...

How to check what entities are filling up your Home Assistant database

If you use the Home Assistant MariaDB add-on, this tip will show you how to query the database so see what Home Assistant entity states are triggering the most, filling up your database. What were going to do: Install the phMyAdmin add-on for MariaDB. Query the MariaDB database. See what entity state changes have the most action. Paste the code below into the SQL query box:  select entity_id,count( * ) from states group by entity_id order by count ( * ) desc; And if you're using the internal home-assistant_v2.db instead, you can use the SQLite Web add-on to achieve the same thing.

How to use the Synology Chat platform with Home Assistant

Get notifications and now images sent to your mobile from Home Assistant so you can keep an eye on your house. If you own a Synology NAS, this is a totally free notification option with no file limits. Awesome! No Android smart watch support for Chat just yet but hopefully that is coming soon. An example script that uses the platform is shown below - service: notify.hass_synochat data: message: "Pool Gate was opened" data: file_url: http://ipaddressofhass:8123/local/images/pool_gate.jpg N.B Ensure you turn off your phones battery optimisation feature for the Synology Chat app otherwise you won't get notifications coming through in near real time. Buy your Synology NAS here . Home Assistant Chat add-on here . Info on the Synology Chat platform is here .

Shelly2 Wi-Fi double switch review

Got two of the Shelly2's last week and got around to a couple of overview videos today. I must say, very impressed. High quality and great GUI. Much better build than the Sonoff. Hardware overview here https://www.youtube.com/watch?v=peykCQm90-c GUI overview and API control here https://www.youtube.com/watch?v=Gok8YBQl97k Killer feature! 2-way switching https://www.youtube.com/watch?v=SVQYt5vw2k4  Shelly1 on Amazon https://amzn.to/2Qdexag Shelly2 on Amazon https://amzn.to/2Io5aSf From what I understand, more stock should be available mid Oct/18.

Getting Hass.io to boot from a USB thumb drive without a SD Card (Pi3)

If you want to be able to exclusively use an external USB drive without a Micro SD  Card in a Pi3 for Hass.io , these are the steps you’ll need to make it happen. Installed Raspbian1 Lite (2017-04-10) on a MicroSD card and followed the instructions here3 to enable USB boot mode. Rebooted Pi then shut down a few minutes later. Burned hassio2 Pi3 image to a 16GB USB drive. Booted PC into Gparted1 to re-partition hassio image. Increased /dev/sdb4 from 1GB to around 4GB (must do first otherwise you can’t expand the resin-data partition). Increased /dev/sdb6 from 1GB to pretty much whatever was left. With the modified thumb drive back in my PC, I added the following located in the resin-boot drive and also in the resin-rootA partition inside the resin-boot folder : I changed the “root” option in cmdline.txt to: root=/dev/sda2 and I added the usb boot line below to config.txt , right at the end: program_usb_boot_mode=1 I then put the reworked thumb drive back in my ...

My collection of Hass.io help videos

I made a few videos detailing my experience with Hass.io ; the all-in-one version of Home Assistant that makes it easier to update Home Assistant and install add-ons. Ben from BRUH Automation also added one today (26th July 2017) that goes into great detail and that’s at the bottom too. Enjoy.

Syncing two Sonoff’s for 2-way light switching

For as long as I've been playing with home automation, I've wanted a straight forward low-cost solution for replacing standard light switches. Although I have several Z-wave dimmers and Aeon Labs touch panels, these work out to be $180 NZD each! At least in NZ, the common 2-way and 3-way light circuits have the mains coming in on one switch and the load connected to another. The two switches are connected together as shown below.

How to reboot Kodi using Google Home and ha-bridge

If you have an instance of ha-bridge (highly recommended) running on your network like I do, it enables you to create devices that can be ‘seen’ by Google Home and Alexa for remote control via voice. Recent versions of ha-bridge allow you to create custom commands, one of those being JSON commands so you can set up a device that sends something like the following to your Kodi instance to reboot it.

Running iPerf in Docker on Synology NAS >6.1

I have a DS713+ that supports Docker and needed a way to install an iPerf3 server for WLAN testing. Fortunately, that is pretty easy. Activate SSH on your Synology so you can remote in. Using PuTTY, login as an admin user and type the following: sudo docker pull networkstatic/iperf3 (then type your admin password again)

Building an automated iPerf3 server with Ubuntu on Odroid C1+

The Odroid devices make great iPerf servers for portable use as they can be powered by 5V micro USB and have a Gigabit Ethernet adapter on its own bus so they don’t have the limitations the Raspberry Pi’s do. OK, let’s get started. We are going to assume that you already have Ubuntu 16.04 up and running but if not, you can download official images here http://odroid.com/dokuwiki/doku.php?id=en:c1_release_linux_ubuntu . Extract the downloaded image and burn it to a SD Card using Win32 Disk Imager. I only used a 2GB card and it works fine. First boot might take a minute or two. After it’s booted, scan your network (Fing) to find your device IP. It should show up as a device by JF Light Industries with the MAC vendor as Wibrain.

Running ha-bridge inside LibreELEC on your Pi2/3…yes, really!

This is huge! Thanks to aptalca for creating an arm based Docker container for the Raspberry Pi (and Odroid C2!) that allows ha-bridge to run inside the LibreELEC Docker add-on! First thing you need to do is ensure your Raspberry Pi LibreELEC has a static IP address so you always know how to get to the ha-bridge web interface. Kodi > Programs > LibreELEC configuration > Connections then select your active connection (LAN or Wi-Fi) and use the context menu to select ‘ Edit ’. Scroll to IPV4 and change your IP address settings so they are static by using the Manual settings. Of course, you could always create a DHCP lease in your router if you are savvy with that and that is the better way to go.

How to flash ESPEasy onto the Sonoff Touch for MQTT control

You can completely remove the low voltage board and connect as shown below. GPIO0 needs to be pulled to ground on power up (it can be left grounded during flashing) to enter programming mode. Power the device from your FTDI programmer set to 3.3V . The Sonoff Touch is a nice glass touch panel based on an ESP 8285 with 1MB of integrated flash that can be quite easily flashed with a self compiled version of ESP Easy.  You need to compile yourself as the builds available online are all made for the ESP8266 and will not work with the Sonoff Touch.

How to enable Samba on the HASSBian image

The videos prior to 1st Feb 2017 like Ben's one below all indicate the following instructions for installing Samba but if you use the HASSBian image like I've now done, the path to 'Home Assistant' in the samba.conf file is wrong.   [HOME ASSISTANT] path = /var/opt/homeassistant becomes

Enabling the integrated Mosquitto broker on the HASSbian image

The Home Assistant image HASSbian has the Mosquitto MQTT broker integrated into the image but it is not enabled by default. To get it working and persistent on reboot, perform the following: sudo systemctl enable mosquitto sudo systemctl start mosquitto sudo reboot To test, once your system is back up, type sudo systemctl status mosquitto.service and you should get back the following:

Adding 4 relays to your Home Assistant Pi with Arduino UNO

For those that want 4 relays cheaply using a clone of the Seeed studio V2.0 relay board available on AliExpress here , this is how it's configured in HA. Simply follow the Arduino instructions to load the Firmata firmware on your board then plug the Arduino board into your Raspberry Pi.

Getting HADashboard up and running on Jessie for use with Home Assistant

HADashboard is a very cool dashboard for use with Home Assistant. I’ve tested the installation process on a Raspberry Pi1 version B (yes I know) and although it took nearly a whole day to get working, work it does and by golly, does it look good. More info on GitHub here https://github.com/home-assistant/hadashboard First step is to install docker on your Raspberry Pi if you have never done that before: curl -sSL get.docker.com | sh If you would like to use Docker as a non-root user, you should now consider adding your user to the "docker" group with something like: sudo usermod -aG docker pi Set Docker to auto-start: sudo systemctl enable docker More info here and credit to Alex Ellis http://blog.alexellis.io/getting-started-with-docker-on-raspberry-pi/

My Notepad++ tricks when editing YAML files in Home Assistant

To comment out a whole section in one go: Highlight the text you want to comment out and use CTRL + Q. If you do this at the start of a line, it will only comment that line. CTRL + Q is toggle mode (comment on/off). CTRL + K will allow you to add multiple comments one after the other.

Installing ha-bridge on your Raspberry Pi

EDIT: Updated 14th June 2017 to reflect version 4.5.5. Default port is now 80 to keep Google Home happy and service now supports MQTT! Advice on backups also added 7th Feb. Version 4x also supports adding a Home Assistant instance which is great! Want to control your Vera, Harmony hub or Home Assistant entities with your Amazon echo or Google Home? ha-bridge is the best way to achieve that and installation is actually quite easy and takes less than 5 minutes. Here are the steps.

Using ESPEasy with Home Assistant via MQTT

Preface: I've just started playing around with Home Assistant on a Raspberry Pi and exploring the world of MQTT to control devices on the network. Learning curve is a bit steep but worth the effort as MQTT is very fast. The hardware and software tools I'm using are as follows: 2 x Sonoff relay units 2 x NodeMCU Boards ESPEasy firmware (must be version 121 or above as that contains the MQTT 'retain' flag option. Home Assistant software on Raspberry Pi2 MQTT Test Software: PC: MQTT.fx Android: MQTT Dashboard