I compared the LOG-Message and the Map-File but the MACs are matching:
[WARN ] [rm.AbstractFileTransformationService] - Could not transform 'E0:28:6D:F3:89:85' with the file 'MAC.map' : Target value not found in map for 'E0:28:6D:F3:89:85'
Try swapping your first and second lines in map file. Maybe your editor supplies the wrong newline, so later lines are not read.
This works for me
test.items
String testString "test string [%s]"
mac.map
F4\:06\:8D\:DF\:24\:3D=Devolo AP 2,4GHz
E0\:28\:6D\:F3\:89\:85=Repeater Living Room
=Unknown
test.rules
rule "test kickoff"
when
Item test_switch changed or
System started
then
testString.postUpdate("F4:06:8D:DF:24:3D")
end
rule "test transform"
when
Item testString changed
then
logInfo("maptest", "mapping " + testString.state)
var String textstring = transform("MAP", "mac.map", testString.state.toString)
logInfo("maptest", "mapped to " + textstring)
testString.postUpdate("E0:28:6D:F3:89:85")
end
openhab.log
2019-03-18 00:47:05.835 [INFO ] [lipse.smarthome.model.script.maptest] - mapping F4:06:8D:DF:24:3D
2019-03-18 00:47:05.912 [INFO ] [lipse.smarthome.model.script.maptest] - mapped to Devolo AP 2,4GHz
2019-03-18 00:47:06.069 [INFO ] [lipse.smarthome.model.script.maptest] - mapping E0:28:6D:F3:89:85
2019-03-18 00:47:06.074 [INFO ] [lipse.smarthome.model.script.maptest] - mapped to Repeater Living Room
I tried swapping the first and second line but its also not working.
Can it be that OpenHab does not update the file?
I have a problem with the speed of the openhab-server.
So when i edit a file it takes a long time that “Loading ‘xxx.items’” shows in the Log, or in this case i changed MAC.map to mac.map in the label field in the items file but in the Log it says “connot found in MAC.map”-
So i think that it not update the files.
I noticed that when i want to rename a file with samba on the raspberry pi it do not change the name and in Visual Studio Code it says “You are not allowed”, but maybe 3 weeks ago it worked and i made no changes. Looks like it’s something general with the file updates
Do you have any general commands or tips to fix that? The last year it worked perfect but now i always need to restart the server and thats not a solution for me
Edit: i have a folder in /etc/openhab2/backup created to weeks ago, this folder is mounted to a FRITZ!NAS and there are two backups a 16GB
Is this maybe the problem? That the server starts scanning this backup folder?
I,m not at home today so I can’t test it today
I found, that the Offline-Files from the Windows Tool are not updating the files so when i saved a file nothing happens because it did no changes in the raspberry
I now turned off the Offline-Files, remounted the Network-Storage and everything is working perfectly now!