This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

Time function for object selected by final user
#1
Hello,
i need advice from expert.

Easy part:
I have to do a clock to change Setpoint temperature on several Thermostat.


Hard part:
However the customer has 200 different thermostat in the building. He want that the clock event (time program of LM) send value only on thermostat he selected before.
For information, every thermostat are on separate widget.

I would like to do two generic press buton that take the widget name and add a tag to the setpoint thermostat group adress like "clock1" and "clock2".

Easy part:
Then on the clock1 event, only send to the group addresse taged "clock1" for example
Then on the clock2 event, only send to the group addresse taged "clock2" for example

Hard part:
When open again the widget, the checkbox should be checked if the tag is "clock1"


   

If you have other idea. First I was thinking of creating all thermostat setpoint group adress in other group adress range and use it as checkbox, but lots of work, and would like to know if there is not smarter way.

----------


Maybe using Variable storage in DB

and script like this but for widget:

Code:
$(function(){
  var previousPlanId = 0;

  $(document).on('vclick click', function() {
    writecurrentpage();
  });
 
  function writecurrentpage(){
    if ( currentPlanId == 1 && currentPlanId != previousPlanId ) {
      grp.write('1/1/1', currentPlanId);
      previousPlanId = currentPlanId;
    }
  }

});
Reply


Forum Jump: