OH3 MQTT Config Error - Channel disappeared

  • Platform information:
    • Hardware: CPUArchitecture/RAM/storage Pi 4B
    • OS: what OS is used and which version
    • Java Runtime Environment: which java platform is used and what version
    • openHAB version: OH3 M4
  • Issue of the topic: please be detailed explaining your issue

I have a Sonoff TH16 with Tasmota. Was able to successfully connect and control the device via openhab using MQTT. I was also able Temp, Humidity DewPoint were reading correctly.
I was trying to change the format of the DewPoint output so that it displayed degrees C.
I opened the Sonoff Item and edited the code for the channel. (made a mistake here changed the “channelTypeUID: mqtt:string” to “channelTypeUID: mqtt:Number:Temperature”)

After Saving I now get this error


Remove and recreate: mqtt:topic:MQTTBroker:Sonoff_Main_Bedroom:DewPoint

So this seems pretty simple to correct I could just change my edit back but the channel has disappeared.
The DewPoint channel no longer appears under the Sonoff.
The code for the DewPoint channel does not appear which clicking on the code tab.

All other channels for the Sonoff are fine and still display.

I have tried to edit the Json files under userdata.
still get the same error.

An item is linked to a channel of a thing, only things have channels! Changing the name of the linked channel on an item should have no effect on the actual thing.
So what did you change/delete/recreate where?
What channels does the thing have now? Which items are linked to those channels?

ok I used the word item incorrectly.

I have a Sonoff thing with channels (MQTT topics)

All were working fine until I edited the Sonoff thing code via the UI


- id: Dewpoint
    channelTypeUID: mqtt:string
    label: Dewpoint
    description: null
      stateTopic: tele/Sonoff_Main_Bedroom/SENSOR
      transformationPattern: JSONPATH:$.SI7021.Dewpoint


- id: Dewpoint
    channelTypeUID: mqtt:Number:Temperature
    label: Dewpoint
    description: null
      stateTopic: tele/Sonoff_Main_Bedroom/SENSOR
      transformationPattern: JSONPATH:$.SI7021.Dewpoint

Since then I get the above error. The error makes sense, removing the MQTT topic / channel and recreating it sounds like it would fix the problem.
The only issue is that this channel does not show up in the UI anymore so I cannot remove or recreate or edit it via UI.

This doesn’t help with your issue, but you cannot change channelTypeUID in the YAML. Well, I mean, you can, but it’s not supported in the back end. I think the only way to change the Channel type is to make a new one.

1 Like

In order to get the temperature displayed using the “C” I use a plain number-channel and for a the number-item a State Description Pattern of %.1f °C

yeah clearly I changed the wrong thing :slight_smile:
but now how do I fix this error?

I tried to create a new channel by updating the code hoping that it would overwrite the exiting code and clear the error.
This did not work.

You cant change the channelTypeUID: after it has been created.

Create a new thing with the channels you want

Yes removed and recreated the thing.
It left a few orphaned links had to remove those using the console.

1 Like