PIR in OpenHAB

I’ve been out the OpenHAB game for a while and I’ve recently dived back in but getting stumped by Motion/PIR.

I have an SR501 set up on an ESPEasy NodeMCu and that is outputting to MQTT fine and I can see it in MQTTbox but when I try put it as an item and in the sitemap it does nothing.

Contact Office_PIR		"Office Motion"		<motion>		(Office, gMotion)		["Motion"]		{mqtt="<[broker:catcatcher/PIR/motion:state:default]"}
Switch item=Office_PIR label="Office"

I’ve done some research on here but can’t seem to figure out what I’m doing wrong. Probably something really simple that I have overlooked!


Try this

Contact Office_PIR "Office Motion [%s]" <motion> (Office, gMotion) ["Motion"] {mqtt="<[broker:catcatcher/PIR/motion:state:default]"}
Text item=Office_PIR

Just getting a ’ - ’ in my sitemap.

It gives a 1 for motion and 0 a zero for none output to the MQTT topic if that is any help at all.

Do you see the state of item Office_PIR being updated in events.log?