I’m trying to write an OH2 binding with Eclipse Smart Home but ran into the problem that my channels are not updated after calling
updateState(new ChannelUID(getThing().getUID(), CHANNEL_TEMPERATURE), new DecimalType(new BigDecimal(temperature++)));
I “think” I copied the yahooweatherbinding (YWB) code to create a simple channel with fake temperature data. Perhaps I made a mistake copying, but I cannot find it.
I did notice however differences in the log:
- For YWB, handleCommand is called with command RefreshType during the startup phase. For my code, handleCommand is never called.
- For YWB, there are ItemStateEvent and ItemStateChangedEvent in the log as a result of updateState; for my code these do not appear when I call updateState.
The channel declarations in thing_types.xml are the same. And at least I can read parameters specified in demo.things.
Am I missing something “obvious” that produces this result? Other suggestions how I could get a simple YWB like binding to work (e.g. periodically update a number) as a starting point?
Many thanks!