Rule for deleting and rediscovering Things

The rule will create log entries. Which ones appear in your log file? That will tell us at what point in the rule the errors occurred.

No one. The rule crashes right before the first log entry

Then you have something really messed upā€¦ or you do not have the logging level set so that you can see them. Why donā€™t you try changing all of the logDebug to logInfo and see if you get anything. Or, set the logging level to DEBUG for org.eclipse.smarthome.model.script, or something higher up the namespace.

Hereā€™s something else to help troubleshoot. Try putting this into your browser, but replace local host your OH server. It should return all of your Things. If you get the same error, something is going wrong while communicating with your REST API.

http://localhost:8080/rest/things\

One more thingā€¦ a quick search in the forum shows that this is a common errorā€¦
https://community.openhab.org/search?q=MappableException%3A%20org.eclipse.jetty.io.EofException

REST API is fine. Iā€™l chaeck the other thing out later. Meanwhile deleted and added all my zwave things manually