Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Enabling Disabling Scenes or Heating Plan by Priority


Question

Posted

Hey guys!

 

I have problem with my heating plan and a scene which turns off (switches to 4°C) the heating when a windows has been opened. 

It works so far but... When the window is open I want the heating plan to be stopped for the time the window is open and start when it is closed.

For example, the heating plan is to raise the temp. at 8pm from 17°C to 20°C and a window has been opened some time before this step. The heating plan just ignores the opened window and jumps from 4°C to 20°C. So I have to switch it of by hand what is not what I want.

 

Is there any chance to add a priority like "when the window is open, stop/ignore the heating plan and restart it when the window is closed"? 

 

 

Alex

Recommended Posts

  • 0
Posted

Is raising temperature to 20°C set in Heating Panel or by some scene? Maybe use holiday mode.

  • 0
  • Inquirer
  • Posted

    20° is set in the Heating Panel. When the window is open the scene sets it to 4°C. But the heating plan ignores this scene. So it starts to heat even when the window is open when the heating plan switches to the next time defined window.

     

    I just want the Heating Plan beeing stopped for the room where the window is opened. And restarts when the window is closed. 

     

    Do you know what I mean?

    • 0
    Posted

    OK, so you are setting 4°C on a thermostat itself?

    • 0
    Posted

    No I think what he means is that the heating plan should check for some device status first before sending command.

     

    If he opens a window he might have a scene that is lowering the temperature in this room. But this will get overwritten at next temperature point of the heating plan.

    And that is what he does not want to have.

    If the windows stay open the whole night the thermostat should not be set to any temperature by the heating plan I guess.

    • 0
    Posted

    That is why I asked how is he changing temperature: if on thermostat itself it will behave exactly as you describe. We are aware of that and probably it will be changed in the future. That is why for now a schedule itself has to be suspended - by putting it in vacation mode with Lua code that is executed e.g. after opening window.

    • 0
    Posted

    This I did not know yet.

    How do I put heating plan into vacation mode with LUA and back?

     

    Do I have to set the vacationTemperature state to another value of 0 and back?

    Or is there another way of doing this?

    • 0
    Posted

    You have  to use HTTP call to do that, use Firebug addon to browser to look up the message and send it manually from scene.

    • 0
    Posted

    I feel like im reinventing the wheel everytime, i have the same issue and solved it by not using fibaro to change my temperature.

     

    Im sure you can do anything if we use networktraces and if i can get root access i could prob even do alot more.

     

    My point is that a specific question is asked and your response is like well figure it out yourself.

     

    A bit of lua snippets or another example would be helpfull.

     

    i understand your answer when you are talking to developers but most in here are endusers.

    • 0
    Posted

    +1 with kooy

    • 0
  • Inquirer
  • Posted

    Please login or register to see this link.

    Thanks for your reply. Unfortunately it does not help much. I understand it but I do not have the knowledge to write a LUA scene like you suggest to do.

     

    Alex did exactly understand / describe my problem. 

     

    For end users it is really hard to graduate in LUA scripting first before beeing able to write a short script to sort out this kind of a problem. 

     

    For you, Fibaro guys, it should not be a big deal to implement the heating plan into scene like a module which can be turned on or off.

     

    Hope you can make it future.

     

    Thanks

     

    Alex

    • 0
    Posted

    I understand your concerns, not everyone is programmer. But please note, that such quick fixes are always kind of workaround - we can't and will not adjust some major feature or whole new one overnight after single request here on forum. Of course we take such suggestion under consideration when developing our system. And the real problem that lies here: our forum has over 67 000 posts and almost every question asked here already has an answer. For this issue I found several valid answers and a scene that is ready and working for v4 HC2. Here you are, I just tested it and it works just fine for single door/window sensor:

    Please login or register to see this link.

    • 0
  • Inquirer
  • Posted

    Thank you and I fully understand your point of view.

    • 0
  • Inquirer
  • Posted

    Please login or register to see this link.

     

    It really works. The only problem is that it does not  return to the normal Heating Plan once the door/window has been closed. It remains at the idle temperature instead of setting the temperature which should be set by the plan.

     

     

    Searched the threads but did not find an answer for this specific problem.

    • 0
    Posted

    Add this line:

    Please login or register to see this code.

    at the end, let me know what the output is in the debug when state of D/W sensor changes.

    • 0
  • Inquirer
  • Posted

    [DEBUG] 12:32:40: 1<--- (when I opened the window)

     

    [DEBUG] 12:32:40: Connection successful, status 200

    [DEBUG] 12:32:40: Setting temperature to 4C

     

    [DEBUG] 12:32:40: Change was applied

    [DEBUG] 12:33:21: 0<--- (when I closed the window)
     

    [DEBUG] 12:33:21: Connection successful, status 200
    [DEBUG] 12:33:21: Scheduled temperature was set
    [DEBUG] 12:33:21: Change was applied

     

    ----------------------------------------------------------

     

    Still not working automatically when window is closed. Need to start the scene manually. 

    The only new thing is the status "0<---" or "1<---"

     

    BTW, the debugger doesnt show anything until I start the scene manually. Then I get the lines above. But it sets the Temp. to 4°C (without showing it in the debug window).

     

    I also realized that the scene controls one thermostat for both actions (temp. down / temp. up) only.

    In my bedroom I have two thermostats and only one seems to get the command. It also vary which thermostat is controlled. Thats strange. This behavior is shown by this scene only. A simple block scene turns down both thermostats.

     

    Regard

     

    Alex

    • 0
    Posted

    There is a header: 

    Please login or register to see this code.

    replace 0 with id of D/W sensor you want to trigger scene with. Change will apply to heating schedule, so any thermostat that is linked to given schedule (by being in the same room) should react.

    • 0
  • Inquirer
  • Posted

    Thank you for your reply. 

     

     

    Now the temp for both thermostats changes. But.... in the drop down menu the temp. changes, then "waiting for wakeup" is shown, the the device "awake". But the set temp. doesnt change. It remains at the previous temp. 

     

    Look at the attached pic.

     

    Please login or register to see this attachment.

    • 0
  • Inquirer
  • Posted

    Finally I got it work. 

     

    To replace the " 0 value" by the W/D sensor ID all thermostats are getting the command to change the temp. 

     

    Also the scene automatically changes the temp. First the temp. to the right of the device icon in the drop down menu changes. The real change in temp (below the icon) appears after several minutes. I tested it several times. It took between 3 and 15 minutes. Tests were done with same devices. No settings were changed. 

     

    Now I´m wondering whether it is possible to get the scene work faster. 

     

     

    Here is the complete and working code for all having the same problem: 

     

    ------------------------------------------------------------------------------------------

    --[[
    %% properties
    100 value (replace 100 by the ID of your W/D sensor)
    %% globals
    --]]
     
    local schedule = {
      
      id = XXX, --Change to ID of your heating schedule
      idleTemp = X --Temperature that will be applied when window or door is opened 
      
    }
     
    sensor = XXX --ID of Door/Window Sensor, remember to adjust triggering device
     
    --Do not modify code below this line
     
    local function getMethod(requestUrl, successCallback, errorCallback)
      
      local http = net.HTTPClient()
      
      http:request(requestUrl, {
          options = {
            method = 'GET'
          },
          success = successCallback,
          error = errorCallback
      })
    end
     
    local function putMethod(requestUrl, data, successCallback, errorCallback)
      
      local http = net.HTTPClient()  
      http:request(requestUrl, {
          options = {
            method = 'PUT',
            data = json.encode(data)
          },
          success = successCallback,
          error = errorCallback
      })
    end
     
    local function updateSchedule(subjectToChange)
     
      local url = '

    Please login or register to see this link.

    .. subjectToChange.id
      
      getMethod(url, function(resp)
        
        if resp.status == 200 then
          print('Connection successful, status ' .. resp.status)
          
          local panel = json.decode(resp.data)
          
          if panel.properties.vacationTemperature ~= nil then
     
            if fibaro:getValue(sensor, "value") == '1' then
             
              panel.properties.vacationTemperature = subjectToChange.idleTemp          
              print('Setting temperature to ' .. subjectToChange.idleTemp .. 'C')
         
            else
              
              panel.properties.vacationTemperature = 0
              print('Scheduled temperature was set')  
                
            end
                
            putMethod(url, panel, function(resp)
            
              if resp.status == 200 then
                print('Change was applied')
              end
                
            end,
              
            function(err)
              print('error ' .. err)
            end
          )
            else
              print('No value found')
            end
        else
          print('Connection failed, status ' .. resp.status)
        end
          
        end,
        
        function(err)
          print('error ' .. err)
        end
        )
      
    end
     
    updateSchedule(schedule)
     
    print(fibaro:getValue(sensor, "value") .. '<---')
     

    ------------------------------------------------------------------------------------------

     
    • 0
    Posted

    Temperature is set in schedule instantly, but thermostats have their own wake-up interval and only way to make it react faster would be to decrease it - but it will affect battery lifespan.

    • 0
  • Inquirer
  • Posted

    As I told in my previous post they woke up but the temp. was not changed. My thermostats wake up all 900s but it takes up to 30 minutes (yesterday in the evening) before it really changes.

     

    Maybe it is not that bad that it takes so long to start heating again. So the cold air at the floor coming from the outside can mix with the warm air in the room before heating starts. In this case the thermostat gets warmer (as in many cases they are close to the floor) and will not "overshoot" in heating.

     

    Thanks for your help to get it work. 

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...