Getting started with a development and production instance on raspberry pi

I have updated some code for the directv component. It allows for multiple clients with genie and/or rvu clients. I just updated the code on my only raspberry pi. I would like to properly setup a dev environment and a stable/production environment so that my stable instance can run as expected and a dev environment to develop and test new code. I am new to python and to venv. Is it reasonable to have both on the same raspberry pi? If so, what would be the correct way to install a dev environment so that I can update the code and submit.

Thanks in advance for all the information. I am starting to learn the ins and outs of home assistant and python.

I would suggest that you follow Set Up Development Environment/. Now you could switch (git checkout branch) between the master branch and dev branch to run the stable release or the development version with the same configuration.

Thanks for help. I installed my installation using the all in one. Would it be best to start over and follow installation on the page you linked? Or is there a way to continue with the installation I already have?

You can have both on the same pi, but in my experience, even Pi3 is rather slow for development. tox -r takes well over an hour.

I have a test environment running in a VirtualBox virtual machine on my PC. It works for me because most of my hardware is accessed via mqtt or ethernet. If you have specific hardware on the Pi, it would be difficult.

Thanks for the idea. I think I’ll spin up a debian jessie vm and run the dev setup there. I currently do not have any physical connections so it should work.

Anyone managed to spin up a development instance using Hassbian? Or would I be better off installing from scratch on Jessie Lite? (I have a 2nd Raspberry Pi for tinkering).

1 Like