Once flashed all you need is an external 5V power supply and you can stick them anywhere.I was hoping for a pathway to support rotary encoders at the same time as buttons and i2c sensors.Successfully merging a pull request may close this issue.Are there any such port expanders that are standardized/common enough to bother Are they cheaper than just getting an ESP-8266 and hooking up all the This is visualized in the circuit diagram below but it's important to note that the MCP23017 actually differentiates between PORTA (being A0 to A7) and PORTB (being B0 to B7) - The MCP230xx driver combines the two ports in sequence to translate to pins represented as D0 through D15 for the MCP23017.The chip can be connected quite easily, especially if you can source the DIP version of the chip. the resulting code be? We are running tight on both storage and RAM. I2C devices~ Tasmota supports several I2C devices but to use them they mostly need to be enabled at compile time to solve possible address conflicts.

(data + clock) Adafruit Industries, Unique & fun DIY electronics and kits MCP23017 - i2c 16 input/output port expander ID: 732 - Add another 16 pins to your microcontroller using a MCP23017 port expander. For example, if pin 0 was enabled for OUTPUT the following additional telemetry message will be sent by MQTT at the same time as the normal telemetry interval occurs which reports the current states of pins.Note the MCP230XX telemetry which provides the current logic state of all the pins and then the second MQT telemetry as MCP230_OUT which indicates the current state of pins configured for OUTPUT - In this case pin 4 or D4Remember to adhere to the current limitations of OUTPUT pins when using the device for switching external devices such as LED's - Relay's will need additional circuitry as the MCP23008/MCP23017 cannot drive relays directly - That being said most readily available relay pc boards available from vendors are optically isolated from the input so these will work perfectly.#define USE_MCP230xx // Enable INPUT mode (pinmode 1 through 4)#define USE_MCP230xx_OUTPUT // Enable OUTPUT mode (pinmode 5)#define USE_MCP230xx_DISPLAYOUTPUT // Display state of OUTPUT pins on main Tasmota web interfacetele/tasmota/SENSOR = {"Time":"2018-08-18T16:13:47","MCP230XX": "D0":0,"D1":0,"D2":1,"D3":0,"D4":0,"D5":0,"D6":0,"D7":1}}rule on event#MCPINT_D0=1 do power on endon on event#MCPINT_D0=0 do power off endonsensor29 intpri,10 // interrupt polled every 10*50 milliseconds, approximatedsensor29 intdef,pin // Will provide current setting of pinsensor29 intdef,pin,x // Will set new deffer value to x (0-15)sensor29 intdef,pin,5 // Will only report interrupt when it occurs 5 timessensor29 intdef,pin,10 // Will only report interrupt when it has occured 10 timessensor29 inttimer // Will provide the current amount of seconds for timersensor29 inttimer,x // Allows setting number of seconds (x) for timer intervalsensor29 intcnt,pin // Readback current setting of interrupt counting for pin (0=OFF/1=ON)sensor29 intcnt,pin,x // Enable/Disable interrupt counting for pin (x=0=OFF,x=1=ON)sensor29 inttimer,60 // Enable interrupt timer for 60 second intervalsensor29 intcnt,0,1 // Enable interrupt counter for pin D0{"Time":"2018-12-06T23:59:26","MCP_INTRETAIN": {"D0":1,"D1":0,"D2":1,"D3":1,"D4":0,"Value":13}}sensor29 intretain,pin // Readback current setting of interrupt retain for a pin (0=OFF/1=ON)sensor29 intretain,pin,x // Enable/Disable interrupt counting for pin (x=0=OFF,x=1=ON)sensor29 0,5,0 // Configure pin 0 as OUTPUT and default to OFF on reset/power-upsensor29 0,5,1 // Configure pin 0 as OUTPUT and default to ON on reset/power-upsensor29 0,6,0 // Configure pin 0 as INVERTED OUTPUT and default to ON on reset/power-upsensor29 0,6,1 // Configure pin 0 as INVERTED OUTPUT and default to OFF on reset/power-upsensor29 0,ON // Turn pin ON (HIGH if pinmode 5 or LOW if pinmode 6(inverted))sensor29 0,OFF // Turn pin OFF (LOW if pinmode 5 or HIGH if pinmode 6(inverted))sensor29 0,T // Toggle the current state of pin from ON to OFF, or OFF to ON