Item reverts back to UNDEF

I have recently moved from OH2 to OH3 and my previous created HTTP Binding Item stopped working.
I decided to change it into a HTTP Binding Thing.
I got it almost working but have a problem.
The light is switched on but almost immediately it is set to UNDEF and the light switch off.
Have I done anything wrong in my definition?

Previous Item

Dimmer TaklistStudio "Taklist Studio [%d %%]" <slider> (AllLights) { http=">[*:GET:http://192.168.1.133/brightness?level=%2$s]"}

Current Thing with problem

Thing http:url:TaklistStudio "TaklistStudio" [ 
	baseURL="http://192.168.1.133/brightness"] {
		Channels:
			Type dimmer : text "Brightness" [commandExtension="?level=%2$s",mode="WRITEONLY"] 
}

This is the log

2021-04-16 09:27:14.552 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'TaklistStudio_Brightness' received command 7
2021-04-16 09:27:14.554 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'TaklistStudio_Brightness' predicted to become 7
2021-04-16 09:27:14.561 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TaklistStudio_Brightness' changed from UNDEF to 7
2021-04-16 09:27:32.700 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'TaklistStudio_Brightness' changed from 7 to UNDEF

I would say the HTTP binding channel is not honouring the write-only designation, and is posting UNDEF to overwrite autoupdate’s prediction efforts.

Have you restarted the binding since the last time you edited the Thing? File edits are not always cleanly picked up by bindings.

I think the restart did it.
The WRITEONLY was added recently. All other changes seemed to be reloaded correctly but the “mode” change did not.

1 Like