luebbe / homie-node-collection

Collection of Node implementations for the Homie-ESP8266 library
MIT License
26 stars 12 forks source link

Add support for timeout in RelayNode and make easier to use classes with a i2c PortExpander #5

Closed ivanfmartinez closed 4 years ago

ivanfmartinez commented 5 years ago

add support for timeout in RelayNodes

refactor Relay and Contact Nodes, separing the physical pin access and make possible to use extend this classes to use with i2c portexpanders.

kleini commented 5 years ago

Do you have an example, how to use it with I²C port expanders?

ivanfmartinez commented 5 years ago

Here are the example : https://github.com/ivanfmartinez/PortExpander_I2C_Nodes

It was tested with this board (made by an Brazilian company) : https://www.afeletronica.com.br/pd-4d1faf-esp-8266-modulo-afsmart-7-reles.html?ct=1d09d1&p=1&s=1

kleini commented 5 years ago

@ivanfmartinez Nice board and example! Where does the PortExpander_I2C.h come from?

ivanfmartinez commented 5 years ago

I got from the board manufacturer but I have checked and its the same from this article : http://blog.iharder.net/2014/08/08/msp430-or-arduino-library-for-pcf8574-i2c-port-expander/

luebbe commented 5 years ago

Very nice! I'll merge it, when I'm back home in a week.

luebbe commented 4 years ago

Could you please resolve the conflicts and update the PR?

ivanfmartinez commented 4 years ago

I have merged all my changes in a single PR #7

luebbe commented 4 years ago

Merged updated PR #7 instead