Beiträge von DanHick

    Yes of course thinking out it the video might not help that much.

    Arrow Map right now:

    switch2 And switch3 is on ----> Change config of switch0 to detached

    switch2 is on ----> turn on switch0

    switch3 is on ----> turn on switch0 and switch1

    switch2 And switch3 is not on ----> Change config of switch0 to Flip(Switch)

    switch3 is off And switch2 is off ----> turn off switch0 and switch1

    I think it might be best to disable switch0 input throughout as its input (HW) can still toggle swtich0 off.

    switch2 or switch3 is on ----> Change config of switch0 to detached

    switch2 or switch3 is not on ----> Change config of switch0 to Flip(Switch)

    Then:

    switch2 is on ----> turn on switch0

    switch3 is on ----> turn on switch0 and switch1

    This should remove any chance of input0 affecting the operation?

    Hi sorry it took so long to get it tested.

    It is very close to perfect just saw some issues when enabling the Plinth circuit.

    https://youtu.be/60leqbNtcWs

    Also please try this again, maybe I need to write switch and input small, normally we should be under 5 calls as the relay is either on or off, so i am not sure how the hell it got over 5 calls.

    I added an extra check to reduce the calls somehow, maybe this works, so pls try the above version without a dynamic switch mode change and then this version with some small modification.


    In this one switch0 was toggled off when switch2 was toggled on by input2

    I am not sure if you can just use your Shelly in detached mode only, but that would solve the call error.

    You can at least trying it.

    I removed the SwitchMode Changing.

    swtich0 was not called when input0 was triggered this time. Here is the log. 0 was set in detached mode.

    Sadly no, switch0 failed to come on at all with input0

    Sadly no im afraid.

    Switch0 was still toggled off.

    Did you need the switches to be attached to the inputs for this to work?

    Congratulations I think you may have manged to decipher my rambling logic, many thanks!

    I have no issue with detaching all the switches from their respective inputs in the UI and relying on software only. If this allows for additional flexibility in the script.

    As you have pointed out, there are two scenarios:

    Scenario #1:

    (In this scenario Input (0) remains un toggled)

    switch2 is on ----> turn on switch0

    switch2 is off And switch3 is off ----> turn off switch0

    switch3 is on ----> turn on switch0 and switch1

    switch3 is off And switch2 is off ----> turn off switch0 and switch1

    Scenario #2:

    (In this scenario all of the above is possible but input (0) may have been toggled on/off:

    switch2 And switch3 is on ----> Change config of switch0 to detached

    switch2 And switch3 is not on ----> Change config of switch0 to Switch

    If input (0) is toggled at anytime currently output (0) is turned off which breaks scenario #1

    Here's a diagram to help.

    Der Inhalt kann nicht angezeigt werden, da Sie keine Berechtigung haben, diesen Inhalt zu sehen.

    The main reason I cant just rely on tado for this is that TADO only allows 10 stats to control the Boiler/CH pump. The plinth heater and UFH circuit made 12 so i needed another way to call the boiler and CH pump respectively.

    This is exactly what your code is doing right now:

    switch2 is on ----> turn on switch0

    switch2 is off And switch3 is off ----> turn off switch0

    switch3 is on ----> turn on switch0 and switch1

    switch3 is off And switch2 is off ----> turn off switch0 and switch1

    Yes this is correct. All good.

    Now the spanner in the works is there is a live input into (0) for the boiler into the shelly from another device (TADO) (This device Calls for hot water/boiler when the time clock is on)

    When this device effectively toggles the (0) input on shelly by turning off it also turns the boiler off. No matter what the above script is doing or any other action set in the Shelly UI.

    I need to basically make the shelly ignore any external 240v input into input (0) when inputs (2, 3) are on.

    I hope this helps. It all works until the TADO time clock goes off when the other inputs still need the boiler.

    You are an absolute legend for looking at the code for me!

    Sadly I have the same issue. individually all inputs bring the relative output on.

    Hotwater - brings the boiler on and heats the cylinder (0) and when toggled off it goes off.

    UFH - Brings the UFH pump on and the boiler (2) & (0) - When either the Plinth heater (3) or Hotwater (0) go off they toggle (0) off even though the UFH (2) is still on.

    This small detail is the part i need to avoid. (0) needs to be almost locked on and ignore any input or changes to its input state until (2, 3) are off.

    Hes the log dump through out some testing of turn on and off etc.

    Thanks a lot for the additional info.

    The truth is I got lost very quickly in the script tool.

    I placed some snippets into the script and got some syntax errors and even caused the 4pm to reboot when the script was running.

    Basically lost on how to format the script and arrange the commands etc. Not something I have done much of until now.

    I might be able to unpick it if I could see a similar script laid out.

    I have taken a Shelly 4pm and connected it to 4 x outputs for a heating system:

    (0) Boiler (Feeds a thermal store)

    (1) Central Heating Pump (Rads)

    (2) Underfloor heating Pump

    (3) Plinth heater

    All the outputs and the components they feed can be triggered via a live wire to the inputs on the 4pm.

    I need the Under floor Heating and Plinth channels to be able to trigger the channel (0) Boiler so the thermal store is then heated at all times they are on. No problem, I created two actions to turn Boiler (0) on and off when channels (1, 2, 3) come on. So far so good.

    The issue I have is that when the Boiler (0) output is triggered for Hot water only then another input triggers it say Underfloor Heating (2) if the hot water is turned off and the Boiler input goes off the Boiler channel is turned off.

    I basically need to bind inputs (1) (2) (3) to output (0). So if any of these inputs is on then output (0) Boiler will stay on until they are all off.

    I was really hoping I could solve this by some logic or a script but I'm getting stuck. Maybe I have been starring at it for too long!

    If anyone has any ideas that would be great.