Also, I use mqtt.fx to simulate the broker (?) with the below settings and user name and password but when I subscribe, it can see the sonoff device I have (with tasmota) but can’t send commands:
Yes, such created Broker Thing should be visible on PaperUI, as any other Thing created by file, however you can’t CHANGE then via PaperUI.
The screenshot doesn’t show the end of the file, I’m missing the closing ].
A restart was needed also, log is running in a new tab with OpenHab, I’ve created the things and it went online then decided that the best was create the Items using the Rest API from VS Code by automatically generating the items ( I can develop this if anyone needed)
@kriznik Ideally its the right thing to do but when I tried to split it I received the following in the log:
2019-09-14 08:38:36.930 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model ‘Sonoff.things’
2019-09-14 08:38:37.019 [WARN ] [.thing.internal.GenericThingProvider] - Thing topic does not have a bridge so it needs to be defined in full notation like :topic:sonoff_Mini
in the separate thing files I have:
Thing topic sonoff_test “Sonoff_test” @ “Living_Room”
{
Channels:
Type string : reachable “Reachable” [ stateTopic=“tele/sonoff_test/LWT” ]
Type switch : power “Power” [ stateTopic=“stat/sonoff_test/POWER”, commandTopic=“cmnd/sonoff_test/POWER” ]
}
Thing topic sonoff_Mini “Sonoff_Mini” @ “Living_Room”
{
Channels:
Type string : reachable “Reachable1” [ stateTopic=“tele/sonoff_Mini/LWT” ]
Type switch : power “Power1” [ stateTopic=“stat/sonoff_Mini/POWER”, commandTopic=“cmnd/sonoff_Mini/POWER” ]
}
I tried also:
Thing mqtt:broker:home:topic:sonoff_Mini etc. and I got the following:
==> /var/log/openhab2/events.log <==
2019-09-14 08:38:37.921 [hingStatusInfoChangedEvent] - ‘mqtt:broker:home:topic:sonoff_test’ changed from UNINITIALIZED to UNINITIALIZED (HANDLER_CONFIGURATION_PENDING)
Maybe as syntex with the definition outside the main MQTT thing file?
Your syntax of the mqtt-things file is wrong. When seperating the broker from the other things they need a way to know which bridge (broker) to use. @kriznik posted a link above where he showed how to do that.
Did you try the syntax for separated files as posted by @kriznik early in this thread?
If yes, what did the logs show?
Anyhow, we all can’t keep track what your actual settings are. Without you posting the contents of your actual .things files (only the formatted contents, not screenshots!!) we are unable to give usefull guidance!