Daikin Hardware

For heating/cooling related questions in Domoticz

Moderator: leecollings

fenx2002
Posts: 9
Joined: Wednesday 11 November 2020 10:17
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Daikin Hardware

Post by fenx2002 »

hello
Yes i have exactly that
but how to get a selector switch after?
reneklomp
Posts: 30
Joined: Monday 20 February 2017 23:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Daikin Hardware

Post by reneklomp »

Hi, I have installed your dzVents script couple of days ago. Thanks for it!
However, I do see some strange behavior... I have tested the script once on Thursday around 14:00 by heating this unit for a while. This nicely shows in the diagram. But strange enough, this usage repeats itself each day after exactly 20 hours later although I haven't touched the airco unit!
Any idea why this is???

The output for the API is:
ret=OK,curr_day_heat=0/0/0/0/0/1/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0,prev_1day_heat=0/0/0/0/0/0/0/0/0/1/0/0/0/0/0/0/0/0/0/0/0/0/0/0,curr_day_cool=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0,prev_1day_cool=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0
Image2.jpg
Image2.jpg (93.9 KiB) Viewed 3583 times
Rene.
reneklomp
Posts: 30
Joined: Monday 20 February 2017 23:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Daikin Hardware

Post by reneklomp »

Hmm, I just looked at the Daikin App and it shows the same - so nothing wrong with the script. Apparently the unit is using some energy for whatever reason every day (each 20 hours)??! I also see that I tested your script on Wednesday apparently. Strange that I don't see it in the Domoticz diagram but will try to test again today.
Image1.jpg
Image1.jpg (29.89 KiB) Viewed 3583 times
MarsaultP
Posts: 33
Joined: Wednesday 27 November 2019 13:31
Target OS: Linux
Domoticz version: 2024.7
Location: France
Contact:

Re: Daikin Hardware

Post by MarsaultP »

Strange :
When I compare the energy (and power) values provided by the Dzvents script or by the Daikin app with my Linky electricity counter, I found a factor 2 (?)
Maybe Daikin measure intensity ? 100V in Japan, 220V in UE
To be verify ....
Jumper3126
Posts: 105
Joined: Thursday 31 December 2015 15:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Daikin Hardware

Post by Jumper3126 »

The airco report in a resolution of 0.1kwh. It may therefore vary from a more precise electricity meter. Didn’t come across that it differed with a factor of 2
fenx2002
Posts: 9
Joined: Wednesday 11 November 2020 10:17
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Daikin Hardware

Post by fenx2002 »

MarsaultP wrote: Saturday 14 November 2020 18:55 Strange :
When I compare the energy (and power) values provided by the Dzvents script or by the Daikin app with my Linky electricity counter, I found a factor 2 (?)
Maybe Daikin measure intensity ? 100V in Japan, 220V in UE
To be verify ....
Hi

please can you help me on how i can control my airco?
i sent you a PM maybe you didn't' see it
it will be very helpful
thanks
MarsaultP
Posts: 33
Joined: Wednesday 27 November 2019 13:31
Target OS: Linux
Domoticz version: 2024.7
Location: France
Contact:

Re: Daikin Hardware

Post by MarsaultP »

Sorry, I don't receive MP
I don't control with Domoticz, only with Daikin app (!)
So, I hope to use Domoticz in a near futur (?) with a virtual thermostat ...
Now, I want just to compare comsuption before and after Daikin install ...
Regards
fenx2002
Posts: 9
Joined: Wednesday 11 November 2020 10:17
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Daikin Hardware

Post by fenx2002 »

yomark wrote: Wednesday 11 November 2020 16:38
fenx2002 wrote: Wednesday 11 November 2020 10:23 i added in domoticz one split and i have 8 modules but only switches
Could you please create a screenshot?

You should have these devices when adding one unit:
image_2020-11-11_164007.png
Hello can i get some help please?
Thanks
yomark
Posts: 9
Joined: Tuesday 10 November 2020 10:34
Target OS: Linux
Domoticz version:
Contact:

Re: Daikin Hardware

Post by yomark »

Go to devices, look for the device, and press the green arrow to the right to add the device. It will then shiw up under switches. It's that simple, and it works like this for all domoticz devices.
fenx2002
Posts: 9
Joined: Wednesday 11 November 2020 10:17
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Daikin Hardware

Post by fenx2002 »

That's what i did but i don't have the same thing as you
I only have

