sjenkins Posted Tuesday at 05:26 PM Posted Tuesday at 05:26 PM (edited) Rewrite of the plugin is complete. If you are wondering "why mess with what is working?", I agree in that principle which is why since taking over the plugin I've kind of been a light touch. Except for the garage node which I started from scratch. I am sensitive to breaking someone's automation. Basically the code was pretty messy. Tough to read & maintain, as well there are some things which have moved forward in the udi_interface library. There was a lot of repetitive code, so I moved functions to a helper utility library, and consolidated all the TEMP nodes into one file. Finally, persistence was moved from *.db files to the provided api of the poly.Data structure. The majority of this should not be breaking or even force you to modify your code. Temperature users may have some changes due to the inconsistent use of precision in the original code. The code should be much easier to maintain, add features, or new nodes. Please take a look in the GITHUB & feel free to make comments. I held off on some other "improvements" which I knew would be breaking. The way changes are made in the UI for temperature are really ugly ; as well the precision setting is better set in the variables used. I could make a new node to clean this up, but I am not clear even on how many people use each node type. Some features which have been added (let me know if there are any more, or new nodes, you are interested in: controller: status follows if plugin is running number of nodes switch: cmd fixed so can be added to scenes TOGGLE generic / dimmer cmd fixed so can be added to scenes persistence was fixed & added to on-level could add TOGGLE if there is interest?? temp consistent behaviour due to one file persistence was inconsistent writing of variables only with changes precision handled more consistently (this may cause some program issues) garage this was a mess ; I started out writing a virtual node and ended up writing a Ratgdo interface. It does both, but likely should be two separate nodes. The clean-up makes that next step possible. This would be breaking to Ratgdo users (if there are any besides me ) sse client re-written, more solid persistence fixed I WILL LEAVE THIS IN BETA (NON-PRODUCTION) FOR ABOUT A WEEK BEFORE MOVING TO PRODUCTION ALSO, REMEMBER - tick the box in configuration to give the plugin ISY access, this lets it write to variables!!!! VERSION = '3.1.20' """ 3.1.20 DONE fix controller ST "status" on at start, off at stop / delete, "control" still heartbeat DONE garage send CMDs, motor, motion, obstruction ; get naming consistent DONE standardize startup sequence DONE rewrite checkParams, Discovery DONE add NumberOfNodes DONE switch/generic/dimmer/temp(R/C): nodes use polyglot persistence, delete old db files DONE swtich cmd TOGGLE add DONE consolidate temp, tempC, tempRC into one module DONE temp variable writing now with shortPoll (only upon change, considers precision) DONE refactor function naming DONE refactor garage, fix persistence, sse client DONE backfeed garage improvements to switch(done), generic(done), temperature() Edited Tuesday at 07:31 PM by sjenkins 3 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.