Introducing Simple Smarthome System

pbochenski

Pawel

Posted on September 5, 2019

Introducing Simple Smarthome System

Some developers like to have side projects that they can work on in their free time. I’m one of them. I always have some code and electronics lying around, waiting to be finished. This time I wanted to test my skills in back end and learn a little bit in the process. I have experience with Kotlin, so the obvious choice for me was to try Ktor.

This approach has the benefit of seeing Kotlin in action on other platforms since Kotlin multi platform might be a valuable tool in my toolbox. As frontend I’ve chosen Vue.js since I’ve already tried React in the past. Ok so I’ve got the tools, but what should I work on. The answer came to me when I was not satisfied with existing solutions in smart home dashboard environment.

What I didn’t like about existing solutions?

  • They are hard to configure
  • They have too many features
  • They are configured through configuration files with a little of documentation

So I decided to build my own. How hard can it be?

After more than half a year I present you Simple SmartHome System:
Dashboard
working
settings

It also works on mobile:
mobile

What can it do?

  • It can show latest status of devices.
  • Group devices into logical groups like rooms or garages
  • Send events back to mqtt broker

What is missing?

  • Rule engine that can change state of sensor based on events.

There are a couple of concepts I’ve tried to follow while developing SSS:

  1. It is based on MQTT. MQTT is standard in IoT world with a lot of devices already supporting it.
  2. It should easily integrate with two tools I use: zigbee2mqtt (gateway software that allows you to use proprietary zigbee devices without proprietary gateways) and Tasmota (open source firmware for devices based on ESP8622 chips).
  3. Everything should be configurable through UI.

Please see github for installation details and source code.

I’ve learned a couple of things during development. I think I like React more than Vue. MVVM approach of Vue is nice, but observable variables didn’t always work as expected. Kotlin is superb technology even on backend, but Ktor is not opinionated at all, so I needed to figure out a lot of stuff like which database to use and what is database connection pool :)

I need to mention great support from Netguru in developing this tool. Not only I have opportunity to promote it here, host it on netguru github, but also great people on Vue team helped me with this framework. Growing in Netguru is a pleasure :)

💖 💪 🙅 🚩
pbochenski
Pawel

Posted on September 5, 2019

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Introducing Simple Smarthome System
kotlin Introducing Simple Smarthome System

September 5, 2019