HeishaMon icon indicating copy to clipboard operation
HeishaMon copied to clipboard

Force loading Rules - Without Function

Open Binifada1956 opened this issue 2 months ago • 9 comments

Heishamon large, Firmware actuell

There have been several reports of this kind in the past. Now it has happened to me. There was a power outage last night. Heishamon started up correctly, but the ruleset was not loaded. As a result, the heat pump did not start up during the night.

Image

Binifada1956 avatar Oct 23 '25 13:10 Binifada1956

See also #727

Roelaynd avatar Oct 27 '25 07:10 Roelaynd

See also #727

Yes, indeed. We are surely not the only two.

Binifada1956 avatar Oct 27 '25 10:10 Binifada1956

Ik heb een work-around via Home Assistant:

alias: HeishaMon rules crash & restore
description: ""
triggers:
  - trigger: numeric_state
    entity_id:
      - sensor.panasonic_heat_pump_stats_14
    below: 5
  - trigger: state
    entity_id:
      - sensor.panasonic_heat_pump_stats_14
    to: unknown
conditions: []
actions:
  - action: notify.pushover
    metadata: {}
    data:
      message: Heishamon rules restored
      title: HeishaMon
  - action: shell_command.heishamon_save_rules
    metadata: {}
    data: {}
mode: single

Met in configuration.yaml:

shell_command:
  heishamon_save_rules: 'curl -s -X POST http://<IP ADDRESS HEISHAMON>/saverules -F rules=@/config/HeishaMon_rules.lua'

En in de config directory dus een file met de naam HeishaMon_rules.lua met mijn actuele ruleset

blb4github avatar Nov 05 '25 11:11 blb4github

I can also confirm this issue and it's very easy to reproduce using following rule set

on System#Boot then
  print('DEBUG: Heishamon rules start');
  setTimer(1, 10);
end

on SetTargetTemperature($Temp) then
  #Setpoint = $Temp;
end

on timer=1 then
  #TempMax   = 25;
  #CompState = 0;
  #Setpoint  = 25;
  if #CompState == 1 && @Main_Outlet_Temp >= #Setpoint + 2 then
    if     #Setpoint < #TempMax - 1 then
      SetTargetTemperature(#Setpoint + 2);
    elseif #Setpoint < #TempMax     then
      SetTargetTemperature(#Setpoint + 1);
    end
  end
end

Uploading this test rule set via http://heishamon.local/ works without problems. It also starts without error. By resetting the heishamon-board (via reset button) the rules does not start and I can see following error 4611: ERROR: cannot compare < with a left char value

Please fix this issue !

Many thanks, lakeroe

kakariki1 avatar Nov 13 '25 13:11 kakariki1

I do see similar errors several times, e.g. as well: ERROR: cannot compare != with a right char value

blb4github avatar Nov 13 '25 14:11 blb4github

Do you think this will ever get fixed ? I would do it myself if I could ...

kakariki1 avatar Nov 13 '25 14:11 kakariki1

Ik heb een work-around via Home Assistant:

alias: HeishaMon rules crash & restore
description: ""
triggers:
  - trigger: numeric_state
    entity_id:
      - sensor.panasonic_heat_pump_stats_14
    below: 5
  - trigger: state
    entity_id:
      - sensor.panasonic_heat_pump_stats_14
    to: unknown
conditions: []
actions:
  - action: notify.pushover
    metadata: {}
    data:
      message: Heishamon rules restored
      title: HeishaMon
  - action: shell_command.heishamon_save_rules
    metadata: {}
    data: {}
mode: single

Met in configuration.yaml:

shell_command:
  heishamon_save_rules: 'curl -s -X POST http://<IP ADDRESS HEISHAMON>/saverules -F rules=@/config/HeishaMon_rules.lua'

En in de config directory dus een file met de naam HeishaMon_rules.lua met mijn actuele ruleset

Implemented your solution today. It works wonderfully.

Of course, this feature should work, especially since it is specifically offered in the settings. Not everyone can switch to Home Assistant.

Binifada1956 avatar Nov 14 '25 08:11 Binifada1956

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Dec 15 '25 03:12 github-actions[bot]

… not solved 🤷‍♂️

Binifada1956 avatar Dec 15 '25 06:12 Binifada1956