willhey / mcp23017chip

Node-red mcp23017chip
MIT License
6 stars 7 forks source link

Missing Interrupt #6

Closed falke1987 closed 5 years ago

falke1987 commented 5 years ago

Hello willhey,

i has already implemented the mcp23ß17chip in my project an it works very good. But i want to ask you about the future development and the ToDo topics. Something planed from your side to add the Interruptfunction?

I want to wire this signal from the MCP to a gpio pin of the raspberrypi.

Thank you very much in andvance.

willhey commented 5 years ago

Hi, this project is dormant at the moment. I'm using this code on many Raspberry Pis (including 1 with 3 MCP23017s) and it uses very little processor to keep polling at a respectable interval. So did not see the need to implement interrupt

falke1987 commented 5 years ago

Hello willhey,

i am using the code for my smarthome and it is working well. My Hardware is https://www.gedad.de/2018/08/31/%C3%BCberarbeitung-16-in-out-module/. In the past i used the Fhemserver for the same function but i think you can understand the bad usability of the fhem and so on... Node Red is a very great easy option to cover the same function.

In the Fhem I worked with interrupts function of the MCP. This output is wired to an interrupt GPIO of the Raspberry Pi. Thus, a signal changes asap can be detected. After switching from FHEM to Node Red, I found that this is a delay, depend on the polling. In my SmartHome this informations will be forwarded to the main controller Loxone. Here I also in use the functionality of a multi-click. Unfortunately, this does not work anymore due to the timing, because the times between the clicks would be too big.

I hope I could show you why I would like to have this functionality. But I would like to thank you for the work already done.

Your node is great :-)

willhey commented 5 years ago

Hi

Have you experimented with the interval on the chip setup (where the address is entered). The default is 100ms, you could try a lower number and poll more frequently.

At present I have no plans to develop this module as I have started using ESP8266 and sonoffs for new projects

Mike

falke1987 commented 5 years ago

Hi last week i added 2 more mcps on the I2c Bus. And since this time i feel the input is mich slower. Is it a Timing probleme depend on the polling of each mcp?

willhey commented 5 years ago

Each chip has a default 100ms repeating timer, so it is possible that the additional chips have overloaded the processor. Have you checked the processor load. It could also be the I2C bus is overloaded. You can change the 100ms in the chip setup where the address is - try 200ms

falke1987 commented 5 years ago

sorry for my late response. I checked the processor load and the i2c bus but everything is working fine :-( i know its slower as my previouse setting with fhem (https://github.com/mhop/fhem-mirror/blob/master/fhem/FHEM/52_I2C_MCP23017.pm) and the interrupt by an gpio of the rasp but the click by polling is very slow...