diff --git a/fhem/CHANGED b/fhem/CHANGED index a98a521ba..89f04a83a 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 31_Nello: updated MQTT IP - feature: save writes a copy into restoreDirs (Forum #78769) - feature: WMBus: preliminary support for SML payload - feature: 98_DOIFtools: unattended save removed, Forum(78769) diff --git a/fhem/FHEM/31_Nello.pm b/fhem/FHEM/31_Nello.pm index dd1971d66..a07a8ed51 100644 --- a/fhem/FHEM/31_Nello.pm +++ b/fhem/FHEM/31_Nello.pm @@ -41,7 +41,7 @@ sub Nello_Define($) { my $name = $hash->{NAME}; my @a = split("[ \t][ \t]*", $def); - Nello_loadInternals($hash) if($init_done); + Nello_loadInternals($hash) if($init_done); return undef; } @@ -136,7 +136,7 @@ sub Nello_Attr(@) { if($attrName eq 'deviceID' && $init_done) { my $bridge = 'Nello_MQTT'; if(!defined InternalVal($bridge, "TYPE", undef)) { - CommandDefine(undef, $bridge . ' MQTT ec2-35-157-44-19.eu-central-1.compute.amazonaws.com:1883'); + CommandDefine(undef, $bridge . ' MQTT 18.194.251.238:1883'); CommandAttr(undef, $bridge . ' room hidden'); CommandSave(undef, undef); } @@ -171,6 +171,8 @@ sub Nello_loadInternals($) { Nello_updateLocations($hash, 0); Nello_poll($hash); } + + InternalTimer(gettimeofday()+10), "Nello_updateMQTTIP", $hash); } sub Nello_login { @@ -475,6 +477,14 @@ sub Nello_detectExecute { Nello_open($hash); } +sub Nello_updateMQTTIP { + my $mqtt_ip = trim(InternalVal("Nello_MQTT", "DEF", undef)); + if(defined $mqtt_ip && $mqtt_ip ne "18.194.251.238:1883") { + fhem("defmod Nello_MQTT MQTT 18.194.251.238:1883"); + CommandSave(undef, undef); + } +} + 1; =pod