Skip to content

update_times.json changed#20

Closed
MadPatrick wants to merge 0 commit into
adrighem:masterfrom
MadPatrick:master
Closed

update_times.json changed#20
MadPatrick wants to merge 0 commit into
adrighem:masterfrom
MadPatrick:master

Conversation

@MadPatrick

Copy link
Copy Markdown

Also added pyplugin to list of installed plugins so you know there is an update
Fixed a few bugs

@MadPatrick

Copy link
Copy Markdown
Author

Could not completly restore to the repo and maybe change a bit to much ;-)

@MadPatrick

Copy link
Copy Markdown
Author

maybe it is better to remove all "domoticz"- prefix

"Domoticz-Xiaomi-Mi-Air-Purifier-MIoT-Plugin": "2021-12-26T14:12:18Z",
"domoticz-ewpe-smart-mqtt-plugin": "2021-09-04T19:21:15Z",
"domoticz_htu20d_python": "2021-08-19T09:22:03Z",
"Domoticz-LGTV-WebOS-Plugin": "2021-08-17T10:51:08Z",
"Domoticz-Zigpy": "2021-06-08T12:08:49Z",
"domoticz-nuki": "2021-05-16T18:54:26Z",
"domoticz-python": "2021-03-25T15:28:13Z",
"domoticz-woonveilig-gate03": "2021-02-22T21:15:06Z",
"Domoticz-VirtualThermostat-PID": "2020-12-28T22:00:59Z",
"domoticz-andino-x1": "2020-12-21T20:29:14Z",
"HYD6000": "2020-11-22T15:35:49Z",
"domoticz-onkyo-plugin": "2020-11-21T14:37:16Z",
"domoticz-quick-access-mobile": "2020-10-21T06:59:15Z",
"domoticz-plugin-sony-audio": "2020-07-25T15:51:07Z",
"domoticz-h801-tasmota-plugin": "2020-07-06T14:10:58Z",

This make the directory structure unreadable

@adrighem

Copy link
Copy Markdown
Owner

Thanks for the quick follow-up from PR #19 and for narrowing the idea here.

The update-time behavior you’re aiming for makes sense: keeping local update_times.json in sync with installed plugin git state could make the UI more accurate for installed plugins.

There are a few changes needed before this can be merged:

  1. Please make plugin_core.py the source of the change.
    plugin.py is generated from plugin_core.py, so hand-editing plugin.py makes CI fail and the update-time logic would disappear the next time the generator runs.

  2. After moving the logic into plugin_core.py, run:

    python .github/scripts/generate_plugin.py
    pytest -q
  3. Please keep this PR focused on the update-time behavior.
    The current diff also includes unrelated changes in plugin_core.py, including changes to security scanning, restart fallbacks, dependency installation fallback behavior, and debug/error logging. Those should be reverted or moved to separate PRs so this change can be reviewed safely.

  4. Please add or update tests for the intended behavior:

    • local update_times.json is merged with GitHub data
    • install/update writes the plugin commit timestamp locally
    • checking for updates can record the remote tracking branch timestamp without breaking normal update detection

Once the update-time changes live in plugin_core.py, plugin.py is regenerated, and the unrelated changes are removed, this should be much easier to review.

@adrighem

Copy link
Copy Markdown
Owner

Good point, I agree that the repeated domoticz- prefixes make the list harder to scan.

I probably won’t solve this by renaming the registry keys directly, because those keys are currently also used as the install folder names. Changing them would risk breaking existing installs or making updates harder to match.

The direction I’m thinking of is to keep the internal key stable, but add a cleaner display name in the UI. For example, the registry/install key could stay domoticz-onkyo-plugin, while the UI shows something like Onkyo or Onkyo Plugin.

That should make the store and installed plugin list easier to read without breaking folder names, update checks, or existing installations. I’ll look at adding a small display-name/normalization layer for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants