Smart Home Automation Forum
Homespan Example - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=20)
+--- Forum: KC868-A8S (https://www.kincony.com/forum/forumdisplay.php?fid=24)
+--- Thread: Homespan Example (/showthread.php?tid=3223)



Homespan Example - rubensx - 09-01-2023

Hi I'm new here and need some help

I'm bought the KC868-A8S board version 1.2 from kincony aliexpress official seller, I'm a crestron/savant and lutron programmer but I'm trying to new prog adventures and found kincony and it's awesome!

I'm create a basic automation in arduino code to my esp32 later with 8 inouts and 8 relays, and my homespan code maybe can fit here, but I can't found a realiton of input ports from esp32 to hardwired outs to adapt my software

If you have a homespan working software to this board I'll aprecciate that!!

thank you in advance!


RE: Homespan Example - admin - 09-02-2023

you can modify homespan arduino code, A8S need to use PCF8574 i2c chip extend OUTPUT and INPUT ports.
here is our homespan source code for KC868-H32B Pro controller.

.zip   ESP32-HOMESPAN.zip (Size: 6.98 MB / Downloads: 231)


RE: Homespan Example - rubensx - 09-02-2023

(09-02-2023, 01:27 AM)admin Wrote: you can modify homespan arduino code, A8S need to use PCF8574 i2c chip extend OUTPUT and INPUT ports.
here is our homespan source code for KC868-H32B Pro controller.

Thank you Admin! I'm using a PCF8574 library but I see in your code a KC868.h library... where I get this? It will work in A8S?

My code running great with all 8 relays but I need to put the inputs, a library with access directly these outputs and imputs maybe a great deal!


RE: Homespan Example - rubensx - 09-03-2023

ok I figured out what is wrong!

I'm in this thread:
https://github.com/HomeSpan/HomeSpan/discussions/394#discussioncomment-6893848

And using Homespan I put the relays to work addressing the P0 to P7 from PCF8574_RE directly to DEV_LED.h and solve the outputs, but the inputs are my problem! In PCF8574_IN1 the switches cant fit to SpanButton states easly I can't use the example 16 Statless Programmable Switch to sense the inputs.

maybe we need to create a library to PCF8574 inputs asswitches to homespan.

I've created later a other homekit test without the Homespan, but I don't a great programmer to solve a C++ to put PCF8574.h inside. now I've get homespan with realys, and not inputs and without a homespan I get inputs and not relays (I'm sad...)


RE: Homespan Example - admin - 09-03-2023

yes, that link is we posted to homespan github. i think you can modify as OUTPUT, just PCF8574 with INPUT ports, you can also post your question to homespan github, they feedback is fast.


RE: Homespan Example - admin - 09-03-2023

this is our Homespan arduino source code for "RealPushButtons". it use by PCF8574 i2c chip for extend GPIO input ports.

.zip   RealPushButtons.zip (Size: 624.43 KB / Downloads: 170)


RE: Homespan Example - rubensx - 09-04-2023

(09-03-2023, 12:40 PM)admin Wrote: this is our Homespan arduino source code for "RealPushButtons". it use by PCF8574 i2c chip for extend GPIO input ports.
doesn't work the homespan library need a PIN (I guess a not i2c pin) to work