download/file.php?mode=view&id=24729
copie ecran.png
copie ecran.png (110.2 KiB) Viewed 3546 times
Thanks
fenx2002
Posts: 9
Joined: Wednesday 11 November 2020 10:17
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Daikin Hardware

Post by fenx2002 »

My version of Domoticz is 4.9700 is it possible that this not working?
version domoticz.png
version domoticz.png (127.92 KiB) Viewed 3538 times
fenx2002
Posts: 9
Joined: Wednesday 11 November 2020 10:17
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Daikin Hardware

Post by fenx2002 »

Hi
Here are some news.
I did try to upgrade domoticz but it was a mistake as I was on jessie so it fucked up everything.
I got a new sd card and reinstalled everything from scratch so now I am on buster and domoticz 2020.2
I got my database reload so I have everything working.
Now I will do a copy not to loose everything again
The thing is I have the same devices and no selector for the winds of my airco. Did you do something to get the value?
Thanks
MarsaultP
Posts: 33
Joined: Wednesday 27 November 2019 13:31
Target OS: Linux
Domoticz version: 2024.7
Location: France
Contact:

Re: Daikin Hardware

Post by MarsaultP »

This script from "yomark" about Daikin consumption energy
I try to improve and comment just a little bit

Code: Select all

return 
{
--[[
Show hourly energy consumption from Daikin web server
Daikin clock is sync via Internet
Daikin web server send values after *:00
For call at 00:05 -> value to be extract from yesterday array
So, we have a 1 hour decay on the graph. To be exact, it will be necessary to update last value in sql base ....

doc : https://www.domoticz.com/forum/viewtopic.php?f=34&t=21126&sid=6eef839efc599b4eb44db319e1435060&start=20
from "yomark" 10/11/2020

Modify Ph Marsault 25/11/2020 
]]--
    on = 
    {
		timer = { 'at *:05' },
        httpResponses = { 'energyRetrievedRoom_1' }
    },

    logging = 
    {
        --level = domoticz.LOG_DEBUG, -- for debugging
        level = domoticz.LOG_INFO,
        marker = "Daikin energy"
    },

    execute = function (dz, item)
		
		local IP_Daikin  = '192.168.2.121'
		local Idx_device = 99
        
        -- Retrieve in a neat way via HTTP
        if (item.isTimer) then
            dz.openURL({
            url = 'http://'..IP_Daikin..'/aircon/get_day_power_ex',
            method = 'GET',
            callback = 'energyRetrievedRoom_1'
        })
        elseif (item.isHTTPResponse) then
			if (item.ok) then -- statusCode == 2xx
				local HTTPRaWData = item.data
				-- Example (1 line) :
				-- ret=OK,
				-- curr_day_heat=0/0/1/3/2/5/4/4/5/15/19/14/6/1/3/2/3/4/6/5/5/5/0/0,
				-- prev_1day_heat=0/0/1/2/3/4/5/4/6/5/5/4/4/3/3/3/2/3/4/4/4/4/4/7,
				-- curr_day_cool=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0,
				-- prev_1day_cool=0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0/0
				
				local firstSplit = dz.utils.stringSplit(HTTPRaWData,',') -- split the response string on comma -> one assignment per row
                local results = {}
                for _, row in ipairs(firstSplit) do
                	local hTable = dz.utils.stringSplit(row,'=')      -- split every row into a helper table containing a key and a value
                 	local key = hTable[1]
                	local value = tonumber(hTable[2]) or hTable[2]    -- store value as number when possible. If not store as string 
                	results[key] = hTable[2] 
					-- dz.log ('key ->'..key..'<- hTable[2] ->'..results[key])
                end	
	
				-- Split the words at the top further with function.  
				local arrayTodayHeat   = dz.utils.stringSplit(results["curr_day_heat"],'/')  -- Contain 24 values energy today heating
				local arrayLastDayHeat = dz.utils.stringSplit(results["prev_1day_heat"],'/') -- Contain 24 values energy yesterday heating
				local arrayTodayCool   = dz.utils.stringSplit(results["curr_day_cool"],'/')  -- Contain 24 values energy today cooling
				local arrayLastDayCool = dz.utils.stringSplit(results["prev_1day_cool"],'/') -- Contain 24 values energy yesterday cooling
				
				local LastHour = dz.time.hour

				local LastHourHeat =0
				local LastHourCool =0
				local LastHourWatth=0
				
				if (LastHour == 0) then
					-- this call is just after midnight to the energy between 23h and 24h yesterday
					-- So values are now in yesterday arrays
					
					-- last value updated
					LastHourHeat = arrayLastDayHeat[24] * 100 -- convert to Wh (Number w count each 100W)
					LastHourCool = arrayLastDayCool[24] * 100 -- convert to Wh (Number w count each 100W)
				else
					-- call for energy between 0h and 23h (last today call is at 23h05)	
					-- last value updated
					LastHourHeat = arrayTodayHeat[LastHour] * 100 -- convert to Wh (Number w count each 100W)
					LastHourCool = arrayTodayCool[LastHour] * 100 -- convert to Wh (Number w count each 100W)
				end
				
				-- dz.log('LastHour ->'..LastHour..' - LastHourHeat ->'..LastHourHeat)
				
				-- Total with Heat and Cool
				LastHourWatth   = LastHourHeat   + LastHourCool
				-- Time / Hour  
				-- Update device
				local DaikinConsumptionRoom_1 = dz.devices(Idx_device) -- Electric Dummy Counter
				local NewTotal = DaikinConsumptionRoom_1.WhTotal +  LastHourWatth

				-- args : updateElectricity ( Power , Energy )
				DaikinConsumptionRoom_1.updateElectricity ( LastHourWatth , NewTotal )
            else
				dz.notify('Unsuccesful connection airco sensor')
			end
		end
    end
}
Philippe
yomark
Posts: 9
Joined: Tuesday 10 November 2020 10:34
Target OS: Linux
Domoticz version:
Contact:

