user variable as setpoint

Moderator: leecollings

Post Reply
Patricen
Posts: 119
Joined: Tuesday 06 February 2018 18:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta rel
Contact:

user variable as setpoint

Post by Patricen »

Hello,

I'm trying to give a temperature setpoint using a user's variable. The issue is that only digits can be accepted within the setpoint field.
Is there a trick or an improvement that could help using a user's variable as a setpoint?
Attachments
Blockly.png
Blockly.png (1.91 KiB) Viewed 1077 times
blauwebuis
Posts: 331
Joined: Wednesday 21 December 2016 9:11
Target OS: Raspberry Pi / ODroid
Domoticz version: current
Contact:

Re: user variable as setpoint

Post by blauwebuis »

in the Aurora theme you can change the value of a text element directly in the interface. Perhaps that could be another route.
Patricen
Posts: 119
Joined: Tuesday 06 February 2018 18:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta rel
Contact:

Re: user variable as setpoint

Post by Patricen »

unfortunately no success at the moment
alanlsmith
Posts: 132
Joined: Monday 07 August 2017 17:17
Target OS: Linux
Domoticz version: Latest β
Location: Near London (Saaarf!)
Contact:

Re: user variable as setpoint

Post by alanlsmith »

I think a script is possibly the only easy solution.

Code: Select all

commandArray = {}

local switch = 'Set_Main_Thermostat'
local mainstatidx = 543
local target = tonumber(uservariables['Target_Temperature'])

if (devicechanged[switch]) == 'On' then
	commandArray[#commandArray+1] = {['SetSetPoint:' ..mainstatidx]=tostring(target)}
end

return commandArray
Domoticz Latest β, RPi 4B with 110Gb SSD for Domoticz, RPi 4B with 110Gb SSD for Node-Red & a RPi 2B for logging / IP addressing. RFXCOM, PiZiGate, Z-Wave, Harmony, Hue lamps and a bit of Broadlink.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest