Some items not being published to MQTT

Hi there. I have a small z-wave system with 4 sensors. I have mosquito installed and openhab is publishing state changes to mosquito and I am ‘seeing’ those in MQTT-SPY. So far so good. I have created some dummy items and the state of these items is contained in any call to my openhab server using the /rest/items call. I can also update the state of these items by using Chrome Advanced Rest Client to POST an updated state and the change of state is reflected in another poll of /rest/items. What I am not seeing is these changes being published to MQTT. Now, avoiding why I am messing around with dummy items for now, is there any reason why openhab has accepted the existence of the items via the REST API (both read and update) but is not publishing the changes that its REST API is implementing to MQTT?
Thanks

What do your MQTT items look like? It is very easy to get the MQTT binding wrong. One common problem is using “>” for outgoing messages when you intend “<” for incoming messages.

Hi Rich - thanks for taking the time to reply

That’s the bit I find confusing, I’m using the same config for all items (below), which is why I don’t understand why some items are published and not others

mqtt:localmqtt.url=tcp://localhost:1883
mqtt-eventbus:broker=localmqtt
mqtt-eventbus:statePublishTopic=openHAB/out/${item}/state

I know that all of the channels are working because I can publish a spoofed output from MQTT-SPY and see it in same.
Some items are published from openhab and others not. It’s almost like openhab was doing some form of validation for mqtt which it doesn’t do for REST

OK, it wasn’t clear you were using eventbus configs.

I’m not as familiar with how this stuff works, but I wonder if you need to also configure commandPublishTopic. I would have expected statePublishTopic to pick up everything but maybe it only picks up state changes that don’t occur through a command. I’m just guessing though.

It’s a thought. I’ll have a play and see if anything reveals itself.
Cheers

Hey Rich - good spot. The change of state is published on the command topic
not the state topic (even though the state is changed by the command so I
might have expected both).
Anyway, I can now do what I want.
Thanks for your input.