Daikin Hardware

For heating/cooling related questions in Domoticz

Moderator: leecollings

spiderjn
Posts: 22
Joined: Wednesday 27 December 2017 13:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8834
Contact:

Daikin Hardware

Post by spiderjn »

hi,

i discover a standard hardware controler Daikin (code by gizmocuz), i try it on my first wifi and it's worked by i can't change value or acces to all command.
I discovered code letting me think that the development was made under windows (and debug).
I try to add a second hardware but nothing seems to be add to my config (Sensor,..)

there are other posts on the subject, but I would like that kind of device can be managed as standard by my installation.

how i can help to complete this interesting feature ?

Best regards
spiderjn
Posts: 22
Joined: Wednesday 27 December 2017 13:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8834
Contact:

Re: Daikin Hardware

Post by spiderjn »

Hi All

i've made some modification to existing module, Start/Stop, Set Thermostat, Led On/Off.

Now i want add a multivalue switch, but i can't find information or sample to do that in source.

Any information for help me ?

Best regards
spiderjn
Posts: 22
Joined: Wednesday 27 December 2017 13:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8834
Contact:

Re: Daikin Hardware

Post by spiderjn »

Image20180107282.png
Image20180107282.png (61.14 KiB) Viewed 9433 times
done, need to be tested by other user.

Pull created : https://github.com/domoticz/domoticz/pull/2044

Have fun
User avatar
remb0
Posts: 499
Joined: Thursday 11 July 2013 22:21
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: Daikin Hardware

Post by remb0 »

great! will test it soon.
spiderjn
Posts: 22
Joined: Wednesday 27 December 2017 13:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8834
Contact:

Re: Daikin Hardware

Post by spiderjn »

Hi
do you have test it from beta ?
Best regards
User avatar
remb0
Posts: 499
Joined: Thursday 11 July 2013 22:21
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: Daikin Hardware

Post by remb0 »

Yes and it works great! I will test it better tomorrow. and report it when i found something. but for now: great work!!
spiderjn
Posts: 22
Joined: Wednesday 27 December 2017 13:37
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8834
Contact:

Re: Daikin Hardware

Post by spiderjn »

Hi Remb0,

i search how automatize temerature set point, i can change it on web interface, but how do that with "Scénario" ?

i lost something in module ?

Best regards
User avatar
tcviper
Posts: 89
Joined: Monday 30 June 2014 13:34
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Daikin Hardware

Post by tcviper »

This plugin/module for domoticz works very well, the only thing Im missing is, when I add the 'Mode', how am i then able to have this say "Heat", "Cool", "auto" and so on? What do I need to change for that to work?

Update:
For those wanting to know, i changed the Airco Mode to Selector and then manually added these to each button:

Code: Select all

- Off : http://192.168.1.19/aircon/set_control_info?pow=0&mode=3&stemp=19&shum=0&f_rate=A&f_dir=0
- Cool : http://192.168.1.19/aircon/set_control_info?pow=1&mode=3&stemp=18&shum=0&f_rate=A&f_dir=0
- Heat : http://192.168.1.19/aircon/set_control_info?pow=1&mode=4&stemp=21&shum=0&f_rate=A&f_dir=0
- Auto : http://192.168.1.19/aircon/set_control_info?pow=1&mode=0&stemp=19&shum=0&f_rate=A&f_dir=0
The 192.168.1.19 is the IP of my Daikin Wifi module.
Jumper3126
Posts: 105
Joined: Thursday 31 December 2015 15:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Daikin Hardware

Post by Jumper3126 »

Bit of an old post, so hope it is still read.

Has anyone tried to control the additional features such as powerful via http post? This feature is available via the app so it should be possible I guess.

I'm able to control the standard options using

Code: Select all

http://192.168.1.76/aircon/set_control_info?pow=1&mode=4&stemp=22&shum=0&f_rate=B&f_dir=0
When I put the airco in power mode and ask get_control_info it shows adv=2, which it doesn't with the powermode off.

Code: Select all

http://192.168.1.76/aircon/set_control_info?pow=1&mode=4&stemp=22&shum=0&f_rate=B&f_dir=0&adv=2
This command doesnt put it in the correct mode unfortunately
ubfssF
Posts: 59
Joined: Monday 02 November 2015 14:12
Target OS: Linux
Domoticz version: 2.2364
Location: Netherlands
Contact:

Re: Daikin Hardware

Post by ubfssF »

