Looking for advice on how to organise an application I've written.
The app has two components, the first is a monitor for controlling the fermentation of beer so it senses the temperature and turns solenoids on and off to chill when necessary. The monitor writes sensor values to a database and reads from the database the temperature setpoints and other data about the tank contents to make chilling decisions. There are several of these monitors in the brewery, each controlling up to a dozen tanks.
The second part is the database and web server which displays the information in the database as raw numbers and as charts and allows the user to set parameters. It also interfaces with other systems in the brewery. I want one of these to bring together the monitors in one place.
The two components are currently in one app running on RPi but I'd like to be able to run the database component on more substantial hardware, potentially in the cloud. The two parts share a fair amount of code so I'd ideally like to have it as one codebase with an environment variable that controlled what "mode" the app was running in. Most of the shared code is for generating HTML pages to display data (right now my app uses plain HTML pages but I am looking to move it to UI Builder).
The problem is that the code uses RPi specific nodes that can't be installed on non Rpi hardware so the app won't deploy. Of course I could just use a RPi for the database/web server component which is the direction I'm headed if I can't solve this problem.
So is there any way to...
- Allow the code to be deployed with certain nodes missing? (that will never be executed)
- Share Node-Red flows between two apps and keep both in sync if changed?
Ideally I'd like to stay away from creating custom nodes.