Logic Machine Forum
Custom Air Condition Widget - 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: Custom Air Condition Widget (/showthread.php?tid=2804)



Custom Air Condition Widget - gtsamis - 22.08.2020

Hi,

As I am completly ignorant with css I would like if someone could help with a custom widget.

I want to have the top part of the Thermostat widget and botom-mode selection part of the Air Condition widget.
Fan speed selection as on Thermostat (o=off, 33=Min, 67=Mid, 100=Max) and mode (0=Auto, 1=Heating, 3=Cooling, 9=Fan, 14=Dry)

Thank you in advanve for any help.
George

 


RE: Custom Air Condition Widget - Daniel - 24.08.2020

For this you will need to know JavaScript.
Link the output of this object to a virtual object and depend of the value you get write to your object. The fan speed you can set in widget parameters.


RE: Custom Air Condition Widget - gtsamis - 24.08.2020

(24.08.2020, 07:37)Daniel. Wrote: For this you will need to know JavaScript.
Link the output of this object to a virtual object and depend of the value you get write to your object. The fan speed you can set in widget parameters.

Can you please share the script, style sheet from the thermostat widget so i can have a starting point?


RE: Custom Air Condition Widget - Daniel - 24.08.2020

I'm not sure what are the values sent on output of the mode but I guess it is 0,1,2,3,4. Change it accordingly Then the script would looks like that
Code:
value = event.getvalue()

if (value == 0) then
  grp.write('1/1/1', 0)
elseif (value == 1) then
  grp.write('1/1/1', 1)
elseif (value == 2) then
  grp.write('1/1/1', 3) 
elseif (value == 3) then
  grp.write('1/1/1', 9)
elseif (value == 4) then
  grp.write('1/1/1', 13) 
end



RE: Custom Air Condition Widget - gtsamis - 24.08.2020

(24.08.2020, 12:23)Daniel. Wrote: I'm not sure what are the values sent on output of the mode but I guess it is 0,1,2,3,4. Change it accordingly Then the script would looks like that
Code:
value = event.getvalue()

if (value == 0) then
  grp.write('1/1/1', 0)
elseif (value == 1) then
  grp.write('1/1/1', 1)
elseif (value == 2) then
  grp.write('1/1/1', 3) 
elseif (value == 3) then
  grp.write('1/1/1', 9)
elseif (value == 4) then
  grp.write('1/1/1', 13) 
end

There is no need to create another script for something that could be done native from the widget.


RE: Custom Air Condition Widget - Daniel - 24.08.2020

This is not that simple as you think. I can send you the source code for this widget if you want.


RE: Custom Air Condition Widget - gtsamis - 24.08.2020

(24.08.2020, 12:35)Daniel. Wrote: This is not that simple as you think. I can send you the source code for this widget if you want.

That would be great... after all this project is still on development so no worries if i meshed up  Cool


RE: Custom Air Condition Widget - Daniel - 24.08.2020

Here you go. This widget was done by 3rd party and some of the code is hidden in common js which you can't edit.