HeishaMon icon indicating copy to clipboard operation
HeishaMon copied to clipboard

Except elseif also max and ceil are not accepted

Open blb4github opened this issue 2 years ago • 5 comments

I'm uning now the latest version (#397), I don't know if it is related to particular this version but max and ceil are not accepted. floor does work.

example:

on calculateWAR then
 if isset(@Z1_Heat_Curve_Target_Low_Temp) && isset(@Z1_Heat_Curve_Outside_High_Temp) && isset(@Z1_Heat_Curve_Target_High_Temp) && isset(@Z1_Heat_Curve_Outside_Low_Temp) && isset(@Outside_Temp) then
  $Ta1 = @Z1_Heat_Curve_Target_Low_Temp;
  $Tb1 = @Z1_Heat_Curve_Outside_High_Temp;
  $Ta2 = @Z1_Heat_Curve_Target_High_Temp;
  $Tb2 = @Z1_Heat_Curve_Outside_Low_Temp;
  $Tb3 = @Outside_Temp;
  if $Tb3 >= $Tb1 then
   #maxTa = $Ta1;
  else
   if $Tb3 <= $Tb2 then
    #maxTa = $Ta2;
   else
    #maxTa = ceil($Ta1 + (($Tb1 - $Tb3) * ($Ta2 - $Ta1) / ($Tb1 - $Tb2)));
   end
  end
 end
end

doesn't work,

on calculateWAR then
 if isset(@Z1_Heat_Curve_Target_Low_Temp) && isset(@Z1_Heat_Curve_Outside_High_Temp) && isset(@Z1_Heat_Curve_Target_High_Temp) && isset(@Z1_Heat_Curve_Outside_Low_Temp) && isset(@Outside_Temp) then
  $Ta1 = @Z1_Heat_Curve_Target_Low_Temp;
  $Tb1 = @Z1_Heat_Curve_Outside_High_Temp;
  $Ta2 = @Z1_Heat_Curve_Target_High_Temp;
  $Tb2 = @Z1_Heat_Curve_Outside_Low_Temp;
  $Tb3 = @Outside_Temp;
  if $Tb3 >= $Tb1 then
   #maxTa = $Ta1;
  else
   if $Tb3 <= $Tb2 then
    #maxTa = $Ta2;
   else
    #maxTa = floor($Ta1 + (($Tb1 - $Tb3) * ($Ta2 - $Ta1) / ($Tb1 - $Tb2)));
   end
  end
 end
end

blb4github avatar Oct 29 '23 00:10 blb4github

Good thing that these issues are all fixed in the latest rules library update. Only if someone would keep testing 😉

CurlyMoo avatar Oct 30 '23 18:10 CurlyMoo

It's really a problem to test as it's crashing so frequently and direct after reboot. I'm a bit puzzled how to help. I have loaded that version #C193 on my spare HeishaMon as well but that gives same problems.

Maybe you can give me some clear instructions what you want me to test.

blb4github avatar Oct 30 '23 21:10 blb4github

Does it also crash when you just start blank with nothing configured? As in, with a just resetted Heishamon

CurlyMoo avatar Oct 30 '23 21:10 CurlyMoo

I've tested it again on both my spare & my live HeishaMon. On the spare one, with nothing connected except serial1 for logging it works ok now. Not sure what's the difference now, I did -as far as I can recall - change the hostname of my spare HeishaMon, I guess this hostname is also used as MQTT client-id and I did get a lot of disconnects when both are powered on. The live one is still completely unstable, see attached log. I hope this is useful.... putty_Heishamon.log

blb4github avatar Oct 30 '23 23:10 blb4github

In regards to my instructions, you flashed this binary on a resetted spare Heishamon and that alone made the main Heishamon on 3.2.3 crash?

If that's so, I don't understand how that's possible when the spare Heishamon isn't connected to wifi after a full reset.

Op 31 okt. 2023 om 00:48 heeft blb4github @.***> het volgende geschreven:

 I've tested it again on both my spare & my live HeishaMon. On the spare one, with nothing connected except serial1 for logging it works ok now. Not sure what's the difference now, I did -as far as I can recall - change the hostname of my spare HeishaMon, I guess this hostname is also used as MQTT client-id and I did get a lot of disconnects when both are powered on. The live one is still completely unstable, see attached log. I hope this is useful....

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

CurlyMoo avatar Oct 31 '23 07:10 CurlyMoo

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 Oct 13 '24 02:10 github-actions[bot]

ceil and max functions do work in current version 3.8

blb4github avatar Oct 13 '24 19:10 blb4github