Page 1 of 1

Variable in URL

Posted: Thursday 27 December 2018 8:01
by stemeh
Hello,

I want to send a Line to ESPEASY and i want to send this for Example http://192.168.2.161/control?cmd=TaskValueSet,10,1,5
this is ok. but when I change the 5 to a Variable (SollTemp1) http://192.168.2.161/control?cmd=TaskVa ... &SollTemp1
then Domoticz send &SollTemp1 and not the value of SollTemp1.
INFO_Blocky.png
INFO_Blocky.png (21.67 KiB) Viewed 753 times
Pleasy Help me I have no more Idea

Re: Variable in URL

Posted: Thursday 27 December 2018 9:03
by SweetPants
Switch to dzVentz, it has a steap learning curve, but much more flexible then Blockly

Re: Variable in URL

Posted: Friday 28 December 2018 10:14
by stemeh
Hy,

Thanks for your Info . Can you me please send a simple Example for this Found at google many thinks but I understand .

Stefan

Re: Variable in URL

Posted: Friday 28 December 2018 10:38
by waaren
stemeh wrote: Friday 28 December 2018 10:14 Hy,

Thanks for your Info . Can you me please send a simple Example for this Found at google many thinks but I understand .

Stefan
Please have a look at this page first and use code below to test.

Code: Select all

-- sendTemp2ESP.lua
 
return {
        on      = { devices  = { "Stube" }},
        
    execute = function(dz, item)
       dz.openURL("http://192.168.2.161/control?cmd=TaskValueSet,10,1," .. item.temperature) 
    end
}

Re: Variable in URL

Posted: Friday 28 December 2018 15:01
by stemeh
Hy Waaren ,
Thanks for The Solution Idea . I send my Setpoint now with this code

-- sendTemp2ESP.lua

return {
on = { devices = { "SollTemp1" }},

execute = function(dz, SollTemp1Input)
dz.openURL("http://192.168.2.161/control?cmd=TaskValueSet,10,1," .. SollTemp1Input.setPoint)
end
}

Stefan