Page 1 of 1

Thermostat Value in Blocky or LUA

Posted: Sunday 06 December 2015 22:29
by BarryT
Hi,

i want to change the temperature of a (virtual) thermostat in blocky, or lua..
Blocky dont let me change the value, and with http json it will change the value, but the (hardware/virtual) heating switch isnt activated (because the state stays on the same value)...

What i want is just my heating @15 degrees when nobody's at home, and 19 when someone is home.

why isnt this that simple, like other blocky stuff?

struggling for some hours and searched the hole web :(

thanks!

**Edit
It is working allready :)

Re: Thermostat Value in Blocky or LUA

Posted: Monday 21 December 2015 18:37
by Mike70
How did you do it?
I've got the same problem.

Re: Thermostat Value in Blocky or LUA

Posted: Monday 21 December 2015 18:42
by Egregius
You can control everything with the JSON API. A big part of them is explained at http://www.domoticz.com/wiki/Domoticz_API/JSON_URL's
Use the network view (developer mode) in your browser to see the commands when you use them in the UI of domoticz.
Sent that URL in blockly, LUA, PHP, or whatever.

Re: Thermostat Value in Blocky or LUA

Posted: Monday 21 December 2015 21:31
by sincze
I've been using the attached Thermostat.lua to control the floorheating in my house.
It works absolutely flawless.
First I solved it in Blocky, then I thought why not try LUA :D

I've defined several house_modes the thermostat.lua interacts with.
Please keep In mind I'm also using user_variables, as described here: https://www.domoticz.com/wiki/User_variables.

Maybe it will help somebody else as well.
This is a knowledge sharing forum :D

Re: Thermostat Value in Blocky or LUA

Posted: Monday 18 January 2016 17:25
by clkoolen
Hello,

I am trying to do something completely different, but it does involve sending a json call through blockly. I tried the following:
Event with json.PNG
Event with json.PNG (26.58 KiB) Viewed 1777 times
However when I activate this the configuration state is not changed even though my log tells me " fetching url...."

I read that Sincze solved the json in blockly so I am interested in how that is parsed to see what I am doing wrong.

Thank you for your help.