From ca9a7850ef67dda965c88d12e16e85fde446429e Mon Sep 17 00:00:00 2001 From: StefanStrobel <> Date: Sat, 6 Apr 2019 18:40:30 +0000 Subject: [PATCH] 98_Modbus.pm: litte bug fix git-svn-id: https://svn.fhem.de/fhem/trunk@19133 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_Modbus.pm | 5 ++++- fhem/FHEM/98_ModbusAttr.pm | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/98_Modbus.pm b/fhem/FHEM/98_Modbus.pm index 50a5b8dfd..a6d49183e 100755 --- a/fhem/FHEM/98_Modbus.pm +++ b/fhem/FHEM/98_Modbus.pm @@ -132,6 +132,7 @@ # 2019-01-31 fixed bug in GetSetCheck (failed to check for busy) # 2019-02-09 optimized logging in level 4/5 # 2019-02-19 little bug fix (warning) +# 2019-04-05 add a require for DevIO also in LDInitialize to be on the safe side ... # # # @@ -316,7 +317,7 @@ sub ModbusLD_GetIOHash($); sub ModbusLD_DoRequest($$$;$$$$); sub ModbusLD_StartUpdateTimer($); -my $Modbus_Version = '4.0.24 - 18.2.2019'; +my $Modbus_Version = '4.0.25 - 5.4.2019'; my $Modbus_PhysAttrs = "queueDelay " . "queueMax " . @@ -421,6 +422,8 @@ sub ModbusLD_Initialize($ ) { my ($modHash) = @_; + require "$attr{global}{modpath}/FHEM/DevIo.pm"; + $modHash->{DefFn} = "ModbusLD_Define"; # functions are provided by the Modbus base module $modHash->{UndefFn} = "ModbusLD_Undef"; $modHash->{ReadFn} = "Modbus_Read"; diff --git a/fhem/FHEM/98_ModbusAttr.pm b/fhem/FHEM/98_ModbusAttr.pm index 51c3eb32c..a9f2a2071 100755 --- a/fhem/FHEM/98_ModbusAttr.pm +++ b/fhem/FHEM/98_ModbusAttr.pm @@ -43,6 +43,7 @@ # 2018-11-10 fixed doku for defSetexpr # 2019-01-29 added doku for defSet and defHint # 2019-01-30 added once as option for pollDelay in doku +# 2019-04-05 put require for devio to top # package main; @@ -55,9 +56,9 @@ ModbusAttr_Initialize($) { my ($modHash) = @_; + require "$attr{global}{modpath}/FHEM/DevIo.pm"; #require "$attr{global}{modpath}/FHEM/98_Modbus.pm"; LoadModule "Modbus"; - require "$attr{global}{modpath}/FHEM/DevIo.pm"; ModbusLD_Initialize($modHash); # Generic function of the Modbus module does the rest