Warnings: Sonoff/MQTT not working - MapTransformationService in openhab.log

  • Platform information:
    • Hardware: Banana pro/1 GB RAM/128GB ssd
    • OS: ARMBIAN 5.38 stable Debian GNU/Linux buster/sid 4.14.18-sunxi
    • Java Runtime Environment: Java™ SE Runtime Environment (build 1.8.0_161-b12)
    • openHAB version: 2.3.0-Ssnapshot (updated yesterday)
  • Sonoff switches / MQTT not working from sitemap.

Hi Guys,
I need again some help. I am running a new installtion with OH 2.3.0-Snapshot on an Banana Pro (latest Armbian) and i am having Transformation Warnings in my logfile.

[WARN ] [.core.transform.TransformationHelper] - Transformation 'org.eclipse.smarthome.transform.map.internal.MapTransformationService@1f1d5f5' with value 'NULL' failed: An error occurred while opening file.

The warning is more serious, as i think it keeps my Sonoff devices with mosquitto mqtt from operating.

I reduced my configuration to a simpe sitemap with just one switch and also created a single items file with only the item for this switch.

sitemap file

sitemap testbt label="My home automation" {
    Frame label="Date" {
        Text item=Date
    }

    Frame label="Berts shack" {
        Switch item=Sonoff_1SW        icon="light"
        }
} 

items file:

Switch       Sonoff_1SW                "Sonoff Switch 1 [%s]"     <light>    (EE_Werk2)
    { mqtt=">[mybroker:tasmota/Sonoff_1SW/cmnd/POWER:command:ON:1],
       >[mybroker:tasmota/Sonoff_1SW/cmnd/POWER:command:OFF:0],
       <[mybroker:tasmota/Sonoff_1SW/stat/POWER:state:default]" }
String       Sonoff_1Uptime             "Sonoff 1 Uptime [%s]"     <light>    (EE_Werk2)
    { mqtt="<[mybroker:Sonoff_1SW/Uptime/Minutes:state:default]"}

I found this entry about missing NULL in mapfiles.

I added this in each of my map files, one-by-one, but without success.
This is one of the map files (binary.map)

key=value
1=ON
0=OFF
ON=1
OFF=0
NULL=unknown
-=unknown

Yesterday i did an update of openhab. Hopefully that someone knows what is going on here…
Kind regards, Bert

If you have done as you say it has to work.
Please post you item und sitemap-file.
Is the map-file placed in the folder transform?

Hi Harry,
Yes i forgot to place my sitemap and items file, i just put it in the origional post.
And yes all map files are places in …/conf/transform directory.

There is no map-instruction. Do you have other Item und Sitemap.files?

Additional info.
The user on the filesystem:

bert@openhab-bpro:/opt/openhab2/conf$ ls -al
total 52
drwxrwxr-x 13 openhab openhab 4096 Feb 21 00:50 .
drwxr-xr-x  6 openhab openhab 4096 Mar  2 09:36 ..
drwxrwxr-x  2 openhab openhab 4096 Feb 21 00:50 html
drwxrwxr-x  3 openhab openhab 4096 Feb 21 00:50 icons
drwxrwxr-x  2 openhab openhab 4096 Mar  3 15:30 items
drwxrwxr-x  2 openhab openhab 4096 Feb 21 00:50 persistence
drwxrwxr-x  2 openhab openhab 4096 Feb 21 00:50 rules
drwxrwxr-x  2 openhab openhab 4096 Feb 21 00:50 scripts
drwxrwxr-x  2 openhab openhab 4096 Feb 27 15:27 services
drwxrwxr-x  2 openhab openhab 4096 Mar  3 14:46 sitemaps
drwxrwxr-x  2 openhab openhab 4096 Feb 21 00:50 sounds
drwxrwxr-x  2 openhab openhab 4096 Feb 21 00:50 things
drwxrwxr-x  2 openhab openhab 4096 Feb 27 10:44 transform
bert@openhab-bpro:/opt/openhab2/conf$

The Java version:

Java(TM) SE Runtime Environment (build 1.8.0_161-b12)

These are my items files:

bert@openhab-bpro:/opt/openhab2/conf$ ls items
astro.items  mqtt.items  mqtt.items-bt  readme.txt

But now I gave the astro.items file an other extension, so it is no longer read by openhab.
Also i commented-out the astro frame in the sitemap file.
Unfortunately, the problem remains. With each press on the Switch item on the sitemap i get this error in the log…

Perhaps some other info.
I have installed node-Red on this Banana Pro. And i am working on rules for switching my Sonoff devices.
(I find programming rules within openhab a crime… thats why i am trying node-Red.)
And from node-Red, all my Sonoff devices (~10) are working, also from the node-Red dashboard. Node-Red is using the same mosquitto broker as openhab. The same topics are being used.
Before i started with node-Red the openhab config worked with all these Sonoff switches. But i can’t see what node-Red has to do with this error… And it took me a while to setup node-red, so i am not reluctant to remove node-Red or begin again from scratch…

Which editor did you use for the map.files?
Try to rename the all map-file extensions, to see if there is the problem.

Thanks for your suggestions. I think you might be right about the editor.
I removed all files in items and sitemaps and started again using Visual Studio now.
It seems to work, because i do not receive the errors naymore. But now i have a problem with mqtt, but that’s something differently My node-Red / mqtt with the same broker is working, but the connection from openhab to the broker seems not to work anymore. To be continued…