Smart home – almost final version

During Christmas time I had finally some free time to take care of this forgotten project. With new RaspberryPi 4 and new SD card I installed Home Assistant using Balena image of HA 2021.12.5. New version of HA installs smoothly without the problems and runs fast.

Afterwards I started to create my dashboards – redefining this time requirements. After 2 years of remote work and school, now I need to see:

  • local news (including COVID restrictions)
  • dinner’s list (as at my home question: what is for dinner is asked at least 3 times per day) and good online recipes book
  • Radio Gdansk integration
  • Integration with local bus and trams plan –
  • Google calendar and weather forecasts
  • And now steering of: automatically opened window, all Chromecasts at my flat, smart lights(2 bedrooms), smartplugs(for switching on Christmas lights on balcony and on Christmas tree), RGB LED strip, Xbox, Minecraft server
  • VULCAN lesson plan integration

Most of the integrations were easy to achieve by default HA integrations – like www panel: news, recipes book, radio, bus and trams plan. Dinner’s list was prepared using this integration: Google calendar was integrated using Weather forecast was also easily done using . Chromecasts, Xbox were automatically detected by HA as they work using wifi.

The harder part were: smartlights, smartplugs, RGB LED strip. As they are using TUYA standard I thought that they would be detected automatically. However it doesn’t work that way;) It turned out that they have to be added to Android app: Smart life and then using special Token from TUYA Cloud added to HA. As we didn’t want to go that way – we prefer to steer these things using our cell phones and unfortunately account used in SmartLife was Google account, which couldn’t be used in TUYA Cloud so easily to generate token, I decided to make some workaround here and use this website to connect to my devices using TUYA Cloud: with my second email address.

VULCAN lesson plan integration was achieved thanks to this excelent addon:

Integration with our Minecraft server was added using this simple script in configuration.yml:

  start_minecraftserver: "ssh -i /config/ssh/id_rsa -o 'StrictHostKeyChecking=no' minecraft@minecraftServer.local '~/'"
  stop_minecraftserver: "ssh -i /config/ssh/id_rsa -o 'StrictHostKeyChecking=no' minecraft@minecraftServer.local '~/'"
    alias: Start Minecraft Server
      service: shell_command.start_minecraftserver
    alias: Stop Minecraft Server
      service: shell_command.stop_minecraftserver
  - platform: command_line
    scan_interval: 20
    name: minecraft_status
    command: "ssh -i /config/ssh/id_rsa -o 'StrictHostKeyChecking=no' minecraft@minecraftServer.local '~/'"  

More info on shell_commands and HA can be found here:

Next part of the project was of course monitoring – which was easily achieved with Grafana and InfluxDB and this set of integrations:

  • System monitor platform

  • and Addon Grafana and InfluxDB.

InflluxDB was configured to catch state of all sensors in HA using this configuration:

  username: homeassistant
  password: !secret my_password
  max_retries: 3
  default_measurement: state

The last part was printing proper „hanger” for Chromebook which is used as display of main Home assistant dashboard. Hanger was of course printed using 3D printer.

Here are some photos of final product:

What else could be automated you could ask:

autowatering of plants

backups to Google Cloud of whole installation

I must admit so far it has been running for one month without any issues.

Dodaj komentarz

Twój adres e-mail nie zostanie opublikowany.