, , , , . - , . .
, . , , , .
: , . Fibaro, .
HVAC Z-Wave. , . , , Z-Wave .
, .
, . Home Center 2. , . , , HC2 z-wave , z-wave , . 230 . , , , - 230 . . HC2 4-5 , 46 57 z-wave .
, , , , . , : , , CO2, , . , CO2.
z-wave , . , , . , 35 , . FIB_FGFS-101, IR REM_ZXT120, RS 014G0160, , DS 18B20 . , , .. 27 .
, , – .
. HC2 , . , DS 18B20, . , .
, . , , - , z-wave FIB_FGBS-001.
DS18B20
, . , .
— /
, , HVAC , . , , 18 .
. . .
, , .
3 Mitsubishi lectric. IR REM_ZXT120. , IR .
- , FIB_FGS-222.
Außerdem werden alle Apartments sieben Heizungsetagen und einen Zentralheizungskreis haben. Jeder Stromkreis ist mit einem Dreistellungsventil mit Servoantrieb ausgestattet. Es wird vom RGBW-Modul FIB_FGRGB-101 gesteuert.Nachdem wir alle erforderlichen Geräte ausgewählt und untersucht hatten, bestand unsere nächste Aufgabe darin, den effektivsten und autarksten Algorithmus für die Klimatisierung zu entwickeln.Klickbar:- , HVAC.
. 2 lua.
, .
:
local temp1 = tonumber(fibaro:getValue(85, "value")) 
local temp2 = tonumber(fibaro:getValue(86, "value"))
local temp3 = tonumber(fibaro:getValue(87, "value"))
local tempOUT = tonumber(fibaro:getValue(3, "Temperature"))
local IDCooler = 99   
local IDCond = 100 
local IDCondHeat = 102 
local IDFloor = 23 
local IDHeat = 24 
local tempset = fibaro:getGlobalValue("tempSet")
local workmode = fibaro:getGlobalValue("Workmode")
local tempInside = (temp1 + temp2 + temp3) / 3
local date = os.date("!*t", now)
local currtime = date.hour*60 + date.min 
local d = tempset - tempInside
local w = tempset - tempOUT
local cHeating = "on"
local winStatus = "closed"
print("Starting Climate Control")
print("t   = "..tempInside..",  t  = "..tempset)
print("Workmode: "..workmode..",  Windows: "..winStatus,",  Central Heating: "..cHeating)
if (fibaro:getGlobalValue("Workmode1") == "At work") 
then 
    
	if (tempInside < 18) 
    then 
    	if (cHeating == "on")
    	then 
    		print(" ")
      		fibaro:call(IDHeat, "turnOn")
      		if(Isventnow == "no")
        	then
      			fibaro:call(IDCooler, "turnOff")
      		end
            fibaro:call(IDCondHeat, "turnOff")
      		fibaro:call(IDCond, "turnOff")
      		fibaro:call(IDFloor, "turnOff")
      	elseif (windows == "closed")
      	then 
     		print("  ")
      		fibaro:call(IDCondHeat, "turnOn")
      		fibaro:call(IDCond, "turnOn")
      		fibaro:call(IDFloor, "turnOff")
     		if(Isventnow == "no")
        	then
      			fibaro:call(IDCooler, "turnOff")
      		end      
      		fibaro:call(IDHeat, "turnOff")
      	end
    
    elseif (tempInside > 21)
    then 
		if(fibaro:getValue(IDHeat, value) >0)
		then
    		print(" ")
    		fibaro:call(IDHeat, "turnOff")
		else
        	fibaro:call(IDCondHeat, "turnOn")
      		fibaro:call(IDCond, "turnOn")
      		fibaro:call(IDFloor, "turnOff")
            if(Isventnow == "no")
        	then
      			fibaro:call(IDCooler, "turnOff")
      		end
		end
    end 
elseif d < 1 and d > -1
then
  	print(" ")
    
	fibaro:call(IDCondHeat, "turnOff")
    fibaro:call(IDCond, "turnOff")
	
    if(Isventnow == "no")
    then
		fibaro:call(IDCooler, "turnOff")
    end
	
	fibaro:call(IDHeat, "turnOff")
	
	fibaro:call(IDFloor, "turnOff")
