So I am using JCDB persistance table and the problem is that it name the tables something like binarysensor_0001 instead of the lables I gave each device.
so now I am confused which device is which. is there a way to name those tables based on the labels I gave them?
No I don’t have simple mode turned on. never tried. also I normally don’t use PaperUi anyway.
however even if I do, there is an option to give the “thing” a lable and would like to use that to name the tables.
You can not use both files and PaperUI for the same Thing and you should have seen an error msg when trying to edit a thing in PaperUI after having created it via files.
which file? can you give me the path
I use the Command-line and the rest API to add things.
also all I want is to heave JCDB name the tables as the “lable” instead of the “device name”
/etc/openhab2/things but if you didn’t know that I wouldn’t think you have the Thing created via files.
Not sure what OS your running OH on but you can also check in /var/lib/openhab2/jsondb/org.eclipse.smarthome.core.items.Item.json for items and same for things. If you edit any of these files stop OH first.
From the documentation:
“openHAB persists Item states in a database, and most popular databases are supported.”
You will need to use the items name for persists and not the Thing or Thing label. If the issue is each item has an odd name then you can create the item in files and give it whatever name you choose. The location for item files is /etc/openhab2/items You will need to unlink the item via PaperUI then copy the channel syntax to use in item file. BTW, using item files is recommended by most users as you can give meaningful names to your items.
As you said yourself, you used REST API to create your objects. Same way PaperUI does it, and there won’t be any xxx.items files.
Persistence is about Items, not Things. If you are persisting in tables like sensorid1_binarysensor_0001 then that is because you chose to name your Item sensorid1_binarysensor_0001
You can’t use labels for persistence, it works with Item names.