Re: Daikin Hardware

Post by yomark »

So which version are you on now?
And which version of the plugin are you using?
What is the Daiking type you are using?
Did you try to remove the device/hardware entirely after you did the upgrade of domiticz and restore?

But in short: You should not have to do anything. In my case(perfera's) , I just added the device, and waited a bit. The swithces should eventually show up automatically(but you must add them to "see" them).

Something else: does a tool like this work: https://github.com/ael-code/daikin-control ?
It should use the same HTTP / GET/POST as this domiticz plugin.

If the above tool does work: you could also do something as described here: https://www.domoticz.com/wiki/Daikin_wifi
(Create your own "switch" and script to control the unit)
yomark
Posts: 9
Joined: Tuesday 10 November 2020 10:34
Target OS: Linux
Domoticz version:
Contact:

Re: Daikin Hardware

Post by yomark »

Tnx Philippe! Nice work.
MarsaultP
Posts: 33
Joined: Wednesday 27 November 2019 13:31
Target OS: Linux
Domoticz version: 2024.7
Location: France
Contact:

Re: Daikin Hardware

Post by MarsaultP »

This script about a PID controller for Daikin and virtual thermostat with independant room temperature sensor.

Tested on a FTXM50N Prefera
Just a little question : dummy device thermostat set point appear red color on Domoticz screen ... I don't understand the meaning and why (?)

Code: Select all

return
--[[
Daikin PID controller with an independent temperature sensor and a virtual thermostat

   SETPOINT stemp MUST BE ROUNDED by half degree for command, example :
   http://192.168.x.xxx/aircon/set_control_info?pow=1&mode=4&f_rate=A&f_dir=2&stemp=21.5&shum=0
   
Tested on a FTXM50N Prefera

Dependencies :
Dummy device -> Thermostat set point
Dummy device -> Switch On/Off
Device temperature -> reference room temperature (NOT internal Daikin temerature)

Optional for tests :
Dummy device -> Custom sensor axis "°C"  (PID_prop)
Dummy device -> Custom sensor axis "°C*mn"  (PID_sum)
Dummy device -> Custom sensor axis "°C/mn"  (PID_diff)

doc : 
https://www.domoticz.com/forum/viewtopic.php?f=34&t=21126&sid=6eef839efc599b4eb44db319e1435060&start=20
https://www.domoticz.com/wiki/DzVents:_next_generation_Lua_scripting
https://en.wikipedia.org/wiki/PID_controller
https://www.domoticz.com/wiki/Daikin_wifi

https://www.domoticz.com/wiki/Plugins/Smart_Virtual_Thermostat.html
	  
Philippe Marsault 29/11/2020
]]-- 
{
	active = true,

	on = {
		timer 			= {'every 5 minutes'},
		httpResponses 	= {'Read_Daikin'}
	},
		
	data = 
	{
		h_delta_T = { history = true, maxItems = 10 }
	},
		
--    logging = 
--    {
--		level = domoticz.LOG_DEBUG, -- for debugging
--        -- level = domoticz.LOG_INFO,
--        marker = "Daikin control"
--    },

	execute = function(dz, item)
	
		function round(x)
			return x>=0 and math.floor(x+0.5) or math.ceil(x-0.5)
		end
		
		local IP_Daikin       = '192.168.2.121'
		local Idx_sonde_T     = 93    -- reference room temperature
		local Idx_thermostat  = 103   -- Room thermostat
		local Idx_ther_OnOff  = 100   -- Global swith for this script, example : use for holidays
		
		local Daikin_set_max  = 25    -- Set point internal temperature max for Daikin
		local Daikin_set_min  = 15    -- Set point internal temperature min for Daikin
		
		local Idx_ecart_T     = 104   -- Delta Room thermostat
		local Idx_PID_sum     = 105   -- PID_sum  -> for test (not necessary)
		local Idx_PID_prop    = 106   -- PID_prop -> for test (not necessary)
		local Idx_PID_diff    = 107   -- PID_diff -> for test (not necessary)
		local Idx_ther_Daikin = 102   -- Internal Daikin set point  -> for test (not necessary)
		
		-- from test -> Ku de l'ordre de 1.2
		-- from test -> oscillation period Tu ~ 240 mn
		local Kp              = 0.6     -- PID coefficient proportionnal (Kp=Ku*0.60)
		local Ki              = 0.006   -- PID coefficient integral (1.2*Ku/Tu)
		local Kd              = 21.6    -- PID coefficient differential (3*Ku*Tu/40)
		
		local ther_OnOff = dz.devices(Idx_ther_OnOff).state          -- Read thermostat control switch On-Off
		
        -- if is polling time and control switch is ON
		if ((item.isTimer) and (ther_OnOff == 'On' )) then
			dz.openURL({
				url = 'http://'..IP_Daikin..'/aircon/get_control_info',
				callback = 'Read_Daikin',
			})
			
        elseif (item.isHTTPResponse and (item.trigger == 'Read_Daikin') ) then
		-- this section :  receive HTTPResponse for the command Read_Daikin
		-- if (item.trigger == 'loggedin') then
			if item.ok then -- self.statusCode >= 200 and self.statusCode <= 299 : response is OK
				dz.log('get_control_info : Succesful connection for Read_Daikin')
				-- dz.log(item.data)
				
				local ther_setpoint = dz.devices(Idx_thermostat).setPoint    -- Read thermostat set point
				local room_temperature = dz.devices(Idx_sonde_T).temperature -- Read room temperature
				-- dz.log('room_temperature ->'..room_temperature)
				
				local response = item.data
				local firstSplit = dz.utils.stringSplit(response,',')	-- split the response string on comma -> one assignment per row
                local results = {}
                for _, row in ipairs(firstSplit) do
                	local hTable = dz.utils.stringSplit(row,'=')		-- split every row into a helper table containing a key and a value
                 	local key = hTable[1]
                	local value = tonumber(hTable[2]) or hTable[2]		-- store value as number when possible. If not store as string 
                	results[key] = value 
                end	

				Daikin_setpoint = results.stemp             			-- actual setpoint stored by Daikin server
				-- dz.log ('Daikin_setpoint read from Daikin ->'..Daikin_setpoint)
				-- dz.devices(Idx_ther_Daikin).updateTemperature(Daikin_setpoint)	-- Sync Daikin internal set point and Domotocz setpoint
				
				local fanDir_Daikin = tostring(results.f_dir)     -- read actual fan dir
				local mode_Daikin = tostring(results.mode)        -- read actual mode (heat or cool or auto)
				
				-- Delta temperature between reference room and Domoticz thermostat set point
				-- adding value to the historical variable
				dz.data.h_delta_T.add(room_temperature - ther_setpoint)
				local delta_T = dz.data.h_delta_T.get(1).data     -- newest value in the historical table
				-- dz.log ('delta_T ->'..delta_T)
				
				-- PID variables
				local PID_sum  = dz.data.h_delta_T.sum()*5				-- like integral value
				local PID_prop = delta_T								-- like proportionnal value
				local PID_num  = dz.data.h_delta_T.size
				local PID_diff = 0
				if PID_num > 3 then
				PID_diff = (dz.data.h_delta_T.get(1).data - dz.data.h_delta_T.get(3).data)*0.1	-- like différential value
								end
				
				local delta_T_PID = Kp*PID_prop + Ki*PID_sum + Kd*PID_diff
				
				-- Optional for tests
				dz.devices(Idx_PID_sum).updateCustomSensor(PID_sum)	    -- Update Custom sensor coeff in Domotocz
				dz.devices(Idx_PID_prop).updateCustomSensor(PID_prop)	-- Update Custom sensor coeff in Domotocz
				dz.devices(Idx_PID_diff).updateCustomSensor(PID_diff)	-- Update Custom sensor coeff in Domotocz		
				dz.devices(Idx_ecart_T).updateCustomSensor(delta_T_PID)	-- Update Custom sensor in Domotocz PID calculé
				
				-- Apply delta_T to the old Daikin internal set point
				local Daikin_setpoint = Daikin_setpoint - delta_T_PID
				
				Daikin_setpoint = round(Daikin_setpoint*2)*0.5					-- MUST BE ROUNDED by half degree step
				
				dz.log ('Daikin_setpoint with delta ->'..Daikin_setpoint)
				Daikin_setpoint = math.min(Daikin_setpoint,Daikin_set_max)		-- limit max
				Daikin_setpoint = math.max(Daikin_setpoint,Daikin_set_min)		-- limit min
				
				local c_stemp = string.format("%.1f", Daikin_setpoint)			-- string set point for Daikin command
				-- build command string
				-- http://192.168.2.121/aircon/set_control_info?pow=1&mode=4&f_rate=A&f_dir=2&stemp=24.0&shum=0
				
				local command_setpoint = 'http://'..IP_Daikin..'/aircon/set_control_info?pow=1&mode='..mode_Daikin..'&f_rate=A&f_dir='..fanDir_Daikin..'&stemp='..c_stemp..'&shum=0'
				-- dz.log ('command_write setpoint ->'..command_setpoint)																
				dz.openURL({url = command_setpoint})							-- send command to Daikin server
				
				-- Optional for tests
				Daikin_setpoint = tonumber(c_stemp)								-- value convert to number for Domoticz screen
				dz.devices(Idx_ther_Daikin).updateTemperature(Daikin_setpoint)	-- Update Daikin internal set point in Domotocz
				-- dz.log ('Daikin_setpoint limited ->'..Daikin_setpoint)
				
			else
				dz.log('get_control_info : Unsuccesful connection for Read_Daikin')
			end
        end
	end
}
Thank's to improve (?)

Philippe
yomark
Posts: 9
Joined: Tuesday 10 November 2020 10:34
Target OS: Linux
Domoticz version:
Contact:

Re: Daikin Hardware

Post by yomark »

MarsaultP wrote: Sunday 29 November 2020 12:26 Just a little question : dummy device thermostat set point appear red color on Domoticz screen ... I don't understand the meaning and why (?)
That is because it's not "updated"/"Last Seen" recently(I think in the last hour).
MarsaultP
Posts: 33
Joined: Wednesday 27 November 2019 13:31
Target OS: Linux
Domoticz version: 2024.7
Location: France
Contact:

Re: Daikin Hardware

Post by MarsaultP »

It's strange because the script read the value every 5mn ....
heureekma
Posts: 5
Joined: Tuesday 08 March 2016 14:38
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Amersfoort
Contact:

Re: Daikin Hardware

Post by heureekma »

Hi,

I have a setup of 2x ftxa25W wall units and 3x FVXM floor units combined with 2x 2MXM50M9 and 1x RXM50N9 outdoor units.

When I connect the indoor unit to Domoticz, only for the ftxa25w units devices are created. For the floor units nothing happens.

The floor units are more recent. Are they compatible to this plugin? If not, when will they be supported or how do I figure out how to make the plugin compatible?

Thanks!
Alain
Posts: 164
Joined: Sunday 26 April 2020 5:27
Target OS: Linux
Domoticz version: 2022.1
Location: Netherlands
Contact:

Re: Daikin Hardware

Post by Alain »

I have FTXM20 and FTXM25 Perfera's and I can't get a connection. When I select the hardware and input de IP address and click on "Add", I see in the log that a connection error is generated.

In the hardware field I see that I also have to input username and password. I don't see that in the wiki. What do I enter there? The SSID and Key for the wifi dongle? Or username and password for the phone app? Or leave it blank? Whichever, but at the moment with any of these options, I still get no connection.
Hue | Zigbee2Mqtt | MQTT | P1 | Xiaomi | RFXCom | Modbus | Qlima | Solaredge
TP-Link | Plugwise | Thermosmart | Node-Red | Grafana | Master and 5 remote servers
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests