Qubino thermostat mode ZMNHID1

Moderator: leecollings

Post Reply
mhendel
Posts: 5
Joined: Sunday 16 October 2016 18:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Qubino thermostat mode ZMNHID1

Post by mhendel »

Hello,

Firstable, sorry for my English. My mother tongue is french.

I have a qubino ZMNHID1, which have a thermostat mode switch placed in the Utility Tab. This switch can take the values "On" or "Auto".
The problem is that, randomly, this switch changes from Auto to Off, which is not cool for a thermostat :-(.

I try to write a LUA script which change the state of this switch when it pass to off.

I am a newbie with LUA.

In LUA, the value of the Thermostat mode switch can be either 0 (Off) or 1 (Auto). The type is string.

Here is my simple script :

function delay_s(delay)
delay = delay or 1
local time_to = os.time() + delay
while os.time() < time_to do end
end

commandArray = {}
if devicechanged['Bureau_Thermostat_Mode'] == '0' then
Delay_s(5)
commandArray['Bureau_Thermostat_Mode']='1'

end

And... It doesnt work at all. The switch remains to 'Off'.

Any idea? I am stuck with this since 2 days...HELP!!!!!

Mike
mhendel
Posts: 5
Joined: Sunday 16 October 2016 18:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Qubino thermostat mode ZMNHID1

Post by mhendel »

No answer? Any hint?
bjacobse
Posts: 85
Joined: Tuesday 06 September 2016 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Sorø, DK
Contact:

Re: Qubino thermostat mode ZMNHID1

Post by bjacobse »

After google it appears to be an error in OpenZwave
https://github.com/OpenZWave/open-zwave/issues/1065

I myself have the Qubino ZMNHAD1 (flush relay) I am using it so, that in zwave configuration I have set the relay to be auto switch off after 2 min. then in Domoticz I measure the temperature and if it's below my threshold I switch on the relay, that then put my Electrical radiator on (for 2 min)
Maybe you can use something similar approach?
juankar
Posts: 221
Joined: Saturday 30 August 2014 20:20
Target OS: Linux
Domoticz version: 4.
Location: Spain
Contact:

Re: Qubino thermostat mode ZMNHID1

Post by juankar »

I have this device and it shows two modes: OFF and Auto. If I set mode to OFF, the heater is disconnected. When I ser mode to Auto hte heater switch ON if temperature is under the setpoint and switch OFF if temperature is over setpoint.
It doesn't change to OFF by itself.

PD: the OZW issue was fixed, this error was a program fault about index in array.
mhendel
Posts: 5
Joined: Sunday 16 October 2016 18:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Qubino thermostat mode ZMNHID1

Post by mhendel »

Thanks for your answer. I know how the mode is running. But unfortunately, i have a problem with this thermostat. In other words, what is wrong with my LUA script?
mhendel
Posts: 5
Joined: Sunday 16 October 2016 18:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Qubino thermostat mode ZMNHID1

Post by mhendel »

Or in other words, how to change the state of a utility switch, with LUA?
juankar
Posts: 221
Joined: Saturday 30 August 2014 20:20
Target OS: Linux
Domoticz version: 4.
Location: Spain
Contact:

Re: Qubino thermostat mode ZMNHID1

Post by juankar »

I'll tell you about my system: it's a bath heater used to dry towells-
Thermostat use several devices, I need these one:
-A setpoint I name as SecaToallas-Termo
-A thermostat mode I name as SecaToallas-Inter
- I've created a virtual switch named SecaToallas

My lua switches AUTO/OFF when I switch ON/OFF my virtual switch, and If I change thermostat by hand (locally) then it changes the virtual swtich status.
The lua script is named script_device_Secatoallas (an script triggered when devices change)

Code: Select all

commandArray = {}

virtual  = "SecaToallas"
idx = otherdevices_idx["SecaToallas-Inter"]
idxV = otherdevices_idx[virtual]
-- This check if thermostate has changed by hand, locally not by domoticz
if (devicechanged_ext["idx"] == idx) then
    if (devicechanged_ext["nvalue"] == 1 and otherdevices[virtual] == "Off") then
        commandArray['UpdateDevice'] = idxV.."|1|On "
    elseif (devicechanged_ext["nvalue"] == 0 and otherdevices[virtual] == "On") then
        commandArray['UpdateDevice'] = idxV.."|0|Off "
    end
end
-- This check if virtual switch has changed
if devicechanged[virtual] == 'Off'  then
      commandArray['UpdateDevice'] = idx.."|0|0"
elseif devicechanged[virtual] == 'On' then
      commandArray['UpdateDevice'] = idx.."|1|1"
end   
return commandArray
I hope this is useful for your system.
Bye
mhendel
Posts: 5
Joined: Sunday 16 October 2016 18:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Qubino thermostat mode ZMNHID1

Post by mhendel »

Thanks Juankar, it helped me a lot!

By the way, dont you have a good manual or tutorial concerning LUA for domoticz? Like for dummies (as i am)?

A thousand thanks.

Mike
juankar
Posts: 221
Joined: Saturday 30 August 2014 20:20
Target OS: Linux
Domoticz version: 4.
Location: Spain
Contact:

Re: Qubino thermostat mode ZMNHID1

Post by juankar »

Wiki of Domoticz offers some information about use of LUA, but to learn LUA you need to search for a tutorial
A good tutorial or manual? It depends on your acknowdlge about programing.
I should start with https://www.lua.org/, there are a lot of info in this site.

Bye.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest