Hello,
I have a board with 2x MCP23017. In terms of hardware, the physical outputs are not very organized.
MCP23017 is already in the core.
Is there a way to remap it so that the pin numbers fit in the http command?
e.g
/control?cmd=MCPGPIO,1,0
to make GIPO 15
I don't mind that I will have to create a device or rules for each pin.
I have ESP32 or I have 32 devices.
I searched the forum but couldn't find it.
Thank you
MCP23017 pin remap
Moderators: grovkillen, Stuntteam, TD-er
Re: MCP23017 pin remap
Not sure I do understand what you're asking.
The mcp (and pcf) pins enumerate based on the set I2C address of the expander
See: https://espeasy.readthedocs.io/en/lates ... al-mcpgpio
If you need to simply have 'numbers' or 'labels' based on their purpose, instead of these non-informative numbers, you can transform it in rules.
To set the pin to "1", you simply send an event like this:
The mcp (and pcf) pins enumerate based on the set I2C address of the expander
See: https://espeasy.readthedocs.io/en/lates ... al-mcpgpio
If you need to simply have 'numbers' or 'labels' based on their purpose, instead of these non-informative numbers, you can transform it in rules.
Code: Select all
on switchBackDoorLight do
// Pin 123 is the light at the backdoor
mcpgpio,123,%eventvalue1%
endon
Code: Select all
event,switchBackDoorLight=1
Who is online
Users browsing this forum: Google [Bot] and 1 guest