I am using a blocky "program" to control my new Daikin airco (see my other post in a thread the Heating and cooling list), but in my experience switching mode (from Cool to Heat etc) does not work reliable. It sometimes works, but often it does not.
I see in the log: 2020-05-13 11:56:48.670 Error: Daikin: Error connecting to: 192.168.1.76
Strangely changing the setpoint and putting it on and off seems to work every time.

Is it never working for you?
Jumper3126
Posts: 105
Joined: Thursday 31 December 2015 15:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Daikin Hardware

Post by Jumper3126 »

Hi,

Switching to cool isn't an issue. I want to use the powermode, in which it blows very cold air for 15 minutes. This feature isn't standard with the daikin hardware in domoticz, but you can select it in the app. I think it should also be possible when giving the http command, but havent found out how.
CronoS
Posts: 135
Joined: Wednesday 15 July 2015 23:40
Target OS: -
Domoticz version:
Contact:

Re: Daikin Hardware

Post by CronoS »

Jumper3126 wrote: Wednesday 13 May 2020 21:01 Hi,

Switching to cool isn't an issue. I want to use the powermode, in which it blows very cold air for 15 minutes. This feature isn't standard with the daikin hardware in domoticz, but you can select it in the app. I think it should also be possible when giving the http command, but havent found out how.
I use powermode in my Domoticz; created a selector switch for it, in my setup with the name "Daikin Special Mode". In this switch I have three buttons: off, Power Mode and Economic Mode.

In my setup I have a LUA script controlling the Daikin, I have added some stuff for the Powerfunctions. The snippet of the code is:

Code: Select all

if (devicechanged['Daikin Special Mode']) then
    print ("Daikin Special Mode Script started")
     if (otherdevices['Daikin Special Mode'] == 'Off') then
            spmode = '0'
            sPowermodegezet = tonumber(uservariables['Daikin_Power_Mode'])
		    if (sPowermodegezet~=0) then
		        spmodekind = tonumber(uservariables['Daikin_Power_Mode'])
			    print ("Powermode was " ..spmodekind)
			end

        elseif (otherdevices['Daikin Special Mode'] == 'Economic Mode') then
            spmode = '1'
            spmodekind = '2'
			commandArray['Variable:Daikin_Power_Mode'] = tostring(2)
        elseif (otherdevices['Daikin Special Mode'] == 'Power Mode') then
            spmode = '1'
            spmodekind = '1'
            commandArray['Variable:Daikin_Power_Mode'] = tostring(1)
    end
    cmd = 'curl "http://' .. daikin_ip .. '/aircon/set_special_mode?set_spmode='..spmode..'&spmode_kind='..spmodekind..'"'
    print ("command: "..cmd)
    os.execute(cmd)
end
Keep in mind that this is not the whole script only the part with the Modes. Basically you don't need to have the code; you can use the variables SPmode and SPModekind to setup these buttons! Try it using a http command :)
Jumper3126
Posts: 105
Joined: Thursday 31 December 2015 15:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Daikin Hardware

Post by Jumper3126 »

Great, that is exactly what I needed! Thanks

How did you find this out? I didn't come across this somewhere
ubfssF
Posts: 59
Joined: Monday 02 November 2015 14:12
Target OS: Linux
Domoticz version: 2.2364
Location: Netherlands
Contact:

Re: Daikin Hardware

Post by ubfssF »

CronoS wrote: Wednesday 13 May 2020 21:14 I use powermode in my Domoticz; created a selector switch for it, in my setup with the name "Daikin Special Mode". In this switch I have three buttons: off, Power Mode and Economic Mode.

In my setup I have a LUA script controlling the Daikin, I have added some stuff for the Powerfunctions. The snippet of the code is:

Code: Select all

.....
Keep in mind that this is not the whole script only the part with the Modes. Basically you don't need to have the code; you can use the variables SPmode and SPModekind to setup these buttons! Try it using a http command :)
Is it possible for you to share the whole Lua Daikin script? That would a great asset for me and other users
CronoS
Posts: 135
Joined: Wednesday 15 July 2015 23:40
Target OS: -
Domoticz version:
Contact:

Re: Daikin Hardware

Post by CronoS »

Ofcourse; here is the lua I am using. I have setup the following buttons:
Daikin Power: on/off
Daikin Mode (selector switch): auto, drogen, koelen, verwarmen, ventilator
Daikin Special mode (selector switch): Off, Powermode and Economic mode
Daikin ventilator snelheid (selector switch): Auto, silent, L1, L2, L3, L4, L5
Daikin Wind (selector switch): off, Roteren
Daikin Zet temperatuur: set temp value
Daikin Led Indicator: on - off

