Thermostat in bathroom

Need advise with a thermostat in the bathroom.
Cant figure out why this simple webcore script doesn’t work?
What difference does the “N” (Never cancel) do?

Can you help us by turning on full logs and trace and posting those please?

Here is the log (not shore how I turn on “trace”?):
2021-01-19 12:36:00 +30ms
+0ms ╔Starting piston… (v0.3.110.20191009)
+704ms ║╔Subscribing to devices…
+744ms ║║Subscribing to Paradiset.alarmSystemStatus…
+830ms ║║Subscribing to Badrum - Temp…
+831ms ║║Subscribing to Badrum - Termostat…
+832ms ║║Subscribing to Garage - Motorvärmare Höger…
+833ms ║╚Finished subscribing (141ms)
+861ms ║Comparison (integer) 55 is_greater_than_or_equal_to (integer) 80 = false (1ms)
+868ms ║Comparison (string) :0bab7b934ff39f6b0a860022ba9b9949: is (string) :0bab7b934ff39f6b0a860022ba9b9949: = true (1ms)
+886ms ║Comparison (decimal) -2.4 is_less_than_or_equal_to (integer) 5 = true (2ms)
+893ms ║Comparison (string) off changes_to (string) off = false (1ms)
+902ms ║Comparison (string) 12:36 changes_to (string) 12:40 = false (0ms)
+907ms ║Comparison (string) :0bab7b934ff39f6b0a860022ba9b9949: is (string) :c0a236338ed0c9651e67d538ee5e00e3: = false (1ms)
+914ms ╚Piston successfully started (914ms)
2021-01-19 09:54:11 +289ms
+1ms ╔Starting piston… (v0.3.110.20191009)
+710ms ║╔Subscribing to devices…
+727ms ║║Subscribing to Paradiset.alarmSystemStatus…
+795ms ║║Subscribing to Badrum - Temp…
+796ms ║║Subscribing to Badrum - Termostat…
+797ms ║║Subscribing to Garage - Motorvärmare Höger…
+798ms ║╚Finished subscribing (98ms)
+900ms ╚Piston successfully started (899ms)
2021-01-19 09:49:05 +251ms
+1ms ╔Starting piston… (v0.3.110.20191009)
+530ms ║╔Subscribing to devices…
+570ms ║║Subscribing to Paradiset.alarmSystemStatus…
+638ms ║║Subscribing to Badrum - Temp…
+639ms ║║Subscribing to Badrum - Termostat…
+640ms ║║Subscribing to Garage - Motorvärmare Höger…
+641ms ║╚Finished subscribing (122ms)
+733ms ╚Piston successfully started (732ms)

Two noticeable problems…

  1. lack of triggers in the piston
  2. the one trigger you do have will never work. The second IF block has Smart Home Monitor status which no longer works in webcore since they shut down the classic app and that part of the platform.

Good place to get assistance on building pistons is the webcore forum

1 Like

Fixing these two would at least get your piston firing to then see either results or have more data for logs. When building pistons you can see determinations as conditions or triggers. In your case “humidity IS greater than 80%” is a condition versus (for example) “humidity RISES ABOVE 80%” which would be a trigger.

This is a great resource! Havent been able to fix anything I’ve broken myself yet :sunglasses:

Just to provide some basic insight to this question. The N refers to “never” in the cancelation policy aspect of the piston. It applies to that section of code (the IF block) within your piston running regardless of piston or condition state change. In other words if you have a piston and its triggered, in the process of going through your piston, if it gets to that block of code it will evaluate if the original condition/trigger is still true. Setting the cancellation policy to never will always execute that block. That doesn’t mean that every time you build an IF block you should set the cancelation policy to never because there are instances where you want that safeguard. The webcore forum has a thread dedicated to this very cancelation policy setting because its not always that simple to interpret .

1 Like

Thanks for the feedback.
I changed the triggers and removed the Smart Home Monitor status variables.
Does it look better now?

