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) Pages:
1
2
|
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. 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() 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 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 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. RE: Custom Air Condition Widget - stianj - 28.10.2024 Sorry about this never ending posting from me... Could you share the latest version of this widget, Daniel? I would like to make a small addition for "Heating message" and "Cooling message"... RE: Custom Air Condition Widget - Daniel - 28.10.2024 Is it clear to you that custom widgets like this will be only visible locally and not in cloud? RE: Custom Air Condition Widget - stianj - 28.10.2024 Yeah, that's no problem Or maybe Erwin would want to make that change - since also the Schneider controllers implement this... RE: Custom Air Condition Widget - Daniel - 28.10.2024 here RE: Custom Air Condition Widget - stianj - 30.10.2024 I was really not planning to bother you more with questions about this. I can import the widget just fine from the Extensions box, but it does not show up when I "Add new widget"... Have of course renamed the widget, and also tried other changes. I also downloaded the test-widget alarm_fire_alert from https://forum.logicmachine.net/showthread.php?tid=2849&pid=18353#pid18353 - it also imports fine, but does not show up when adding widget... Am I missing something..? RE: Custom Air Condition Widget - Daniel - 31.10.2024 Did you change the ID as mentioned in this post? RE: Custom Air Condition Widget - stianj - 31.10.2024 (31.10.2024, 08:36)Daniel Wrote: Did you change the ID as mentioned in this post? Yes I did. Code: $(function () { It imports just fine, but just does not show up when trying to add widget... RE: Custom Air Condition Widget - admin - 31.10.2024 Use underscore instead of dash in the widget id. RE: Custom Air Condition Widget - Daniel - 31.10.2024 You also need to change it in line 207 WidgetView.thermostat_new = WidgetView.extend({ RE: Custom Air Condition Widget - stianj - 31.10.2024 (31.10.2024, 09:57)Daniel Wrote: You also need to change it in line 207 I did, it won't import if not... (Or maybe it will import, but as they were they had ['thermostat'] as ID, and that did not import... So I did change both...) RE: Custom Air Condition Widget - admin - 31.10.2024 Provide the full code of your widget. RE: Custom Air Condition Widget - stianj - 31.10.2024 Attached. I have tried many things, not just what I have attached. I have tried to just change the ID both places, I have changed the Title in line 4, and finally I replaced all "se-thermostat." with "thermostat-new.". (Not sure if that have unexpected caveats I have not yet discovered, but it didn't work before I did that neither...) All of the different version imports, but none is visible when trying to add the widget. I have not studied the code yet, and I do understand there are caveats here, but I'm pretty sure I'll figure that out when I can start testing changes... |