Mycodo
Mycodo copied to clipboard
Controllers version control and copy
I have complex and big code Conditional Controllers. Some are in production and I need to make testing for new features without taking the risk to damage production.
I would like the following features:
- Copy controllers with same UUIDs for backup
- Copy controllers with new UUIDs for testing (change parameters, durations, etc): UUIDs would be changed in the code too
- Have an independent Git version control for each Conditional Controllers code
Alternatives (point to point):
- Existing backup feature but it is global
- Copy the code to external file, create a new Conditional Controller, declare the I/O, get the UUIDs, build a
sed
file for all UUIDs original vs new, paste the new code: long and inefficient - Manage thje code in an external Git repository and copy/past as desired: long and inefficient
It would be nice to integrate such features.
At the moment, the best way to preserve a particular configuration, including all controllers, is to perform a settings export. You can then import that settings file later and restore your system exactly how it was.
For large or complex code, I'd recommend creating a custom function module. This would allow you to use the UI dropdown to select Inputs/Outputs/Functions and not have to deal with UUIDs.
Hi Kyle, I don't catch it ("I'd recommend creating a custom function module. This would allow you to use the UI dropdown to select Inputs/Outputs/Functions and not have to deal with UUIDs"), could you elaborate please?