Read Modbus values and make them visible - failed

No changes after create a new item file in these destination…

You need to be more specific…
What does your log show when you saved the item file?

1 Like

log doesnt show any changes for the items.

Then you havn´t saved your file correctly.
What is the name of the file (prefix and suffix) ?

1 Like

the name is “test.item” in folder “items”.

It need to be named: .items
(notice the s ).

And keep an eye on your logfile (tail log).

1 Like

what a stupid fault of me…

now it’s working.

I have create all 100 items over the paper ui. So there are no .items files. I don’t want to delete everything in paper ui and create them again with command line.

Is there a way to divide all temperatures /100? So all the temperatures from my heating system has same ratio.

Where do they come from? Are they modbus derived as well? Is there some reason you wouldn’t use the same transform you already have working?

1 Like

Yes, all values i need to divide about 100 come from modbus.

The script to divide is ok, but i don’t want to delete all items from paper ui and create again in command line.

Or is there a way to use the transform at paper ui? There is a point at modbus data thing “Read Transform”. I look in documentation, but i don’t understand the right syntax for this.

Cant help on this, as I dont use PaperUI for this matter. But I would assume its somehow the same syntax.

1 Like

Now i remove all things and items in Paper UI and created two files.

First file is modbus.things in folder conf/things. modbus…things.txt (5.8 KB)
Second file is modbus.items in folder conf/things.modbus.items.txt (5.6 KB)

In conf/transform i create 4 files "divide1000.js, divide100.js, divide60.js,divide10.js).

No of these created items or things are visible in paper ui.

Where is the fault?

Dont see anything wrong in your things files, except its named modbus..things.txt
If thats really is the name, it will not work. The suffix has to be .things
Name it modbus.things

Again I have to ask - What does you log show?
If it shows nothing, (again), it´s most probably the file name, again!.

In general!!
Openhab will NOT read/use a file, unless it has a name (suffix) which openhab knows how to handle.
So in case you see nothing in the log, focus on the file name at first. Almost any file openhab knows how to handle will show somekind of respons in the logfile, when you save the same.

A .things file - tail log will show the things/channels beeing added or errors if any.
A .items file - tail log will show the items beeing added, or errors if any.
A .sitemap file - tail log will show either, its beeing loaded with succes, or it will show errors if any.
(it may take a few seconds for openhab to load a sitemap file, så please be patient).
A .rules file - tail log will show either, its beeing loaded with success, or it will show errors if any.
(it may take a few seconds for openhab to load a sitemap file, så please be patient).

I really cant stress this enough - Focus on the tail log all the time when dealing with manual files.
If nothings happens in the log when you save a file in its right folder - There is most certain an issue with the filename. Otherweise openhab will promt you with success or errors.

That’s the right parameter. You type in the box what you would type after the = for a parameter in a things file.

I renamed the file to upload it. I write that the filenames, these are correct.

So,you looked in your openhab.log and what did it say about your files?

1 Like

openhab.log (5.1 KB)

Here is the logfile.

I didn’t look at it all.
The first thing I see is
Configuration model ‘modbus.things’ has errors

Don’t you think that might be important? What are you going to do about it? It’s pointing at text “Soll” … do you think your syntax is wrong around there? What is different from other lines?

1 Like

I have it. There was spaces in the names. I remove spaces from .things file, now things are OK.

Now i do the same with .items file. I will report.

1 Like

I think you have two issue… The log actually tells you… [2,25] Line 2, colon 25 and [4,31] Line 4 colon 31.

The first I´m a bit unsure… But I have a feeling it doesnt like your Bridge poller naming 8197-8297. Perhaps try with another name, which makes a bit more sense, and without special caracters like “-”. Underscore should be fine though.

The second seem more obvious. I doubt you can have a spaces after the Thing data name. It will make is rather difficult for the items to be linked. Use underscore insted, like this:

Thing data Kesseltemperatur_Soll [ readStart="8199", readValueType="int16", readTransform="JS(divide10.js)" ]

Now the items loaded correctly.

Why th titles at all values are “Modbus Data”? Can we edit them?

Is it possible to have only one title over the values, and have all in the same frame?
How to link from other to “Multifire2”?