Skip to content

Bug: Pekaway Wireless Shunt polling ignores "Activate Wireless Shunt" toggle #5

@kai-osthoff

Description

@kai-osthoff

Bug Description

The Pekaway Wireless Shunt flow continuously polls 127.0.0.1:8080 every 10 seconds even when "Activate Wireless Shunt" is disabled in the UI. This causes constant RequestError: connect ECONNREFUSED 127.0.0.1:8080 errors in the Node-RED logs.

Expected Behavior

When pkwshuntactive is false (toggle disabled), no HTTP requests should be made to the Python web service on port 8080.

Actual Behavior

The flow only checks relayboard_core before polling, ignoring the pkwshuntactive global variable entirely.

Affected Flows & Nodes

pekaway-shunt-waterlevel-python flow:

Switch Node ID Name Wires to
7d0ce2244ed38794 "check relayboard" HTTP requests to /levels, /shunt
f76253ed9fb8e3b1 "check relayboard" HTTP requests to /check

config flow:

Switch Node ID Name Wires to
e641fcfa636b01c4 "check relayboard" HTTP request to /levels
8ec705cf0cf9e396 "check relayboard" HTTP request to /levels

Root Cause

All 4 switch nodes only check:

global.get("relayboard_core") == true

But they should also check:

global.get("pkwshuntactive") == true

Suggested Fix

Add a second switch node after each "check relayboard" switch that gates on pkwshuntactive == true before allowing HTTP requests to proceed.

Example fix pattern:

[check relayboard] → [check pkwshuntactive] → [HTTP request to 8080]

Environment

  • VAN PI Core OS
  • Node-RED v3.x
  • Raspberry Pi

Workaround

Users can manually add switch nodes checking pkwshuntactive between the existing "check relayboard" switches and the HTTP request nodes.


Label

bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions