Repository navigation
software: Gitify node-red-dashboard - #573
Merged
Merged
Conversation
sonnyp
marked this pull request as ready for review
April 17, 2025 08:49
sonnyp
added a commit
that referenced
this pull request
Apr 17, 2025
Fixes #322 **planktoscopehat** This can be safely removed as documented in #322 (comment) It also fixes this nodered log spamming every 5s `Apr 17 11:22:22 pkscope-secret-authority-46635 Node-RED[124382]: 17 Apr 11:22:22 - [error] [rpi-gpio out:Fan] nrgpio python command not running` **adafruithat** The `flows.json` file was left untouched. --- Besides the removed package, `package-lock.json` was updated by `npm update` and staged to remove several unused dependencies. I used #573 to perform this update.
github-merge-queue Bot
pushed a commit
to PlanktoScope/pallet-standard
that referenced
this pull request
Apr 17, 2025
This PR follows up on fairscope/PlanktoScope#573 by removing the pallet's export of files which that PR overrides with a higher-priority drop-in file, to avoid confusion about the actual configuration of the system.
3 of 8 tasks
3 of 5 tasks
ethanjli
added a commit
that referenced
this pull request
May 20, 2025
As part of #182, this PR enables the user to switch between the adafruithat vs. planktoscopehat program variants by editing the SD card's `~/PlanktoScope/config.json` file and then rebooting (or restarting `nodered.service` and then restarting `planktoscope-org.device-backend.controller.service` after Node-RED becomes ready to receive MQTT messages, without a full system reboot). A minor caveat here is that GPS functionality is not available on planktoscopehat-based images running the adafruithat program variants (because of #591); but in the [2025-05-14 software meeting](https://docs.google.com/document/d/1AN1jaIdfKChKjMnzSd3ecjRTZGOnoglBfV9LCpevMgk/edit?tab=t.geukyqpm9ntj#heading=h.ziivhaa9au6q) I plan to propose deprecating GPS functionality from the adafruithat variants too. Specifically, this PR: - unifies the systemd services for the Python device controller into a single service, and this PR provides a single top-level entrypoint script which selects the adafruithat vs. planktoscopehat `main.py` script based on the ~configuration in `/usr/share/planktoscope/installer-config.yml`, in the same way that #573 selects adafruithat vs. planktoscopehat for the Node-RED dashboard~ `~/PlanktoScope/config.json` file's `acq_instrument` field (whose values are like `PlanktoScope v2.6`). See #583 (comment) and the [2025-05-07 software meeting](https://docs.google.com/document/d/1AN1jaIdfKChKjMnzSd3ecjRTZGOnoglBfV9LCpevMgk/edit?tab=t.geukyqpm9ntj#heading=h.81oklfxjwmel) for additional context on this step towards a piecemeal incremental unification of the adafruithat vs. planktoscopehat variants of the Python device controller. - updates the Node-RED dashboard's `settings.js` file to choose between the adafruithat vs. planktoscopehat variants of the dashboard based on the `~/PlanktoScope/config.json` file's `acq_instrument` field. - fixes a regression in the `fairscope-latest` image caused by #573, where the `fairscope-latest` image was unable to select the `planktoscopehat` Node-RED dashboard (because it was looking for a `fairscope-latest` variant of the dashboard). This PR also removes OS setup script support for "segmenter-only" images, since those images were never officially supported (and never documented in https://docs.planktoscope.community/reference/software/subsystems/installation/) and we stopped building them with #573. TODOs: - [x] Move the `if __name__ == "__main__"` code blocks in the adafruithat/planktoscopehat `main.py` files into a main function, so that we can invoke those scripts more cleanly, and so that we can make loguru-based logging work properly. This task is blocked by #600 due to the risk of messy merge conflicts with that PR. - [x] Move the loguru-based logger from the adafruithat/planktoscopehat `main.py` files to the hardware controller's top-level `main.py` file, so that log messages will be saved to file. - [x] Ensure that uncaught exceptions in the code are are logged to file by a top-level exception catcher via loguru. For future PRs (since this PR already touches a lot of files): - [ ] Move the `.../control/planktoscopehat/planktoscope/identity.py` & `.../control/planktoscopehat/planktoscope/mqtt.py` & `.../control/planktoscopehat/planktoscope/camera` & `.../control/planktoscopehat/planktoscope/imaging` driver modules to a shared, unified location (perhaps `../control/drivers`) which is used by both `.../planktoscopehat/main.py` and `.../adafruithat/main.py`, instead of having two (supposedly) identical of each module. - [ ] Move everything in `.../control/{variant}/planktoscope` to `.../control/{variant}`, to reduce redundancies the path names --------- Co-authored-by: Sonny Piers <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Configure node-red to use the git repository as
userDirso that changes to flows are visible in git.Here is the output of
git statusafter making changed in the node-red editor:settings.jsfile was copied from https://github.com/PlanktoScope/pallet-standard/blob/8fd23fded73b71d391d47a14ca79684cfcb6aeb7/packages/core/apps/planktoscope/node-red-dashboard/overlays/etc/nodered/settings.jsPreviously the setting file was setup using forklift https://github.com/PlanktoScope/pallet-standard/blob/8fd23fded73b71d391d47a14ca79684cfcb6aeb7/packages/core/apps/planktoscope/node-red-dashboard/overlays/etc/systemd/system/nodered.service.d/20-override.conf
This is "bypassing" forklift as I'm not familiar with it yet, it is unclear if it will remain and in any case dashboard 2 will likely deprecate this.