Interview with Danny Bloemendaal (creator of dzVents)

0
2837
dzevents danny bloemendaal

Contents

Interview with Danny Bloemendaal

In our series of interviews with some of the key figures of the Domoticz community, we started with Mark Heinis, the creator of the Domoticz apps for Android and iOS. Today we have an interview with Danny Bloemendaal, the creator of dzVents. dzVents stands for Domoticz Easy Events and is a system that allows a user to scripts actions based on events and conditions in Domoticz. Let’s find out how he got to building dzVents, how he applies Domoticz at home and what his visions are on Domoticz, the community and smart homes in general.

Can you give us a little introduction of who you are?

I am 48 years old, father of two kids (19 and 16) living together with my girlfriend. I work as a software engineer/UX designer and develop web applications for a company specialized in GIS (geographical information systems). I mainly build web applications using JavaScript, SASS, React, ES6, Flow, NodeJS etc. My background is User Interface Design and Computer Science and I started my career working for a company specialized in User Interface Design and User Experience design (UX). Designed and developed many applications. After 20 years I moved to my current company.

One of my hobbies is, of course, domotica, building hardware (sensor etc. using ESP8266 is always fun). Right now I am assembling my first 3D printer (Prusa I3 Mark3) so that’s going to be a lot of fun as well. I hope.

You and Domoticz

How did you come in contact with Domoticz?

I wanted to slowly start making my house more ‘intelligent’ and was looking for software that supported z-wave devices. Then I stumbled upon Domoticz and more or less stuck with it ever since. Guess that was at least 5 years ago. Now my house is almost fully automated. Well, sort of.

Can you describe your first experience with Domoticz?

From a UX perspective I was not really attracted to Domoticz as I believe it had (and still has) serious usability issues, incomplete documentation, and a steep learning curve. But on the other hand, it was very versatile and supported a lot of hardware with a large community. So I slowly got a hang of Domoticz with ups and downs. And I always have the philosophy that if you don’t like what you see, help make it better yourself. Which I did.

Can you give us a view of your home? What hardware, scripts and clever things do you use?

My house is part of a double (two-under-one-roof) with quite some living space and a huge garden. There are about 10 rooms (include bathroom). There are about 50 z-wave devices controlling lights, alarm units, ventilators, door sensors, motion detectors etc. For heating, I use EvoHome with 10 zones. Also, I have a bunch of ESP8266 (espEasy) sensors around the house as well for various stuff: detecting roof-gutter overflow, washing machine overflow, gas/electricity/water counters, motion detectors. Currently, I am making prototypes for soil sensors in the garden and link that to the watering system. That watering system will also be controlled using ESP8266 modules in the near future.

I have a bunch of dzVents scripts that make stuff even more interesting. Like detecting when people get home at night so the lights go on as soon as the door is opened. Or smart bathroom humidity control, extensive fire-alarm support using smoke detectors, room temperature sensors and a chimney temperature sensor. When the alarm is activated all members of the family get informed using push messages (where exactly in the house the fire was detected for escape planning), all the necessary lights will go on and alarm sounds will ring. If somebody turns off the alarm (false alarm) all the lights will go back to their pre-alarm state.

That and a lot more.

How do you see the future of Domoticz?

Well, I think it can have a future for quite some time.

Where do you see opportunities and dangers?

One of the biggest dangers is the state of the codebase. It evolved into a complex and hard to maintain due to a lack of modularity and documentation and foremost the lack of unit-tests and integration tests (apart from dzVents). That means that if someone pokes at one end of the code something somewhere else in the code may break without people noticing it. You already see that Domoticz never reaches a stable state and more often than not things break at unpredicted locations. Right now many devs are adding more and more stuff without dealing with this fundamental problem. The thing concerning me the most is that at some point the effort of changing things will be so high that people stop developing and the project gets abandoned.

I hope that somehow people with lots of C++ knowledge get together and refactor most of the codebase.

Would you advise Domoticz to others and why?

It depends if people are capable of dealing with a complex system and are willing to spend quite some time trying to figure out how stuff works. So I have advised some friends to use it and others not to use it.

Your work

You are the creator of DzVents.  Can you tell us something about it (for the viewer who never heard of it)

dzVents is a framework that helps you write event scripts for Domoticz. It is entirely based on Lua (because the original event system is also based on Lua). It provides you with a logical object model allowing you to interact with all your assets in your system. Lua wouldn’t have been my choice (mainly because I didn’t know it) but it is very similar to JavaScript so I could get started quickly.

What made you start dzVents?

My first event scripts I wrote for Domoticz were made with Lua and I had to deal with the traditional way of working with commandArrays, device_xxx tables etc. and scattered documentation. I was annoyed by the way you had to interact with Domoticz and how you have to do crazy things in code to get all the information needed to write your events. There wasn’t a clear object model and the learning curve was steep. Documentation was something else. Scattered, incomplete, inaccurate etc. You had to write a lot of code to do the simplest of things. So, given my experience over the years on how to do these things better, I decided to start writing a layer on top of Lua that collects all the data given by Domoticz and massage all the scattered data tables into a clear object model/API. That resulted in dzVents (some weird contraction of DomoticZ eVents, but the beast gotta have a name). And quickly people started to use and recognize the beautify of it. I received a lot of feedback allowing me to improve stuff quickly. At first, dzVents was separate from Domoticz and you had to download it from GitHub and copy it into your Domoticz install. At some point, Gizmocus asked me to integrate it into Domoticz and with the help of Joost van den Broek and Scott Ling we moved stuff over to Domoticz. I did a complete rewrite of dzVents and Domoticz itself was adapted to provide even more data to the event system and from then on we had a better path of improving and extending dzVents. I also took the effort to document everything quite extensively and keep it up to date and actual because that is a key part of making things usable. My goal is to provide experienced programmers AND beginners with an easy and powerful framework so documentation is everything. On top of that, the dzVents system is heavily unit tested including about 100 integration tests so I think dzVents is the only part in Domoticz that has almost 100% test coverage.

What about dzVents are you most proud of?

The ease-of-use and the completeness of dzVents. I get a lot of compliments. My biggest goal is to make software that makes people happier and I believe I’ve achieved that with dzVents.

What were the biggest challenges?

Getting people to know and learn dzVents. There are and were a lot of misconceptions like dzVents being only for beginners. So not true. But I learned to ignore people who stubbornly just don’t get it.

Do you notice a lot of users who help you improve dzVents?

I am happy there are a couple of users who help me provide support to people getting to learn dzVents so I don’t have to do it all by myself. So most of the improvement support so far is users giving me new ideas or provide improvements/suggestions.

What can you tell the people who want to start with dzVents?

RTFM 🙂

What can we expect from you in the future?

There is not really a roadmap but I do have some ideas for the near future like being able to create new hardware from a script and have system events like a trigger when Domoticz starts or when a backup is made etc.

Other plans?

Maybe help to improve the release process of Domoticz in the near future.

We love the documentation and work of Danny!  Read more about DzVents @ domoticz.com/wiki