Skip to content

Conversation

sam2kb
Copy link

@sam2kb sam2kb commented Sep 23, 2025

Key Changes

  1. Configurable RS‑485 transmit pacing via new controller.txDelays for finer collision avoidance and throughput tuning.
  2. Startup & config resilience: empty or invalid config.json now auto‑recreated from defaults, corrupt originals backed up.
  3. Latitude / longitude environment overrides to eliminate early heliotrope warnings prior to UI configuration.
  4. Version check enhancements: git detection, safer redirects, throttled polling, warning suppression.
  5. Docker improvements: fixed Dockerfile and added docker‑compose example with named volumes & environment variable guidance.
  6. Add workflow to build and publish docker images to GitHub Container registry.
  7. Runtime requirements: elevated minimum Node.js version to 20+, safe dependency and security/patch updates.
  8. Documentation updates.

I also fixed a few things in the dash app and will make a PR there as well. Both the server and dash docker images run great as a custom app in my TrueNAS with a forwarded USB-RS485 adapter to SunTouch pool controller.

@tagyoureit
Copy link
Owner

Thanks, a lot of good work here.

  • Why the need to re-write the comms (transmit pacing)? This hasn't really been an issue and the retry normally remedies any conflict.
  • Any reason not to combine the github workflows (see below)?
  • How did you generate the .github/copilot-instructions.md? Mostly curious on this as I haven't seen this type of doc before.

The requirement to move to Node v20 is a big jump (and not straightforward for many users). This would need to be done in sync with Dashpanel and REM. I'll wait for your PR on dP but REM will need to be updated as well.

-- Github workflows combined

name: Publish Docker Image (DockerHub + GHCR)

on:
  push:
    branches:
      - master
    tags:
      - "v*.*.*"
  workflow_dispatch:

jobs:
  build-and-push:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Docker meta
        id: meta
        uses: docker/metadata-action@v5
        with:
          images: |
            tagyoureit/njspc
            ghcr.io/${{ github.repository_owner }}/njspc
          tags: |
            type=ref,event=branch
            type=ref,event=pr
            type=semver,pattern={{version}}
            type=semver,pattern={{major}}.{{minor}}
            type=semver,pattern={{major}}
            type=sha
            type=raw,value=latest,enable={{is_default_branch}}
          labels: |
            org.opencontainers.image.source=${{ github.repository }}
            org.opencontainers.image.revision=${{ github.sha }}
            org.opencontainers.image.title=njspc
            org.opencontainers.image.description=Pentair pool controller bridge (multi-registry)

      - name: Set up QEMU
        uses: docker/setup-qemu-action@v3

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3

      - name: Login to Docker Hub
        uses: docker/login-action@v3
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}

      - name: Login to GHCR
        uses: docker/login-action@v3
        with:
          registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - name: Build and push (DockerHub + GHCR)
        uses: docker/build-push-action@v6
        with:
          context: .
          push: true
          platforms: linux/amd64,linux/arm64,linux/arm/v7
          tags: ${{ steps.meta.outputs.tags }}
          labels: ${{ steps.meta.outputs.labels }}
          cache-from: type=gha
          cache-to: type=gha,mode=max

      - name: Echo published tags
        run: |
          echo "Published: ${{ steps.meta.outputs.tags }}"

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