Skip to content

Fix optional PCB commands in rules not taking effect on ESP32#856

Closed
IgorYbema wants to merge 1 commit intoheishamon:mainfrom
IgorYbema:main
Closed

Fix optional PCB commands in rules not taking effect on ESP32#856
IgorYbema wants to merge 1 commit intoheishamon:mainfrom
IgorYbema:main

Conversation

@IgorYbema
Copy link
Copy Markdown
Member

On ESP32 the periodic optional PCB send runs in a FreeRTOS task that reads exclusively from pcbQueue via xQueuePeek. When a rule executed an optional PCB command (e.g. @SetZ2WaterTemp = 45), set_xxx_temp() correctly updated optionalPCBQuery but never wrote the new value to pcbQueue, so the task kept sending stale data indefinitely.

The MQTT path (send_heatpump_command) already called xQueueOverwrite after invoking the command function. Apply the same fix in vm_value_set so rules have the same behaviour.

On ESP8266 the periodic send reads optionalPCBQuery directly, so no change in behaviour there.

On ESP32 the periodic optional PCB send runs in a FreeRTOS task that
reads exclusively from pcbQueue via xQueuePeek. When a rule executed
an optional PCB command (e.g. @SetZ2WaterTemp = 45), set_xxx_temp()
correctly updated optionalPCBQuery but never wrote the new value to
pcbQueue, so the task kept sending stale data indefinitely.

The MQTT path (send_heatpump_command) already called xQueueOverwrite
after invoking the command function. Apply the same fix in vm_value_set
so rules have the same behaviour.

On ESP8266 the periodic send reads optionalPCBQuery directly, so no
change in behaviour there.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@IgorYbema IgorYbema closed this Apr 3, 2026
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.

1 participant