Basically these buttons also comes with the hardware setup in Domoticz, so keep in mind to use the rigth button accordingly. The Daikin Special mode button is not something that comes with the plugin .. :) Also I have more buttons for my airco with blockys, but that is more to automate the airco, so maybe you need more in you're automation needs besides these.. but these are the basics for me.
My Daikin is also only able to rotate in one direction, so I only use off and rotate. Normally in a standard domoticz setup, this switch has more values but these do not apply on my Airco.

The script: change the IP adress of the Daikin Wifi

Code: Select all

commandArray = {}
daikin_ip = 'IPADRESS'
if (devicechanged['Daikin Mode']) or (devicechanged['Daikin Wind']) or (devicechanged['Daikin Ventilatorsnelheid']) or (devicechanged['Daikin Power']) then
    print ("Daikin script started")
    stemp = otherdevices_svalues['Daikin Zet Temperatuur']
    if (otherdevices['Daikin Power'] == 'Off') then
        pow = 0
        mode = 0
    else
        pow = 1
        if (otherdevices['Daikin Mode'] == 'Verwarmen') then
            mode = 4
        elseif (otherdevices['Daikin Mode'] == 'Koelen') then
            mode = 3
        elseif (otherdevices['Daikin Mode'] == 'Auto') then
            mode = 0
        elseif (otherdevices['Daikin Mode'] == 'Drogen') then
            mode = 2
        elseif (otherdevices['Daikin Mode'] == 'Ventilator') then
            mode = 6
        end
        if (otherdevices['Daikin Ventilatorsnelheid'] == 'Auto') then
            f_rate = 'A'
        elseif (otherdevices['Daikin Ventilatorsnelheid'] == 'Silent') then
            f_rate = 'B'
        elseif (otherdevices['Daikin Ventilatorsnelheid'] == 'l1') then
            f_rate = '3'
        elseif (otherdevices['Daikin Ventilatorsnelheid'] == 'l2') then
            f_rate = '4'
        elseif (otherdevices['Daikin Ventilatorsnelheid'] == 'l3') then
            f_rate = '5'
        elseif (otherdevices['Daikin Ventilatorsnelheid'] == 'l4') then
            f_rate = '6'
        elseif (otherdevices['Daikin Ventilatorsnelheid'] == 'l5') then
            f_rate = '7'
        end
        f_dir = '0'
        if (otherdevices['Daikin Wind'] == 'Uit') then
            f_dir = '0'
        end
        if (otherdevices['Daikin Wind'] == 'Roteren') then
            f_dir = '1'
        end
        cmd = 'curl "http://' .. daikin_ip .. '/aircon/set_control_info?pow='..pow..'&mode='..mode..'&stemp='..stemp..'&shum=0&f_rate='..f_rate..'&f_dir='..f_dir..'"'
        print ("command: "..cmd)
        os.execute(cmd)
    end
end

if (devicechanged['Daikin Special Mode']) then
    print ("Daikin Special Mode Script started")
     if (otherdevices['Daikin Special Mode'] == 'Off') then
            spmode = '0'
            sPowermodegezet = tonumber(uservariables['Daikin_Power_Mode'])
		    if (sPowermodegezet~=0) then
		        spmodekind = tonumber(uservariables['Daikin_Power_Mode'])
			    print ("Powermode was " ..spmodekind)
			end

        elseif (otherdevices['Daikin Special Mode'] == 'Economic Mode') then
            spmode = '1'
            spmodekind = '2'
			commandArray['Variable:Daikin_Power_Mode'] = tostring(2)
        elseif (otherdevices['Daikin Special Mode'] == 'Power Mode') then
            spmode = '1'
            spmodekind = '1'
            commandArray['Variable:Daikin_Power_Mode'] = tostring(1)
    end
    cmd = 'curl "http://' .. daikin_ip .. '/aircon/set_special_mode?set_spmode='..spmode..'&spmode_kind='..spmodekind..'"'
    print ("command: "..cmd)
    os.execute(cmd)
end
return commandArray
In the Powermode part of the Script I also use a Variable "Daikin_Power_mode" where I change that to 1. 1 means On, 0 means off. When the airco is switched off I also have a blocky to reset the Powermode switch to off and change that variable to 0, otherwise that Special Mode selecter will stay at a enabled value when the airco is off. Maybe you want to set up this differently, but for me that worked OK. In the normal way the daikin works, the powermode is switched off after 20 minutes I thought.
Also my airco doesn't have a humidity sensor, so I cannot set that value... maybe you have one, then you can expand you're script maybe.

