Development environment

Just curious how many people have a development environment for their HA system.

Do you have both your dev and prod connecting to the same items (hue, zwave, ect) or do you bring up your dev specifically when doing dev work?

I try to keep my development setup pretty minimal, with one or two bindings most of the time. This instance is installed on my laptop. The bindings talk to the “real” hardware though.

Then, when the setup is working to my satisfaction, I transfer the configuration (I use file based configuration as much as possible) to my “productive” instance on the Pi.

That’s kind of what I am planning. I am starting to step in to the openhab2 world and need to start playing with the setup/config to see if i can replicate my HA system.

I am running my production system on an old laptop (sort of headless, as I more or less only use ssh to work on it).

My development system is on my normal day-to-day use desktop. Both systems are running Ubuntu 16.04 and OpenHAB 2.0. All configuration files (I also tend to do as much as possible in text files) are stored on Dropbox, where I have two separate folders; one for production files and one for development files. Copying from development to production I handle manually once I have tested the new features.

On the development system I have no bindings installed, so that all my items are “virtual”, i.e. not connected to any binding and/or physical thing. For testing, I use the REST API to “inject & verify” state information.

I have also written a very simple python class as a wrapper around the REST API, and started playing with using the Python Unit test framework (https://docs.python.org/2/library/unittest.html) for regression testing of existing functionality.

1 Like

Ah, this sounds interesting. Maybe you could write a small howto when you have further progress with your testing setup?