2.5.0.1 update - REST issue

openHab on a raspi 3b+ here, I did the upgrade to 2.5.0.1 via apt-get and I failed to uninstall the REST before doing the upgrade. My bad.

addons.cfg has no entry for REST
paer-ui has no entry for REST uninstall, there is an entry for Install in the User Interface tab but it fails when clicked (circling the icon endlessly)

in the console bundle:list shows me a number of REST-related entries, all listed as active. But the openhab.log is flooded with lines like:
[rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/sensor_lux_2' for the unknown item 'sensor_lux_2'.

I tried a remove/install which did not resolve the situation. I hesitate to do a --purge, hoping there is a way to fix the situation through the console.
But I do not know, how. Thanks in advance for any input

Check addons.config too.

For using the console and all the commands see the link below. To access the console type sudo openhab-cli console

The error you are seeing isnā€™t that thereā€™s anything wrong with the rest api, itā€™s that the Item ā€˜sensor_lux_2ā€™ doesnā€™t exist. The error actually confirms that a http request is received, but there is no Item to forward the command to.

The OP did not say what version they upgraded FROM so I assumed 2.4 and the REST docs changed location.

Try restarting OH. Sometimes things get loaded in a strange order.

thanks!, that file had escaped me before . ā€œrestdocsā€ was sitting there in the misc= line and I removed it, restarted openhab2.service and tried paperui for installing the addon again.
The icon still circles but: in addons.config an entry for restdocs was added in the ui line
ui="basic,paper,habpanel,restdocs"
and the log has none of the messages any more.
A further restart of openhab2.service lists the Rest Documentation as not installed though.
So it seems to be in a half-installed state now, as it is working but not shown as such in the paperui.

You mean it does not show as installed here?

1 Like

thanks but that is not my issue. Item ā€˜sensor_lux_2ā€™ was one of countless items mentioned in the logs and all those items exist and worked nicely before the upgrade (from 2.4 stable to 2.5.01 stable).

If you are using text files, try making a change (add a space?) to the file and saving it to trigger a reload.

exactly.
It is circling still after 2 stop/restart cycles and an hour of waiting.

clear browser cache?
close & reopen PaperUI tab?
Otherwise, I do not know.

thanks for your pointer to the /var/lib/openhab2/config/org/openhab/addons.config - this was the bit I was missing and edits here brought things in motion.
After a while a new entry appeared in bundle:list, there was
openHAB UI :: Bundles :: openHAB REST API Documentation
Iā€™ve had a number of confusing out-of-sync states between paperui, bundle:list and the REST API in the browser but now things look as expected.
What seems to have made the trick was installing another ā€˜miscā€™ addon through paperui which appeared in the addons.config with a leading comma, ",hueemulation".
Like the footstep of a ghost.
I deleted that comma, saved the .config and unistalled hueemulation again and that apparently fixed things.

2 Likes

:wink: