Logic Machine Forum
Question on Daikin DIII net protocol - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10)
+--- Thread: Question on Daikin DIII net protocol (/showthread.php?tid=2675)



Question on Daikin DIII net protocol - kevinzh - 04.06.2020

Hi there
I'm using Daikin Modbus module (DTA116A621) with LM3 for home AC control. 
The profile provided by the engineer is as below: 

{
  "manufacturer": "Embedded Systems",
  "description": "DAIKN-DTA116A621",
  "mapping": [ 
 
    { "name": "on_off_status_00",  "bus_datatype": "bool",    "type": "inputregister",  "address": 2000,  "value_bitmask":0x0001},
    { "name": "set_temp_status_00", "bus_datatype": "float16",  "type": "inputregister",  "address": 2002,  "value_multiplier": 0.1,  "units": "C"  },
    { "name": "act_temp_status_00", "bus_datatype": "float16",  "type": "inputregister",  "address": 2004,  "value_multiplier": 0.1,  "units": "C"  },
    { "name": "on_off_00",          "bus_datatype": "bool",    "type": "register", "writable": 1, "write_only": true,  "value_base": -4352,  "value_multiplier": 1,    "address": 2000},
    { "name": "set_fan_00",        "bus_datatype": "uint8",    "type": "register", "writable": 1, "write_only": true, "value_base": 0.45684814453125, "value_multiplier": 0.0001220703125, "address": 2000},
    { "name": "set_mode_00",        "bus_datatype": "uint8",    "type": "register", "writable": 1, "write_only": true, "address": 2001 },
    { "name": "set_temp_00",        "bus_datatype": "float16",  "type": "register", "writable": 1, "write_only": true, "value_multiplier": 0.1, "address": 2002, "units": "C"},
......

in reality the fan-speed control does not work properly - it does not change in consistence with the setup on user interface (ABB wall-mount sensor control), and in certain speed settings (esp at low speed) the fan makes troubling noises

just wondering how the value-base and value-multiplier are calculated and chosen in this case, and how i can make changes to make the setup work right.
i also attached Daikin's protocol below

thanks in advance

Wang


RE: Question on Daikin DIII net protocol - admin - 04.06.2020

You forgot to attach a file.
The profile won't work correctly because a single register controls several different values. You will need a script similar to this to combine object values into a single register value:
https://forum.logicmachine.net/showthread.php?tid=2464&pid=15619#pid15619


RE: Question on Daikin DIII net protocol - kevinzh - 04.06.2020

(04.06.2020, 06:09)admin Wrote: You forgot to attach a file.
The profile won't work correctly because a single register controls several different values. You will need a script similar to this to combine object values into a single register value:
https://forum.logicmachine.net/showthread.php?tid=2464&pid=15619#pid15619

sorry here is the attachment.

I looked at the script - does it mean i need to read out the value from the input register and then write it back to the holding register? 

how should i embed the script into the project? - sorry i'm not very skillful at this.
thanks again


RE: Question on Daikin DIII net protocol - admin - 04.06.2020

You need to modify the profile to allow raw value to be written to the control register.
Code:
{ "name": "on_off_status_00", "bus_datatype": "bool", "type": "inputregister", "address": 2000, "value_bitmask": 0x0001},
{ "name": "set_temp_status_00", "bus_datatype": "float16", "type": "inputregister", "address": 2002, "value_multiplier": 0.1, "units": "C" },
{ "name": "act_temp_status_00", "bus_datatype": "float16", "type": "inputregister", "address": 2004, "value_multiplier": 0.1, "units": "C" },
{ "name": "control_00", "bus_datatype": "uint16", "type": "register", "writable": 1, "write_only": true, "address": 2000 },
{ "name": "set_mode_00", "bus_datatype": "uint8", "type": "register", "writable": 1, "write_only": true, "address": 2001 },
{ "name": "set_temp_00", "bus_datatype": "float16", "type": "register", "writable": 1, "write_only": true, "value_multiplier": 0.1, "address": 2002, "units": "C"},

You will also need 3 objects: on/off (bool), fan direction (1 byte unsigned), fan volume (either bool or 1 byte unsigned depending on 2 or 3 step fan)
All objects must have the same tag assigned to them, then you need to create an event script attached to this tag.

Change group addresses as needed, 1/1/4 is the group that is mapped to control register of ModBus device.
Code:
onoff = grp.getvalue('1/1/1') and 1 or 0
direction = grp.getvalue('1/1/2')
volume = grp.getvalue('1/1/3')

if direction > 7 or direction == 5 then
  direction = 6
end

if type(volume) == 'boolean' then
  volume = volume and 1 or 5
elseif volume ~= 1 and volume ~= 3 and volume ~= 5 then
  volume = 1
end

value = bit.bor(
  onoff,
  bit.lshift(6, 4),
  bit.lshift(direction, 8),
  bit.lshift(volume, 12)
)

grp.update('1/1/4', value)



RE: Question on Daikin DIII net protocol - kevinzh - 04.06.2020

(04.06.2020, 08:00)thank you very muchwhen i tried this, i got error message on scripting - cannot open User script: No such file or directory stack traceback: why is this happening? admin Wrote: You need to modify the profile to allow raw value to be written to the control register.
Code:
{ "name": "on_off_status_00", "bus_datatype": "bool", "type": "inputregister", "address": 2000, "value_bitmask": 0x0001},
{ "name": "set_temp_status_00", "bus_datatype": "float16", "type": "inputregister", "address": 2002, "value_multiplier": 0.1, "units": "C" },
{ "name": "act_temp_status_00", "bus_datatype": "float16", "type": "inputregister", "address": 2004, "value_multiplier": 0.1, "units": "C" },
{ "name": "control_00", "bus_datatype": "uint16", "type": "register", "writable": 1, "write_only": true, "address": 2000 },
{ "name": "set_mode_00", "bus_datatype": "uint8", "type": "register", "writable": 1, "write_only": true, "address": 2001 },
{ "name": "set_temp_00", "bus_datatype": "float16", "type": "register", "writable": 1, "write_only": true, "value_multiplier": 0.1, "address": 2002, "units": "C"},

You will also need 3 objects: on/off (bool), fan direction (1 byte unsigned), fan volume (either bool or 1 byte unsigned depending on 2 or 3 step fan)
All objects must have the same tag assigned to them, then you need to create an event script attached to this tag.

Change group addresses as needed, 1/1/4 is the group that is mapped to control register of ModBus device.
Code:
onoff = grp.getvalue('1/1/1') and 1 or 0
direction = grp.getvalue('1/1/2')
volume = grp.getvalue('1/1/3')

if direction > 7 or direction == 5 then
  direction = 6
end

if type(volume) == 'boolean' then
  volume = volume and 1 or 5
elseif volume ~= 1 and volume ~= 3 and volume ~= 5 then
  volume = 1
end

value = bit.bor(
  onoff,
  bit.lshift(6, 4),
  bit.lshift(direction, 8),
  bit.lshift(volume, 12)
)

grp.update('1/1/4', value)



RE: Question on Daikin DIII net protocol - admin - 04.06.2020

Which firmware version? Try saving the script again.


RE: Question on Daikin DIII net protocol - andrepneves@gmail.com - 28.12.2021

Hi!

Does anyone have the profile for Daikin DIII running properly? I'm trying to implement it but I'm having some trouble.

Thanks.


RE: Question on Daikin DIII net protocol - alexll - 23.03.2023

(28.12.2021, 05:21)andrepneves@gmail.com Wrote: Hi!

Does anyone have the profile for Daikin DIII running properly? I'm trying to implement it but I'm having some trouble.

Thanks.

Same case here. I need to control 61 devices with this DIII - Modbus RTU gateway: Modbus Interface DIII EKMBDXB7V1 

Is there any progress on this? Thank you!