2021-01-25 12:02:41 +596ms
+1ms ╔Received event [Garage - Motorvärmare Höger].temperature = -3.4 with a delay of 88ms
+86ms ║RunTime Analysis CS > 20ms > PS > 5ms > PE > 60ms > CE
+88ms ║Runtime (41014 bytes) successfully initialized in 5ms (v0.3.110.20191009) (86ms)
+89ms ║╔Execution stage started
+101ms ║║Condition #6 evaluated false (7ms)
+102ms ║║Condition group #1 evaluated false (state did not change) (9ms)
+108ms ║║Comparison (decimal) -3.4 drops_to_or_below (integer) 5 = false (0ms)
+109ms ║║Condition #8 evaluated false (5ms)
+110ms ║║Condition group #7 evaluated false (state did not change) (6ms)
+116ms ║║Comparison (string) 12:02 changes_to (string) 05:40 = false (0ms)
+117ms ║║Condition #13 evaluated false (4ms)
+118ms ║║Condition group #12 evaluated false (state did not change) (6ms)
+120ms ║╚Execution stage complete. (31ms)
+121ms ╚Event processed successfully (121ms)
2021-01-25 06:50:17 +94ms
+1ms ╔Received event [Garage - Motorvärmare Höger].temperature = -3.9 with a delay of 75ms
+77ms ║RunTime Analysis CS > 18ms > PS > 4ms > PE > 55ms > CE
+80ms ║Runtime (41013 bytes) successfully initialized in 4ms (v0.3.110.20191009) (77ms)
+81ms ║╔Execution stage started
+92ms ║║Condition #6 evaluated false (8ms)
+93ms ║║Condition group #1 evaluated false (state did not change) (9ms)
+98ms ║║Comparison (decimal) -3.9 drops_to_or_below (integer) 5 = false (1ms)
+100ms ║║Condition #8 evaluated false (4ms)
+101ms ║║Condition group #7 evaluated false (state did not change) (5ms)
+106ms ║║Comparison (string) 6:50 changes_to (string) 05:40 = false (1ms)
+107ms ║║Condition #13 evaluated false (4ms)
+108ms ║║Condition group #12 evaluated false (state did not change) (5ms)
+110ms ║╚Execution stage complete. (30ms)
+111ms ╚Event processed successfully (111ms)
2021-01-25 02:08:47 +841ms
+1ms ╔Received event [Garage - Motorvärmare Höger].temperature = -4.4 with a delay of 91ms
+82ms ║RunTime Analysis CS > 19ms > PS > 4ms > PE > 59ms > CE
+84ms ║Runtime (41014 bytes) successfully initialized in 4ms (v0.3.110.20191009) (82ms)
+85ms ║╔Execution stage started
+98ms ║║Condition #6 evaluated false (8ms)
+99ms ║║Condition group #1 evaluated false (state did not change) (10ms)
+104ms ║║Comparison (decimal) -4.4 drops_to_or_below (integer) 5 = false (1ms)
+106ms ║║Condition #8 evaluated false (4ms)
+107ms ║║Condition group #7 evaluated false (state did not change) (5ms)
+112ms ║║Comparison (string) 2:08 changes_to (string) 05:40 = false (1ms)
+113ms ║║Condition #13 evaluated false (4ms)
+114ms ║║Condition group #12 evaluated false (state did not change) (5ms)
+116ms ║╚Execution stage complete. (31ms)
+117ms ╚Event processed successfully (117ms)

Your have two identical triggers - location mode changes to home on lines 15 and 26. Each time your location changes, those will compete to fire this piston and I am not sure if it will execute properly. I did not dig into your piston, but I would suggest something like :

IF location mode changes to home   <- Trigger
  Then
    IF Badrum humidity is above 80%
      Do stuff
    END IF
    IF Garage temperature is less than or equal to 5
      Do stuff
    END IF 
END IF

I updated the piston. I just want to check if “location mode is Home”.

That looks better to me. Let it run and post some follow-up after 24-48 hours.