[SOLVED] MAP-File problems

Hello community,

i have a problem with my MAP-File,

i want to map different MAC-Adresses so that i know to wich AP the Sonoffs and so on are connected.

When i map for example “AA:BB:CC:DD:FF” then i wrote in the map file:
AA:\BB:\CC:\DD:\FF=AP Name Nr 1

When i now wan’t to map this MAC “E0:28:6D:F3:89:85” it doesn’t work
E0:\28:\6D:\F3:\89:85=AP Name Nr 2

what i need to change in my file? I do not understand it

Thanks for your help!

I’m pretty sure you have to escape the :, not the following char. So instead of

AA:\BB:\CC:\DD:\FF=AP Name Nr 1


AA\:BB\:CC\:DD\:FF=AP Name Nr 1

Thanks for your answer!

But that also didn’t work!

I tried it this ways now: : :\ :\

All versions are not working. I don’t understand whats wrong on the config

The example with AA:\BB… works but not with the second MAC

Please post your whole map file, and use code fences

Here is my map File:

F4\:\06\:\8D\:\DF\:\24\:\3D=Devolo AP 2,4GHz
E0\:\28\:\6D\:\F3\:\89\:\85=Repeater Living Room

The first one works fine but the second not. I tried all versions

That’s all very jumbled and inconsistent.

F4\:06\:8D\:DF\:24\:3D=Devolo AP 2,4GHz
E0\:28\:6D\:F3\:89\:85=Repeater Living Room

Take a close look at your MAC address too, people sometimes confuse 8/B and so on.

I tried your code but it’s also not working.

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


String testString "test string [%s]" 


F4\:06\:8D\:DF\:24\:3D=Devolo AP 2,4GHz
E0\:28\:6D\:F3\:89\:85=Repeater Living Room


rule "test kickoff"
	Item test_switch changed or
	System started

rule "test transform"
	Item testString changed
	logInfo("maptest", "mapping " + testString.state)
	var String textstring = transform("MAP", "mac.map", testString.state.toString)
	logInfo("maptest", "mapped to " + textstring)


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.

All the parts of your problem work fine for me. I have no idea if your editor might not be saving files. You could check the file folder location.

The system only looks for updated files once in a while, so the actioning of updates can take a variable time.

I did wonder about the uppercase filename, using the lowercase mac.map does seem like a good idea - make sure all references get changed.

If you’ve made small changes to Items like filename, I’d recommend an openHAB reboot.

Okay thanks for you help

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 don’t really know how to tackle your editor problem. Maybe re-link to the target folder.

I can’t think of any reason why transform service would go rummaging in your backup folders.

Okay i will try it in the evening

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!

Thanks for all your help!