hello there
Lastly, I was trying to get running an IO expander MCP23017 connected on a ESP8266 (via I2C) and running firmata. All seem's ok except there is no READINGS appearing in LIST :
Internals:
CFGFN
DEF 0x20
FUUID 5f3c2a18-f33f-d74b-23f1-9f0e7116fc54af16
I2C_Address 32
IODev myFirmataESP8266
NAME myMcp23017
NR 134
STATE Initialized
TYPE I2C_MCP23017
Attributes:
IODev myFirmataESP8266
Interrupt B0,B1,B2,B3,B4,B5,B6,B7
InterruptOut separate_active-low
OutputPorts A7
Pullup B0,B1,B2,B3,B4,B5,B6,B7
event-on-change-reading PortB0,PortB1,PortB2,PortB3,PortB4,PortB5,PortB6,PortB7
invert_input B0,B1,B2,B3,B4,B5,B6,B7
room Firmata
I can however activate some output, I've tried A7 for exemple and it works.
I've dedicated a pin on the ESP for interrupt handling :
Internals:
DEF 16
FUUID 5f3c2069-f33f-d74b-0969-b647d6189dee6e51
IODev myFirmataESP8266
NAME esp8266_gpio16
NR 121
PIN 16
STATE off
TYPE FRM_IN
READINGS:
2020-08-18 21:38:43 reading off
2020-08-18 22:05:08 state Initialized
Attributes:
IODev myFirmataESP8266
activeLow yes
comment gpio affectée a recevoir les interruptions du IO expander
internal-pullup off
room Firmata
stateFormat reading
userReadings test {fhem "get myMcp23017"}
The esp pin affected to interrupt is triggered as it should when I push a button on the mcp, no problem here
I've made the same setup on a raspi except I've used RPII2C type instead of FRM type, and it works as expected, I see all Port(s) in READINGS
Internals:
CHANGED
DEF 0x20
FUUID 581b7175-f33f-d74b-34ac-49cbc1815e7bf979
I2C_Address 32
IODev myRaspiI2C
NAME myMcp23017
NR 136
STATE transmission error
TYPE I2C_MCP23017
myRaspiI2C_SENDSTAT regerror
READINGS:
2020-08-17 22:45:36 PortA0 off
2020-08-17 22:45:37 PortA1 off
2020-08-17 22:45:37 PortA2 off
2020-08-17 22:45:37 PortA3 off
2020-08-17 22:45:37 PortA4 off
2020-08-17 22:45:37 PortA5 off
2020-08-17 22:45:37 PortA6 off
2020-08-17 23:36:05 PortA7 off
2020-08-17 23:36:05 PortB0 off
2020-08-17 00:15:27 PortB1 off
2020-08-17 22:13:46 PortB2 off
2020-08-17 00:15:27 PortB3 off
2020-08-17 00:15:27 PortB4 off
2020-08-17 00:15:27 PortB5 off
2020-08-17 23:29:59 PortB6 off
2020-08-17 00:15:27 PortB7 off
2020-08-18 22:42:13 state transmission error
Attributes:
IODev myRaspiI2C
Interrupt B0,B1,B2,B3,B4,B5,B6,B7
InterruptOut separate_active-low
OutputPorts A0,A7
Pullup B0,B1,B2,B3,B4,B5,B6,B7
event-on-change-reading PortB0,PortB1,PortB2,PortB3,PortB4,PortB5,PortB6,PortB7
invert_input B0,B1,B2,B3,B4,B5,B6,B7
room I2C direct connect
https://i.postimg.cc/KvRVwg28/IMG-20200818-225630.jpg (https://i.postimg.cc/KvRVwg28/IMG-20200818-225630.jpg)
Do you know what's wrong ?? why is there no input ports ?
I respond to myself but it can serve others...
I've simply forgotten the attribute i2c-config :
attr myFirmataESP8266 i2c-config 1
after that, all ports appeared as expected.