Heatpump rules - not working

Must be cleaned all topics go to the right subforum
ksga
Posts: 15
Joined: Tuesday 02 February 2016 12:08
Target OS: Raspberry Pi
Domoticz version: Stable
Location: Denmark
Contact:

Heatpump rules - not working

Postby ksga » Thursday 15 December 2016 15:50

Hi. I'm trying to get my first Blockly working - and so far mixed success...
I'm trying to setup something that will keep my apartment in a reasonable heated/cooled state when I'm away for a couple of days/weeks.

I started out with a simple "if lower than 26C, then turn on inverter on heat setting" sort of thing. Worked fine..

But when I added the "else if" statement, it stopped working.

What I'm trying to accomplish with the script below is:
1. If its colder than 26C (temperatures will be adjusted before I leave it to do its thing...) turn on the AC/heatpump in "Heat" mode - 20% level on my multi selector switch.
2. If its warmer than 30C turn on the AC/heatpump in "Cool" mode - 30% level.
3. If its somewhere between 27C and 29C turn off the AC/heatpump - but only if it is not already turned off (the thing makes an annoying beep sound every time it receives a command - also if its the same as the last one)
heatpump.PNG
heatpump.PNG (33.67 KiB) Viewed 532 times


Nothing is happening, nothing in the log - so what am I missing??? (apart from any clue what I'm doing obviously :) )

tnegun
Posts: 12
Joined: Tuesday 27 December 2016 17:19
Target OS: Raspberry Pi
Domoticz version: 3.6328
Location: Ireland
Contact:

Re: Heatpump rules - not working

Postby tnegun » Tuesday 10 January 2017 19:34

Did you ever find a solution? I'm having the same issue with IF/ElseIF statements IF/Do work ok though

Egregius
Posts: 2007
Joined: Thursday 09 April 2015 12:19
Target OS: NAS (Synology & others)
Domoticz version: 3.5877
Location: Beitem, BE
Contact:

Re: Heatpump rules - not working

Postby Egregius » Tuesday 10 January 2017 19:45

Use a script and you can do whatever you want. Seems pretty basic stuff above :P

tnegun
Posts: 12
Joined: Tuesday 27 December 2016 17:19
Target OS: Raspberry Pi
Domoticz version: 3.6328
Location: Ireland
Contact:

Re: Heatpump rules - not working

Postby tnegun » Tuesday 10 January 2017 21:05

I'm lazy :) is it a bug or expected that selector switches don't work with If Else blocklys?

Nautilus
Posts: 408
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi
Domoticz version: beta
Location: Finland
Contact:

Re: Heatpump rules - not working

Postby Nautilus » Tuesday 10 January 2017 23:28

tnegun wrote:I'm lazy :) is it a bug or expected that selector switches don't work with If Else blocklys?


Should work. Couple of notes though.
1. Maybe it is supposed to be so but from 26 to 27 and 29 to 30 the scripts does nothing.
2. When checking a selector switch state you are not checking the level but the actual value of the state. So if Level 0 name is .e.g. "Off" you need to compare against that in the last "else if"

Trust you've made sure the event is marked active and type device? Maybe add some logging to try to see what is happening..

tnegun
Posts: 12
Joined: Tuesday 27 December 2016 17:19
Target OS: Raspberry Pi
Domoticz version: 3.6328
Location: Ireland
Contact:

Re: Heatpump rules - not working

Postby tnegun » Wednesday 11 January 2017 0:20

Just updated to 3.6328

I just realized I'm not doing the same as the OP. I'm acting ont the selector state not setting it.

e.g. This works properly
Image

but this doesn't
Image

Nautilus
Posts: 408
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi
Domoticz version: beta
Location: Finland
Contact:

Re: Heatpump rules - not working

Postby Nautilus » Wednesday 11 January 2017 0:31

tnegun wrote:Just updated to 3.6328

I just realized I'm not doing the same as the OP. I'm acting ont the selector state not setting it.

e.g. This works properly
Image

but this doesn't
Image


Sorry, missed the fact you were not the OP :) There the problem is the If-block type, the one with the blue icon on top left corner requires an "else if" as well. Plain "if -> do" works only with the version without this icon.
Last edited by Nautilus on Wednesday 11 January 2017 9:17, edited 1 time in total.

tnegun
Posts: 12
Joined: Tuesday 27 December 2016 17:19
Target OS: Raspberry Pi
Domoticz version: 3.6328
Location: Ireland
Contact:

Re: Heatpump rules - not working

Postby tnegun » Wednesday 11 January 2017 0:52

And thats working.... I was testing by building in stages and got stuck here!!

Thanks for your help :)


Return to “Scripts [cleaning in progress]”

Who is online

Users browsing this forum: No registered users and 0 guests