Setpoint widget in a floorplan
Moderator: leecollings
Setpoint widget in a floorplan
Hello.
Many thanks for the great software and the great ideas you share in this forum.
This is my first post on this site. Let me go straight to my question: Does domoticz support accessing a setpoint widget from the floorplan?.
Details on my scenario are:
I am using Dummy thermostat which allows me to access a setpoint widget where I define my target temperature. This is working fine and, by default, Domoticz gives me access to the widget when I click on the thermostat icon (either from Dashboard or from utilities tab).
Domotics is also capable to show the thermostat in the floorplan but the default action when I click it is to show the graph of the setpoint value through time (no other action is possible for that icon in the floorplan). The obvious workaround is to not use floorplan and just use Dashboard or utilities tab but I am planning to have one thermostat per radiator and the number of them is large (takes time to search to get to the right icon). The Main purpose of the floorplan for my scenario was to be able to visually access the right thermostat and switches and change them from there.
Many thanks in advance for your help
Carlos
Many thanks for the great software and the great ideas you share in this forum.
This is my first post on this site. Let me go straight to my question: Does domoticz support accessing a setpoint widget from the floorplan?.
Details on my scenario are:
I am using Dummy thermostat which allows me to access a setpoint widget where I define my target temperature. This is working fine and, by default, Domoticz gives me access to the widget when I click on the thermostat icon (either from Dashboard or from utilities tab).
Domotics is also capable to show the thermostat in the floorplan but the default action when I click it is to show the graph of the setpoint value through time (no other action is possible for that icon in the floorplan). The obvious workaround is to not use floorplan and just use Dashboard or utilities tab but I am planning to have one thermostat per radiator and the number of them is large (takes time to search to get to the right icon). The Main purpose of the floorplan for my scenario was to be able to visually access the right thermostat and switches and change them from there.
Many thanks in advance for your help
Carlos
-
- Posts: 4
- Joined: Friday 02 December 2016 0:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Setpoint widget in a floorplan
Same problem here! :O
- Egregius
- Posts: 2582
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Setpoint widget in a floorplan
Create your own floorplan and create all the freedom of design as you like.
https://egregius.be/2016/php-floorplan- ... reenshots/
https://egregius.be/2016/php-floorplan- ... reenshots/
Re: Setpoint widget in a floorplan
Ok. I understand now, Domoticz out of the box does not allow you to access a setpoint widget from the floorplan.
I understand Egregius solution will allow us to build our own floorplan and have any custom widgets we want to fit our needs. This involves coding in php and integrating it into a domoticz instance. If this is really the only way to do it I will have to go for it but it seems too much complexity for my small requirement (I don't need any special widget I just want to access an existing one from the floorplan).
What I mean is that perhaps there is a way to just change the current web link we see in a thermostat "Show Graph" into "setpoint widget". If I could just change that link, then all my requirements will be met.
I will try to explore this but if anybody has any suggestion that would be appreciated.
Thanks
Carlos
I understand Egregius solution will allow us to build our own floorplan and have any custom widgets we want to fit our needs. This involves coding in php and integrating it into a domoticz instance. If this is really the only way to do it I will have to go for it but it seems too much complexity for my small requirement (I don't need any special widget I just want to access an existing one from the floorplan).
What I mean is that perhaps there is a way to just change the current web link we see in a thermostat "Show Graph" into "setpoint widget". If I could just change that link, then all my requirements will be met.
I will try to explore this but if anybody has any suggestion that would be appreciated.
Thanks
Carlos
Re: Setpoint widget in a floorplan
Just to update on how far I got.
I see the set point widget is available in the dashboard view and I found the following code in the file "DashboardController.js"
Similarly the set point widget is available in the utilities screen and I found the following code in "UtilityController.js"
On the other hand the set point widget is not available in the floorplan screen and perhaps this could explain why I could not find any similar code in the file "FloorplanController.js"
I am not totally sure I am looking at the right places so if anybody has comments, that would be appreciated.
Many thanks
Carlos
I see the set point widget is available in the dashboard view and I found the following code in the file "DashboardController.js"
Code: Select all
else if ((item.Type == "Thermostat")&&(item.SubType=="SetPoint")) {
xhtm+='override.png" class="lcursor" onclick="ShowSetpointPopup(event, ' + item.idx + ', ShowFavorites, ' + item.Protected + ', ' + item.Data + ');" height="40" width="40"></td>\n';
status=item.Data + '\u00B0 ' + $scope.config.TempSign;
}
Code: Select all
else if (((item.Type == "Thermostat")&&(item.SubType=="SetPoint"))||(item.Type == "Radiator 1")) {
xhtm+='override.png" class="lcursor" onclick="ShowSetpointPopup(event, ' + item.idx + ', RefreshUtilities, ' + item.Protected + ', ' + item.Data + ');" height="48" width="48" ></td>\n';
status=item.Data + '\u00B0 ' + $scope.config.TempSign;
}
I am not totally sure I am looking at the right places so if anybody has comments, that would be appreciated.
Many thanks
Carlos
-
- Posts: 12
- Joined: Sunday 18 September 2016 18:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Oxford
- Contact:
Re: Setpoint widget in a floorplan
I'm interested in this too, it's more useful to be able to change the thermostat set point from the floorplan icon rather than look at the history.
-
- Posts: 12
- Joined: Sunday 18 September 2016 18:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Oxford
- Contact:
Re: Setpoint widget in a floorplan
Does anyone have any advice on this? I'm slowly getting familiar with Python and Lua but this is new territory for me.
-
- Posts: 2
- Joined: Sunday 30 April 2017 17:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Setpoint widget in a floorplan
Hi everybody,
I'm also interested to be able to change the value of a setpoint from the roomplan view.
I don't know how to help to achieve this improvement, but the code analyzed by CarlosDom in previous post (https://www.domoticz.com/forum/viewtopi ... 28#p115677) seem to be a way to explore.
Thanks for the development of this soft.
I'm also interested to be able to change the value of a setpoint from the roomplan view.
I don't know how to help to achieve this improvement, but the code analyzed by CarlosDom in previous post (https://www.domoticz.com/forum/viewtopi ... 28#p115677) seem to be a way to explore.
Thanks for the development of this soft.
- Dnpwwo
- Posts: 819
- Joined: Sunday 23 March 2014 9:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Melbourne, Australia
- Contact:
Re: Setpoint widget in a floorplan
@StratosHF and @thibaultlemaitre,
The code that controls the device in a floorplan is is domoticzdevices.js:you probably just need to add a line that overrides the default behavior of TemperatureSensors onClick (which is to show the log). Adding a line like: after the while statements would do the trick
The code that controls the device in a floorplan is is domoticzdevices.js:
Code: Select all
function SetPoint(item) {
if (arguments.length != 0) {
this.parent.constructor(item);
this.image = "images/override.png";
if ($.isNumeric(this.data)) this.data += '\u00B0' + $.myglobals.tempsign;
if ($.isNumeric(this.status)) this.status += '\u00B0' + $.myglobals.tempsign;
var pattern = new RegExp('\\d\\s' + $.myglobals.tempsign + '\\b');
while (this.data.search(pattern) > 0) this.data = this.data.setCharAt(this.data.search(pattern) + 1, '\u00B0');
while (this.status.search(pattern) > 0) this.status = this.status.setCharAt(this.status.search(pattern) + 1, '\u00B0');
}
}
SetPoint.inheritsFrom(TemperatureSensor);
Code: Select all
this.onClick = <put code here>;
The reasonable man adapts himself to the world; the unreasonable one persists to adapt the world to himself. Therefore all progress depends on the unreasonable man. George Bernard Shaw
-
- Posts: 12
- Joined: Sunday 18 September 2016 18:33
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Oxford
- Contact:
Re: Setpoint widget in a floorplan
Dnpwwo, thanks for the information, I'll give it a go.
-
- Posts: 5
- Joined: Wednesday 28 February 2018 7:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Setpoint widget in a floorplan
Hi,
I have the same problem here. I'm doing some changes in the domoticzdevices.js in chrome browser but I can't figure this out...
Maybe someone could help?
I have the same problem here. I'm doing some changes in the domoticzdevices.js in chrome browser but I can't figure this out...
Maybe someone could help?
- Attachments
-
- Przechwytywanie.JPG (76.56 KiB) Viewed 4267 times
-
- Posts: 14
- Joined: Saturday 11 May 2019 10:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Contact:
Re: Setpoint widget in a floorplan
[PUMP]
I would need/prefer the same solution as mentioned by CarlosDom.
I would need/prefer the same solution as mentioned by CarlosDom.
Is ther any solution available so far?CarlosDom wrote: ↑Sunday 23 October 2016 16:31 Hello.
Many thanks for the great software and the great ideas you share in this forum.
This is my first post on this site. Let me go straight to my question: Does domoticz support accessing a setpoint widget from the floorplan?.
Details on my scenario are:
I am using Dummy thermostat which allows me to access a setpoint widget where I define my target temperature. This is working fine and, by default, Domoticz gives me access to the widget when I click on the thermostat icon (either from Dashboard or from utilities tab).
Domotics is also capable to show the thermostat in the floorplan but the default action when I click it is to show the graph of the setpoint value through time (no other action is possible for that icon in the floorplan). The obvious workaround is to not use floorplan and just use Dashboard or utilities tab but I am planning to have one thermostat per radiator and the number of them is large (takes time to search to get to the right icon). The Main purpose of the floorplan for my scenario was to be able to visually access the right thermostat and switches and change them from there.
Many thanks in advance for your help
Carlos
-
- Posts: 14
- Joined: Wednesday 23 August 2017 22:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Setpoint widget in a floorplan
Any progress? Is there a chance to add setpoint widget instead of Log as standard option for thermostat?
Re: Setpoint widget in a floorplan
For sure, as Egregius has stated, the solution is in his pass2php solution. I have been wanting the same ability to modify the floorplan for 2 years, and his solution was the only one that works. But make no mistake, and 2 reloads later, that solution took over a week and I ended up abandoning the whole process. I had new hope as there was a how-to script floating out there, so I gave it another try a few months ago, but it is dated and installed 2 webservers, etc. I am a noob, and the solution is super cool, but sadly, way TOO involved for a non-programmer. I would love for a renewed interest in his project or maybe a step-by-step install script or git, but it appears the process is too personalized for that. As an example, there are over 10 pages of only the install issues from following the latest script. Then you must master things called cron jobs, too, which use different variables, and that's where I gave up on Pass2php! I want soooo much for this to be a usable solution, so it really makes me frustrated.
His solution is perfect, since domoticz floorplan isn't so modifiable out-of-the-box.
If anyone does get this to work, would you please post the process to help us new users who want to take it to the next level?
And Gizmocuz stated in a post that domoticz natively handles php, so does that mean that pass2php isn't fully needed? Is there a way to modify the floorplan using that suggestion? If so, then how? Or when would one need pass2php then? So many questions and so little time!
Thanks for listening to my rant, guys!
His solution is perfect, since domoticz floorplan isn't so modifiable out-of-the-box.
If anyone does get this to work, would you please post the process to help us new users who want to take it to the next level?
And Gizmocuz stated in a post that domoticz natively handles php, so does that mean that pass2php isn't fully needed? Is there a way to modify the floorplan using that suggestion? If so, then how? Or when would one need pass2php then? So many questions and so little time!
Thanks for listening to my rant, guys!
-
- Posts: 14
- Joined: Wednesday 23 August 2017 22:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Setpoint widget in a floorplan
Are there any chances that this feature could be available? With more then 200+ devices I cannot control my smart house other way than from floor plan. It would be even enough to have long click for changing setpoint (like with dimmer).
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Setpoint widget in a floorplan
Yes, I figured it out!Dnpwwo wrote: ↑Thursday 18 January 2018 15:07 @StratosHF and @thibaultlemaitre,
The code that controls the device in a floorplan is is domoticzdevices.js:you probably just need to add a line that overrides the default behavior of TemperatureSensors onClick (which is to show the log). Adding a line like:Code: Select all
function SetPoint(item) { if (arguments.length != 0) { this.parent.constructor(item); this.image = "images/override.png"; if ($.isNumeric(this.data)) this.data += '\u00B0' + $.myglobals.tempsign; if ($.isNumeric(this.status)) this.status += '\u00B0' + $.myglobals.tempsign; var pattern = new RegExp('\\d\\s' + $.myglobals.tempsign + '\\b'); while (this.data.search(pattern) > 0) this.data = this.data.setCharAt(this.data.search(pattern) + 1, '\u00B0'); while (this.status.search(pattern) > 0) this.status = this.status.setCharAt(this.status.search(pattern) + 1, '\u00B0'); } } SetPoint.inheritsFrom(TemperatureSensor);
after the while statements would do the trickCode: Select all
this.onClick = <put code here>;
Change above Setpoint function in www/js/domoticzdevices.js in
Code: Select all
function SetPoint(item) {
if (arguments.length != 0) {
this.parent.constructor(item);
this.image = "images/override.png";
if ($.isNumeric(this.data)) this.data += '\u00B0' + $.myglobals.tempsign;
if ($.isNumeric(this.status)) this.status += '\u00B0' + $.myglobals.tempsign;
var pattern = new RegExp('\\d\\s' + $.myglobals.tempsign + '\\b');
while (this.data.search(pattern) > 0) this.data = this.data.setCharAt(this.data.search(pattern) + 1, '\u00B0');
while (this.status.search(pattern) > 0) this.status = this.status.setCharAt(this.status.search(pattern) + 1, '\u00B0');
this.imagetext = "Set Temp";
this.controlable = true;
this.onClick = 'ShowSetpointPopup(' + event + ', ' + this.index + ', ' + this.protected + ' , "' + this.data + '");';
}
}
SetPoint.inheritsFrom(TemperatureSensor);
Edit: refresh your browser cache with CTRL-F5.
Edit: Screenshot as proof
Last edited by waltervl on Thursday 14 January 2021 12:04, edited 1 time in total.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 22
- Joined: Thursday 15 November 2018 11:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Setpoint widget in a floorplan
I added the 3 lines, restarted Domoticz but do not get the Setpoint option in my floorplan. I am on Domoticz 2020.2 (build 12393)
Am I missing something?
Am I missing something?
Zigbee, KAKU, Hue, Google, Honeywell, MotionEye, Telegram, Tasmota, Shelly, IFTTT, etc
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Setpoint widget in a floorplan
You have to refresh the javascripts in your browser with CTRL-F5.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
- kiddigital
- Posts: 435
- Joined: Thursday 10 August 2017 6:52
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Setpoint widget in a floorplan
I have tried the suggestion as well and it seems to work, but there are also some small (UI) issues with it when using custom Icons.
At the moment I am trying to fix these issues and I will create a Pull Request on Github for it in the coming day(s).
At the moment I am trying to fix these issues and I will create a Pull Request on Github for it in the coming day(s).
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
One RPi with Pi foundation standard touch screen to display Dashticz
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Setpoint widget in a floorplan
Thank you, I was hoping someone would fix this in the source code.kiddigital wrote: ↑Thursday 14 January 2021 12:16 At the moment I am trying to fix these issues and I will create a Pull Request on Github for it in the coming day(s).
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Who is online
Users browsing this forum: No registered users and 1 guest