Hi there, i am trying to Setup my new Installation with mqtt2.4, till now i just used the old one with textual config and worked fine. I used map Transformation to transform 1 to on and 0 to off on the Incoming value and now i dont know how to do this in paper ui. is it even possible?
Always get the following error: Command '0' not supported by type 'OnOffValue': No enum constant org.eclipse.smarthome.core.library.types.OnOffType.0
I could setup by copying data from my old MQTT items for my sonoff TH03 sensor SI7021 for temperature but unfortunatelly not for humidity - Any Idea what i do miss, I tried the channel setting for text, number and percentage - all seems not working for humidity.
For the temperature is use “number”.
This is the non-working channel setting for the humidity
and this is the working setting for the temperature
Sorry, I don’t know how to use a mqtt monitor.
I just did copy the values from my old mqtt items and there humidity was working.
Same I did for the temperature and here it is working. Therefore I am a bit lost.
Yes, number I also tried first because number is working for temperature as well.
If both sensors are at the same sonoff device, the thing-name should be the same.
Sou are using the channel “mqtt:topic:TH03TEMP:TH03TEMP” for the temperature, that would suggest a thing-name of TH03TEMP, according the used stateTopic I would think the name is “TH03”. But since you do get temperature readings lets assume your channel is correct. The humidity sensor should be using the same thing-name.
I was creating 3 things for the TH03 and the sensor S7021 attached, one for the switch, one for the temperature and one for humidity. For each I was adding one channel.
Currently the switch and temperature are working.
You suggest to use the thing for temperature, and add a second channel for the humidity to that temperature thing, right?
i have read all this thread and i can not really understand which advantage has all this to mqtt1 if everything already configured in items and works?
Only UI with which i can easily add new devices or i can get some other plus points from it?
Vincent, am supporter of configuring things and items throught files and not UI. If something happend, i put the files to their places and everything works again in minutes. But with GUI as somthning happens you will have lot of problems.
I have really NO one problem from the time i installed mqtt1! It looks like that it is the stabiliest part of my intallation:slightly_smiling_face:
So why migrate to mqtt2?
automatic discovery of Things that follow the Homie or Home Assistant standard
chained transformations (e.g. perform a JSONPATH followed by a REGEX without needing Rules)
use of the retained flag in a more MQTT standard and expected way
is receiving updates and will continue to receive updates going forward, development has completely stopped with MQTT 1 and the MQTT 1 Action
MQTT 1 will no longer be supported at some point, perhaps as soon as OH 3 sometime next year
will eventually support Units of Measure
works better with REST API creates/managed Items (you cannot manage OH 1 binding Items any way except through .items files
you are guaranteed to get the syntax right every time and you don’t have to look anything up when creating the Thing.
The UIs as you see them in PaperUI is not how the UIs will exist in OH 3. They are undergoing a complete rewrite and from what I’ve see so far it’s going the be really good.
Already the number of people who can provide support on the MQTT 1 binding on this forum has grown small.
Simple transforms like mapping 1 to ON and 0 to OFF can be done right on the Thing without the need to create and use a transform.
I’m sure there are more but those are off the top of my head.
No, and in fact when you manage your stuff through the UI/REST API you are in an even better situation that with .items files.
If you are creating backups, you are already (or should already) be backing up the “mysterious” database where stuff created through the UI/REST API because you had better be backing up /var/lib/openhab2 too. If you are using òpenhab-cli backup` you are also backing up that folder as well.
The JSONDB (that “mysterious” database) is automatically backed up for you on every change and periodically. So if something goes wrong, you have an automatically created backup you can restore from. Unless you create a backup every time you save a .items file you can’t have that with text configs.
The JSONDB is not really that mysterious. It’s a text file, JSON formatted, and it has one entry for each element and it is pretty easy to read and, if necessary, edit by hand.
To reiterate Vincent’s posts, it’s a lot better and easier to migrate when you want to rather than when you have to. And there are benefits as mentioned above.
If you are of the "don’t touch it you’'ll break it"sort, than you won’t be making any updates or upgrades to your system anyway, so why ask the question in the first place? You’ll be staying on OH 2.3 or what every older version of OH you are currently running and just let it run. But if you need or want to update OH to get bug fixes or new features as OH continues to evolve, at some point you will not be able to continue to run the MQTT 1 binding any more.
In my experience, at least for the parts of the binding I’ve used, the MQTT 2 binding is now every bit as stable as the MQTT 1 binding. Only it works a lot more like it should now in how it treats the retained flag. And I have a lot more capability than I ever had in the MQTT 1 binding.