Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

v3.1.20 in beta ; rewrite completed

Featured Replies

Posted

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 by sjenkins

Guest
This topic is now closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.