FHEM Forum

FHEM => Sonstiges => Thema gestartet von: spaceboy am 10 August 2020, 15:10:24

Titel: Modbus_MapConvert reverse with accents
Beitrag von: spaceboy am 10 August 2020, 15:10:24
Hi,

I think the line
$val = decode ('UTF-8', $val);                              # convert nbsp from fhemweb
https://github.com/fhem/fhem-mirror/blob/master/fhem/FHEM/98_Modbus.pm#L4986

is not needed, as with it I get the following error:
MapConvert called from Set did not find Větrání s cirkulací in reversed map Vypnuto:0, Automat:1, Větrání:2, Větrání s cirkulací:3, Cirkulace:4, Noční předchlazení:5, Rozvážení:6, Přetlakové větrání:7,

Removing it fixes the problem.
I have a Modbus device with

attr Atrea dev-type-mode-map 0:Vypnuto, 1:Automat, 2:Větrání, 3:Větrání s cirkulací, 4:Cirkulace, 5:Noční předchlazení, 6:Rozvážení, 7:Přetlakové větrání
attr Atrea obj-h10709-reading mode-set
attr Atrea obj-h10709-set 1
attr Atrea obj-h10709-type mode

And I call it with
set Atrea mode-set Větrání s cirkulací
Titel: Antw:Modbus_MapConvert reverse with accents
Beitrag von: StefanStrobel am 31 August 2020, 16:17:55
Thanks for reporting this.
It will be fixed in the next release of the Modbus module.

Regards,
    Stefan