Problems to read unusual MQTT response

openhabian, latest update, mqtt binding 2.

I’m trying to integrate zigbee2mqtt’s network mapping with openHAB2, inspired and following Zigbee2MQTT network map .
Everything works, just one thing: i can’t read the response into a string item.

Basicaliy it works like this:
The command to scan the network is sent via mqtt:

z2m/bridge/networkmap graphviz

then the bridge scans and formats and returns the result like:

z2m/bridge/networkmap/graphviz digraph G {
node[shape=record];
 "0x00124b000e0eaba9" [style="bold, filled", fillcolor="#e04e5d", fontcolor="#ffffff", label="{Coordinator|0x00124b000e0eaba9 (0)|2020-07-02T20:29:10+02:00}"];
... (skip 200+ lines)
   "0x000b57fffe89c9c0" -> "0x000b57fffed87226" [penwidth=0.5, weight=0, color="#994444", label="122"]
}

I have a thing

 Thing topic z2mBridge "z2m Bridge"  {
    Channels:
        Type switch : state "State" [
            stateTopic = "z2m/bridge/state",
            off="offline",
            on="online" 
        ]
        Type switch : permitJoin "Permit join" [
            stateTopic = "z2m/bridge/config",
            transformationPattern="JSONPATH:$.permit_join∩MAP:switch2online.map",
            commandTopic="z2m/bridge/config/permit_join",
            transformationPatternOut="MAP:switch2online.map",
            off="false",
            on="true"
        ]
        Type number : logLevel "Log level" [
            stateTopic = "z2m/bridge/config",
            transformationPattern="JSONPATH:$.log_level∩MAP:num2loglevel.map",
            commandTopic="z2m/bridge/config/log_level",
            transformationPatternOut="MAP:num2loglevel.map"
        ]
        Type string : networkgra "network map graphviz" [
            statetopic = "z2m/bridge/networkmap/graphviz"
        ]  
    }

The other channels work fine.
I have a String item linked to the channel:

String zigbeeNetMapResult "z2m network map result" {channel="mqtt:topic:mqBroker:z2mBridge:networkgra"}

When I check it in paperUI all 4 channels have the filled dot in the middle and the console lists the link

zigbeeNetMapResult -> mqtt:topic:mqBroker:z2mBridge:networkmap:graphviz

So, I click my button, the command is sent, the bridge does the scan, I can see the result rolling in and the item does not change.

I was hoping to find my stupid mistake while writing this post but I still cannot see what I’m missing. The response seems valid, when I manually copy/paste it I get a nice network map. Is it caused by the unusual format of the result? The length of it? Am I too tired?

Thanks in advance for your input!

Possibly just a case problem? The others in your paste say stateTopic.

2 Likes

Thanks, you nailed it.