I use it for quite some time now, it works OK...
ubfssF
Posts: 59
Joined: Monday 02 November 2015 14:12
Target OS: Linux
Domoticz version: 2.2364
Location: Netherlands
Contact:

Re: Daikin Hardware

Post by ubfssF »

Thanks!!! As I am Dutch as well, there is not a lot that needs to be changed in the script :D

Edit: after adding the LUA script (device-triggered), switching the special mode works fine!

However, the log file shows this error for this line of code when I tried to change the mode:

Code: Select all

2020-05-20 13:01:29.079 Status: User: Admin initiated a switch command (474/Daikin Mode/Set Level)
2020-05-20 13:01:29.101 Status: LUA: Daikin script started
2020-05-20 13:01:29.102 Error: EventSystem: in Daikin airco 2: [string "commandArray = {}..."]:44: attempt to concatenate a nil value (global 'stemp')
Row 44 is:

Code: Select all

cmd = 'curl "http://' .. daikin_ip .. '/aircon/set_control_info?pow='..pow..'&mode='..mode..'&stemp='..stemp..'&shum=0&f_rate='..f_rate..'&f_dir='..f_dir..'"'
The airco isn't reacting also to the command to switch mode.
The same error occurs when I try to change the modes for Daikin Wind and Daikin Ventilatorsnelheid.
The Daikin Power switch isn't working as well, but it doesn't initiate an error.

@CronoS: can you give me a hint on what the cause of these errors are?

What I have done so far:
- I have added dummy devices als switch with a choice (Keuzeschakelaar) or just switches. For Daikin Zet temperatuur I have used the setpoint variables
- for each of dummy devices I have set the different states that are possible, as used in the script. For example: for Daikin Mode these are Verwarmen, Koelen, Auto, Drogen, Ventilator. For Daikin Wind I had used Uit and Roteren, which didn't work. I've used Stopped, Vert, Hor and both, and changed the code, but that doesn't solve it as well. Changed code:

Code: Select all

        if (otherdevices['Daikin Wind'] == 'Stopped') then
            f_dir = '0'
        end
        if (otherdevices['Daikin Wind'] == 'Vert') then
            f_dir = '1'
        end
        if (otherdevices['Daikin Wind'] == 'Hor') then
            f_dir = '2'
        end
        if (otherdevices['Daikin Wind'] == 'Both') then
            f_dir = '3'
        end
- I have added an integer user variable called Daikin_Power_Mode
ubfssF
Posts: 59
Joined: Monday 02 November 2015 14:12
Target OS: Linux
Domoticz version: 2.2364
Location: Netherlands
Contact:

Re: Daikin Hardware

Post by ubfssF »

Fixed it. It was a typo: I had named "Daikin Zet Temperatuur" wrongly to "Daikin Zet temperatuur"
CronoS
Posts: 135
Joined: Wednesday 15 July 2015 23:40
Target OS: -
Domoticz version:
Contact:

Re: Daikin Hardware

Post by CronoS »

Awesome! Glad it worked, but indeed everything is case sensitive :)
A mistype by me :) But great it works out OK
Jumper3126
Posts: 105
Joined: Thursday 31 December 2015 15:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Daikin Hardware

Post by Jumper3126 »

I got my daikin airco script running quite nicely now, allowing me to turn on/off and switch mode based on time and conditions. But I also want to be able to control the airco via the app.

To do so, I read out the current settings according domoticz (via the daikin hardware), change only settings if there is a reason to (like time) and then send those settings back to the airco via:

Code: Select all

domoticz.openURL('http://ip adress/aircon/set_control_info?pow='..pow..'&mode='..mode..'&stemp='..stemp..'&shum=0&f_rate='..f_rate..'&f_dir='..f_dir)
This works if I turn off the airco with the domoticz airco power switch, but not via the app. Further inspection showed that not all daikin domoticz devices are frequently updated. The temperatures, wind setting, ventilation and LED are updated every 5 minutes, but the mode, power and setpoint are not. This explains why my script doesnt run as intended.

Do others have this as well?
What is the reason that not all devices are frequently updated?
Is there a solution (apart from asking for an update of those parameters via a command)?
Jumper3126
Posts: 105
Joined: Thursday 31 December 2015 15:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Daikin Hardware

