GPIO / MCP23017 contacts are NULL after reboot

Hi
When I start Openhab all my GPIO / MCP23017 contacts are NULL.
I understand that NULL is for output because we cannot determine what is real state of Switch
but for input we know exactly is it open or close (of course for z-wave device is different).
How can solve this problem? I can execute e.g sendCommand(RainSensor,OPEN) during startup but
I’m not sure what is real value of input.

Regards
Michal Szymanski
http://blog.szymanskich.net

Hello Michal,

did you solve your Problem? Do you have a running Installation with i2c IOs? And if so…do you experince Problems?

Best Regards
Andreas

I use MCP23017 in my system and it works without big problems. I’ve solved this problem using mapdb persistance binding, situation when you do not know at the begining value of contacts is not a blocker for me.

Michal Szymanski

Ok. Sounds good. Thank you.

One more thing, MCP23017 works well in OH 2.1 in 2.3 there is one problem Problem with new MCP23017 binding in Openhab 2.3

Michal

Thanks…i’ll have an eye on this case and since my installation is on testing purpose i have some time for try and error :slight_smile: one further question: what about the mcp23008? Do you know a way for implementing this device?

Kind regards
Andi

What version of OH do you have? In 2.3 there is a problem with MCP23017 binding but here you have workaround Problem with new MCP23017 binding in Openhab 2.3

I use this binding https://www.openhab.org/addons/bindings/mcp23017/#supported-things

Right now i think im running 2.2. (Last update maybe in April) My boards with mcp23017 chip work fine so far. I got a 32channel DO board with 2x mcp23017 and a 24channel DI board with 1x mcp23017 chip (16 DI) and 1x mcp23008(8 DI). My problem is that there is no binding for the mcp23008 chip because its adress register is slightly different…my mcp23017 boards work fine so no need for a update at this time. So as i said i need a binding for the 8port mcp23008 chip. There has been some effort within the Unipi Binding cause unipi uses same chip but i didnt get it to work. So maybe you or someone else got some experince regarding my “problem”. Thanks a lot.