elseif (cHeating == "on")
then 
    if (d >= 1)
    then  
        if (d <= 3)
        then 
    		print("  ")
            
            fibaro:call(IDFloor, "turnOn")		
            fibaro:call(IDCondHeat, "turnOff")
            fibaro:call(IDCond, "turnOff")
            fibaro:call(IDHeat, "turnOff")
            fibaro:call(IDCooler, "turnOff")
        elseif (d > 3)
        then
    		print("    ")
			
    		fibaro:call(IDFloor, "turnOn")
            
    		fibaro:call(IDHeat, "turnOn")
			fibaro:call(IDCondHeat, "turnOff")
      		fibaro:call(IDCond, "turnOff")
      	    if(Isventnow == "no")
    		then
				fibaro:call(IDCooler, "turnOff")
    		end
        end
    elseif (d <= -1)
    then 
  		print(" ")
        
  		if(Isventnow == "no")
   	 	then
			fibaro:call(IDCooler, "turnOn")
    	end
        lastCondition = currTime
    end
elseif (cHeating == "off")
then 
    if (d >= 1)
    then
        if (w <= 0)
        then
    		print(" ")
            
    		if(Isventnow == "no")
      		then
				fibaro:call(IDCooler, "turnOn")
    		end
    		fibaro:call(IDCondHeat, "turnOff")    
			lastCondition = currTime
        elseif (d < 4)
        then 
    		print(" ")
			
    		fibaro:call(IDCondHeat, "turnOff")
      		if(Isventnow == "no")
    		then
				fibaro:call(IDCooler, "turnOn")
    		end
        	lastCondition = currTime
        elseif (winStatus == "closed")
        then
    		print("   ")
			
    		fibaro:call(IDCondHeat, "turnOn")
      		fibaro:call(IDCond, "turnOn")    
      		if(Isventnow == "no")
    		then
				fibaro:call(IDCooler, "turnOff")
    		end
        end
    elseif (d <= -1)
    then 
		if(w >= 0)
		then
	    	if(d > -4)
	    	then
     			print(" ")
	        	
                if(Isventnow == "no")
                then
                    fibaro:call(IDCooler, "turnOn")
                end
    			fibaro:call(IDCondHeat, "turnOff")
      			fibaro:call(IDCond, "turnOff")
	    	elseif (winStatus == "closed")
        	then
      			print(" ")
	        	
      			fibaro:call(IDCond, "turnOn")
      			fibaro:call(IDCondHeat, "turnOff")
                if(Isventnow == "no")
                then
                    fibaro:call(IDCooler, "turnOff")
                end
	    	end
		elseif (winStatus == "closed")
      	then
    		print(" ")
	    	
   			fibaro:call(IDCond, "turnOn")
      		fibaro:call(IDCondHeat, "turnOff")    
            if(Isventnow == "no")
            then
                fibaro:call(IDCooler, "turnOff")
            end
		end
    end
end     
, :
- Workmode {«at work», «at home»} //
- TempSet //
- WinStatus {'opened", «closed»} // ( )
- CHeating {«on»,«off»} //
. WinStatus. . CHeating.
, , - . , 15 . « ».
function vent_forced()
  
local workmode = fibaro:getGlobal('Workmode')
local isventnow = fibaro:getGlobal('Isventnow')
local lastModified = fibaro:getGlobalModificationTime('Isventnow')
  if ((os.time() - lastModified) < 10800) then
    	print ("       "..(os.time() - lastModified))
    	print ("     3- ")
  end 
	if ( workmode == 'At home' and isventnow == 'no' and (os.time() - lastModified) > 10800 ) then
	 	print ("       "..(os.time() - lastModified))
    		fibaro:call(99, "turnOn")
		fibaro:setGlobal('Isventnow', 'yes')
 		print ("     3 ")
		print ("   ")
    		fibaro:sleep(900000)
		fibaro:call(99, "turnOff")
    		fibaro:setGlobal('Isventnow', 'no')
		print ("   ")
	end 
end
 local sourceTrigger = fibaro:getSourceTrigger()
	if (sourceTrigger["type"] == "autostart") then
   		while true do
       		fibaro:debug('  ')
        		local currentDate = os.date("*t")
			if (currentDate.min >= 0 and currentDate.min <= 60) then
          		vent_forced()
          		end
		fibaro:debug(' ,    1 ')
  		fibaro:sleep(3600*1000)
        end
end
. , . , .