Post by Jumper3126 »

FYI this is the complete script. Note that it is still very drafty. The airco is installed in a serre with a lot of plants for which I need to control temp and humidity

Code: Select all

return {
	active = true,

	on = {
		timer = {'every 3 minutes'} -- this should allow the airco to turn on/off completely before being checked again
--		timer = {'every minute'} -- this should allow the airco to turn on/off completely before being checked again
	},
	
	data = { -- persistant data
            ForcedOff= {initial = 0 }, -- 1 if airco was forced off because of door
            ForcedOffFloor= {initial = 0 } -- 1 if floorheating was forced off because of door
    },

    execute = function(domoticz, device)
        domoticz.notify('Hi')
        -- define devices
        local tempS = domoticz.devices(1103)-- Temp greenwall
        local tempW = domoticz.devices(1132)-- Temp window
        local tempA = domoticz.devices(1091)-- Temp airco in 
        local tempO = domoticz.devices(1090)-- Temp airco out
        TempDiff = domoticz.utils.round((tempA.temperature - tempS.temperature),2)

        local doorS = domoticz.devices(1170)        -- doorsensor Serre
        local Floorheating = domoticz.devices(504)  --Vloerverwarmingspomp (#3)
        local AircoSP = domoticz.devices(1087)      --Temp Setpoint (airco) Thermostat	    SetPoint
        local AircoPower = domoticz.devices(1085)   --Power (airco)	        Light/Switch	Switch 
        local AircoMode = domoticz.devices(1086)    --Mode (airco)	        Light/Switch	Selector: 0 Off, 10	AUTO, 20 DEHUMDIFICATOR, 40	HOT, 50	FAN
        local AircoVent = domoticz.devices(1088)    --Ventilation (airco)	Light/Switch	Selector: 0	Off, 10	AUTO, 20 Silence, 30 Lev 1, 40 Lev 2, 50 Lev 3, 60 Lev 4, 70 Lev 5
        local AircoWind = domoticz.devices(1089)    --Winds (airco)	        Light/Switch	Selector: 0 Off, 10 Stopped, 20 Vert, 30 Horiz, 40 Both

        -- Define airco variables
        local stemp = 0
        local pow = 0 
        local mode = 0
        local f_rate = 0
        local f_dir = 0
        local spmode = 0
        local spmodekind = 0

        -- Set airco variables
        stemp = AircoSP.setPoint
        if (AircoPower.state=='Off') then
            pow = 0
            mode = 0
        else
            pow = 1
        if (AircoMode.levelName == 'AUTO')                  then mode = 0
        elseif (AircoMode.levelName == 'DEHUMDIFICATOR')    then mode = 2
        elseif (AircoMode.levelName == 'COLD')              then mode = 3
        elseif (AircoMode.levelName == 'HOT')               then mode = 4
        elseif (AircoMode.levelName == 'FAN')               then mode = 6
        end

        if (AircoVent.levelName == 'AUTO')                  then f_rate = 'A'
        elseif (AircoVent.levelName == 'Silence')           then f_rate = 'B'
        elseif (AircoVent.levelName == 'Lev 1')             then f_rate = 3
        elseif (AircoVent.levelName == 'Lev 2')             then f_rate = 4
        elseif (AircoVent.levelName == 'Lev 3')             then f_rate = 5
        elseif (AircoVent.levelName == 'Lev 4')             then f_rate = 6
        elseif (AircoVent.levelName == 'Lev 5')             then f_rate = 7
        end

--        if (AircoWind.levelName == 'Stopped')               then f_dir = 0
--        elseif (AircoWind.levelName == 'Vert')              then f_dir = 1
--        elseif (AircoWind.levelName == 'Horiz')             then f_dir = 2
--        elseif (AircoWind.levelName == 'Both')              then f_dir = 3
--        end
        end


-- Schedule controller (for now only summer)
        -- Day time
 		if (domoticz.time.matchesRule('at 10:01-22:00')) then 
 		    if (domoticz.time.matchesRule('at 12:01-12:04')) then
 		        domoticz.notify('Heating one')
 	    	    pow = 1
                mode = 4 -- heat
                stemp = 22
                f_rate = 'A'

     	elseif (domoticz.time.matchesRule('at 21:01-21:04')) then
     	        domoticz.notify('airco off')
                pow = 0
            end
        end

 		if (domoticz.time.matchesRule('at 22:01-10:00')) then 
     	    if (domoticz.time.matchesRule('at 01:01-1:04')) and (tempS.temperature> 19) then
     	        domoticz.notify('Cooling')
 		        pow = 1
                mode = 3 -- cool
                stemp = 18
                f_rate = 'A'
 		    elseif (domoticz.time.matchesRule('at 03:01-03:04')) and (tempS.temperature> 18) then
 		        domoticz.notify('Cooling')
 		        pow = 1
                mode = 3 -- cool
                stemp = 18
                f_rate = 'A'
 		    elseif (domoticz.time.matchesRule('at 04:01-04:04')) and (tempS.temperature> 18) then
                --powerkoelen
                --domoticz.notify('PowerCooling')
                --domoticz.openURL('http://192.168.1.76/aircon/set_control_info?pow=1&mode=3&stemp=18&shum=0&f_rate=A&f_dir=0')
                --domoticz.openURL('http://192.168.1.76/aircon/set_special_mode?set_spmode=1&spmode_kind=1')
                --domoticz.log('qqq http://192.168.1.76/aircon/set_special_mode?set_spmode=1&spmode_kind=1')
 	        elseif (domoticz.time.matchesRule('at 07:01-07:04')) then
 	            domoticz.notify('Airco off')
 		        pow = 0
                mode = 0
            end
        end

-- Emergency with alarms
        if (tempS.humidity< 50) then domoticz.notify('Too dry! Serre humidity <50%', domoticz.PRIORITY_HIGH) end
        
        if (tempS.temperature< 14) or (tempA.temperature< 14) then 
            domoticz.notify('Too cold! Serre temp <14', domoticz.PRIORITY_HIGH)
            pow = 1
            mode = 4 -- heat
            stemp = 13
            f_rate = 'A'
            if (doorS.state=='Open') then domoticz.notify('Doors still open') end
        end    
        if (tempS.temperature> 30) or (tempA.temperature> 30) then 
            domoticz.notify('Too hot! Serre temp >30', domoticz.PRIORITY_HIGH)
            pow = 1
            mode = 3 -- cool
            stemp = 27
            f_rate = 7
            if (doorS.state=='Open') then domoticz.notify('Doors still open') end    
        end

-- If door is open
        if (doorS.state=='Open') and (doorS.lastUpdate.minutesAgo>= 3) and (pow == 1) then
            domoticz.notify('Door open, turn airco off')
            pow = 0
            domoticz.data.ForcedOff = 1
        elseif (doorS.state=='Closed') and (doorS.lastUpdate.minutesAgo>= 5) then
                if ((AircoPower.state=='Off') and (domoticz.data.ForcedOff == 1)) then 
                    domoticz.notify('Door closed, continue airco')
                    pow = 1
                end
        end

        if (pow == 1) then domoticz.data.ForcedOff = 0 end

domoticz.openURL('http://192.168.1.76/aircon/set_control_info?pow='..pow..'&mode='..mode..'&stemp='..stemp..'&shum=0&f_rate='..f_rate..'&f_dir='..f_dir)
--domoticz.openURL('http://192.168.1.76/aircon/set_special_mode?set_spmode='..spmode..'&spmode_kind='..spmodekind..

domoticz.log('qqq')
domoticz.log('qqq Serre door: '..doorS.state..' last update:'..doorS.lastUpdate.minutesAgo..' Forced:'..domoticz.data.ForcedOff)
domoticz.log('qqq Temp greenwall: ' ..domoticz.utils.round(tempS.temperature,1)..' Temp SerreW: ' ..domoticz.utils.round(tempW.temperature,1)..' Temp Airco: ' ..tempA.temperature..' Temp Outside: ' ..tempO.temperature..' Temp Diff: ' ..TempDiff)
domoticz.log('qqq Door: ' ..doorS.state..' Airco: ' ..AircoPower.state..' Setpoint: ' ..AircoSP.setPoint)
domoticz.log('qqq Mode: ' ..AircoMode.levelName..' Vent: ' ..AircoVent.levelName..' Wind: ' ..AircoWind.levelName)
domoticz.log('qqq http://192.168.1.76/aircon/set_control_info?pow='..pow..'&mode='..mode..'&stemp='..stemp..'&shum=0&f_rate='..f_rate..'&f_dir='..f_dir)
domoticz.log('qqq http://192.168.1.76/aircon/set_special_mode?set_spmode='..spmode..'&spmode_kind='..spmodekind)
end
}
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest