Problem with new MCP23017 binding in Openhab 2.3

Hi

I use influxdb for persistance, but after oh2 restart or rpi reboot mcp inputs dont work at all. If I togle input nothing is chnged in sitemap or habpanel no log entry either. as I wrote earlier after readding items (contacts) in items file inputs strat to work correclty.

As I wrote above from time to time I have problem with storing old value but I’ve notice that some time ago I’ve changed influxdb to mapdb for storing old values used when startup happen = restoreOnStartup. I do not remember exactly but I’ve read somewhere that is better to use mapdb for such restoreOnStartup

Example line:
MainWaterValve : strategy = everyChange, restoreOnStartup

Hello,

This issue still persist even in openhab 2.5 snapshot. There is no issue if Paper UI used.
Piece from the log:
[INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘mcp23107.items’
[INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘mcp23017.things’

Hello

I’ve ported this to MCP23008, works as expected under 2.4.0, it does not work for restoring output values on startup, I’ve removed all rule files just to exclude possibility that some rules are firing on events during startup and setting values:

2019-10-18 08:17:43.263 [hingStatusInfoChangedEvent] - 'mcp23017:mcp23017:relayboard1' changed from UNINITIALIZED to INITIALIZING                                                                   
2019-10-18 08:17:43.340 [hingStatusInfoChangedEvent] - 'mcp23017:mcp23017:relayboard1' changed from INITIALIZING to ONLINE
....
2019-10-18 08:17:46.833 [vent.ItemStateChangedEvent] - SW_HeatSource changed from NULL to ON                                                                                                      
2019-10-18 08:17:46.835 [vent.ItemStateChangedEvent] - SW_HeatSource_Manual changed from NULL to ON

I can see the items switched on on Paper UI, when I toggle them manualy to off and on again, the relay is switching, but it is not switched on persistence restore.

Does someone have working output values on restore please?

Not sure if this is a bug of this binding or of core ?

Thank you

Jan

Can I ask you to post sample of working mcp23017.things DSL syntaxe please? I do not like configuring things using Paper UI and had troubles with loading things file…

Thank you in advance

Jan

Below my definition of thing for OH 2.3, I use such binding:

Thing mcp23017:mcp23017:fe1937e0 “MCP23017_input” [address=21,bus=1] {
Type input_pin : input#A0 [pull_mode=“OFF”]
Type input_pin : input#A1 [pull_mode=“OFF”]
Type input_pin : input#A2 [pull_mode=“OFF”]
Type input_pin : input#A3 [pull_mode=“OFF”]
Type input_pin : input#A4 [pull_mode=“OFF”]
Type input_pin : input#A5 [pull_mode=“OFF”]
Type input_pin : input#A6 [pull_mode=“OFF”]
Type input_pin : input#A7 [pull_mode=“OFF”]
Type input_pin : input#A7 [pull_mode=“OFF”]
Type input_pin : input#B0 [pull_mode=“OFF”]
Type input_pin : input#B1 [pull_mode=“OFF”]
Type input_pin : input#B2 [pull_mode=“OFF”]
Type input_pin : input#B3 [pull_mode=“OFF”]
Type input_pin : input#B4 [pull_mode=“OFF”]
Type input_pin : input#B5 [pull_mode=“OFF”]
Type input_pin : input#B6 [pull_mode=“OFF”]
Type input_pin : input#B7 [pull_mode=“OFF”]
}

Thing mcp23017:mcp23017:60ca7aa8 “MCP23017_outpur” [address=20,bus=1] {
Type output_pin : output#A0 [default_state=“HIGH”]
Type output_pin : output#A1 [default_state=“HIGH”]
Type output_pin : output#A2 [default_state=“HIGH”]
Type output_pin : output#A3 [default_state=“HIGH”]
Type output_pin : output#A4 [default_state=“HIGH”]
Type output_pin : output#A5 [default_state=“HIGH”]
Type output_pin : output#A6 [default_state=“HIGH”]
Type output_pin : output#A7 [default_state=“HIGH”]
Type output_pin : output#B0 [default_state=“HIGH”]
Type output_pin : output#B1 [default_state=“HIGH”]
Type output_pin : output#B2 [default_state=“HIGH”]
Type output_pin : output#B3 [default_state=“HIGH”]
Type output_pin : output#B4 [default_state=“HIGH”]
Type output_pin : output#B5 [default_state=“HIGH”]
Type output_pin : output#B6 [default_state=“LOW”]
Type output_pin : output#B7 [default_state=“LOW”]
}