Logic Machine Forum
Room color based on temperature off - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: Room color based on temperature off (/showthread.php?tid=2238)



Room color based on temperature off - PassivPluss - 13.09.2019

Hi
I would like to make a button on the floor plan on each room.
This will be colored due to offset between set temperature of a room and the temperature status of the room.

1/0/1 temperature status
1/0/2 temperature set point 

For instance if offset is -0.5 -> 0.5 would give green with opacity 0.7

With offset -0.5->-1 gives light blue opacity 0.8 (indicate colder)
With offset 0.5->1 gives light orange opacity 0.8 (indicate hotter)

And so on. The script should find correct values to calculate with based on room number. Then calculate and make button correct color 

On click of button the room widget opens.

Anybody found a way to make this?


RE: Room color based on temperature off - PassivPluss - 15.09.2019

I'am thinking somethink like this

https://www.itbaktuelt.no/2015/01/18/brukervennlige-sd-bilder/

Either the whole room or Just the button displaying the temperature.

Is this possible?

It will be very easy for the customer to see what room he needs to attend to.
Here it is a gradent view that fades over to red or blue based on temperature


RE: Room color based on temperature off - Daniel - 16.09.2019

Hi
Have a look here
https://forum.logicmachine.net/showthread.php?tid=1976&pid=12317#pid12317
BR


RE: Room color based on temperature off - PassivPluss - 17.09.2019

Thanks for link. I went for this https://forum.logicmachine.net/showthread.php?tid=275&pid=2108#pid2108
Script as it checks setp and temp in room with class fu ction. I get this to workon text and change text color.
In case I add an icon it doesnt work. Is it possible to change a white picture or a blank picture(to make a room box?)


RE: Room color based on temperature off - Daniel - 18.09.2019

This will let you change image color.
Add img or object with attached svg and add additional calsss ' custom' to it
Add this to custom JS
Code:
$(function(){
  if (typeof grp === 'object') {
    grp.listen('32/1/1', function(obj) {
      $('.custom').css('filter', 'hue-rotate(' + (obj.value * 3) + 'deg)');
    });
  }
});
Image color will change based on the value in object 32/1/1, change as needed.