REST API stopped working (OpenHAB 1.0)


I have been using OpenHAB to control my 3D printer power from OctoPrint. I am using the following command:

curl --header 'Content-Type: text/plain' --data ON http://openhab.local:8080/rest/items/Magrathea_OnOff

It was working perfectly until yesterday, when it suddenly stopped working. I have made no updates to OpenHAB or to its configuration. Running the command manually gives me a 404:

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 404 ProxyServlet: /rest/items/Magrathea_OnOff</title>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /rest/items/Magrathea_OnOff. Reason:
<pre>    ProxyServlet: /rest/items/Magrathea_OnOff</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/>                                            

I have checked the items file:

Switch Magrathea_OnOff "Magrathea On/Off" (Study,Plugs) { zwave="2:command=switch_binary"}

If I go through the OpenHAB web interface, it works fine.

Any ideas?


The item probably had to be destroyed to make way for a new hyperspace bypas?
scnr… :slight_smile:

Hehehehe… Good one.

I restarted OpenHAB and it started working, perhaps OpenHAB was under the effect of a Pan Galactic Gargle Blaster?