Lesson2 - How to use Arduino to control relay ON/OFF - admin - 06-19-2021
RE: Lesson2 - How to use Arduino to control relay ON/OFF - Patrick - 11-10-2021
Kc868-a8
adruino ide installed
ch340 usb serial driver for laptop pc
completed lesson1 config: https://www.kincony.com/forum/showthread.php?tid=281
lesson 2 and lesson 11. Can write sketch to esp32 no problems. no relay lights or clicking when reboot .
lesson 11 when watching serial monitor:
all commands can be seen passing through on lesson 11 from apple home app on iphone.
bad gateway when trying to connect from laptop to esp32 web ip address
(serial monitor) switch shows on and off when using example workingled sketch, but no relay activation or led lights on kc868-a8.
all communication shown in serial monitor , when using example monitorlogging sketch.
simple lesson 2 circuit not working, tested several times.
do I have to place https://www.kincony.com/forum/showthread.php?tid=282 pin #definitions somewhere within sketch file?
Status and Control LED pins are listed as undefined in Serial Monitor running lesson 11.
Help appreciated.
Quote:10:55:50.727 ->
10:55:50.727 -> ************************************************************
10:55:50.727 -> Welcome to HomeSpan!
10:55:50.727 -> Apple HomeKit for the Espressif ESP-32 WROOM and Arduino IDE
10:55:50.727 -> ************************************************************
10:55:50.727 ->
10:55:50.727 -> ** Please ensure serial monitor is set to transmit <newlines>
10:55:50.773 ->
10:55:50.773 -> Message Logs: Level 0
10:55:50.773 -> Status LED: Pin - *** WARNING: Status LED Pin is UNDEFINED
10:55:50.773 -> Device Control: Pin - *** WARNING: Device Control Pin is UNDEFINED
10:55:50.773 -> Sketch Version: n/a
10:55:50.773 -> HomeSpan Version: 1.4.1
10:55:50.773 -> Arduino-ESP Ver.: 1.0.6
10:55:50.773 -> ESP-IDF Version: 3.3.5
10:55:50.773 -> ESP32 Chip: ESP32-D0WDQ5 Rev 1 dual-core 4MB Flash
10:55:50.773 -> ESP32 Board: nodemcu-32s
10:55:50.773 -> PWM Resources: 16 channels, 8 timers, max 20-bit duty resolution
10:55:50.773 -> Sodium Version: 1.0.12-idf Lib 9.4
10:55:50.773 -> MbedTLS Version: mbed TLS 2.16.7
10:55:50.773 -> Sketch Compiled: Nov 10 2021 10:55:10
10:55:50.820 ->
10:55:50.820 -> Device Name: HomeSpan LEDs
10:55:50.820 ->
10:55:50.820 ->
10:55:50.820 -> *** HomeSpan Info ***
10:55:50.820 ->
10:55:50.820 -> ➤ Accessory: AID=1
10:55:50.820 -> ➟ Service AccessoryInformation: IID=1, UUID="3E"
10:55:50.820 -> ⇨ Characteristic Name("LED #1"): IID=2, UUID="23"
10:55:50.820 -> ⇨ Characteristic Manufacturer("HomeSpan"): IID=3, UUID="20"
10:55:50.820 -> ⇨ Characteristic SerialNumber("123-ABC"): IID=4, UUID="30"
10:55:50.820 -> ⇨ Characteristic Model("20mA LED"): IID=5, UUID="21"
10:55:50.820 -> ⇨ Characteristic FirmwareRevision("0.9"): IID=6, UUID="52"
10:55:50.820 -> ⇨ Characteristic Identify(0): IID=7, UUID="14"
10:55:50.820 -> ➟ Service HAPProtocolInformation: IID=8, UUID="A2"
10:55:50.867 -> ⇨ Characteristic Version("1.1.0"): IID=9, UUID="37"
10:55:50.867 -> ➟ Service LightBulb: IID=10, UUID="43"
10:55:50.867 -> ⇨ Characteristic On(0): IID=11, UUID="25"
10:55:50.867 -> ➤ Accessory: AID=2
10:55:50.867 -> ➟ Service AccessoryInformation: IID=1, UUID="3E"
10:55:50.867 -> ⇨ Characteristic Name("LED #2"): IID=2, UUID="23"
10:55:50.867 -> ⇨ Characteristic Manufacturer("HomeSpan"): IID=3, UUID="20"
10:55:50.867 -> ⇨ Characteristic SerialNumber("123-ABC"): IID=4, UUID="30"
10:55:50.867 -> ⇨ Characteristic Model("20mA LED"): IID=5, UUID="21"
10:55:50.914 -> ⇨ Characteristic FirmwareRevision("0.9"): IID=6, UUID="52"
10:55:50.914 -> ⇨ Characteristic Identify(0): IID=7, UUID="14"
10:55:50.914 -> ➟ Service HAPProtocolInformation: IID=8, UUID="A2"
10:55:50.914 -> ⇨ Characteristic Version("1.1.0"): IID=9, UUID="37"
10:55:50.914 -> ➟ Service LightBulb: IID=10, UUID="43"
10:55:50.914 -> ⇨ Characteristic On(0): IID=11, UUID="25"
10:55:50.914 ->
10:55:50.914 -> Range Check: No Warnings
10:55:50.914 ->
10:55:50.914 ->
10:55:50.914 -> Configured as Bridge: NO
10:55:50.914 ->
10:55:50.914 -> Service UUID AID IID Update Loop Button Linked Services
10:55:50.914 -> ------------------------------ ---- ---------- --- ------ ---- ------ ---------------
10:55:50.961 -> AccessoryInformation 3E 1 1 NO NO NO -
10:55:50.961 -> HAPProtocolInformation A2 1 8 NO NO NO -
10:55:50.961 -> LightBulb 43 1 10 YES NO NO -
10:55:50.961 -> AccessoryInformation 3E 2 1 NO NO NO -
10:55:50.961 -> HAPProtocolInformation A2 2 8 NO NO NO -
10:55:50.961 -> LightBulb 43 2 10 YES NO NO -
10:55:50.961 ->
10:55:50.961 -> *** End Info ***
10:55:50.961 ->
10:55:50.961 -> Accessory ID: 3F:3F:BD:72:25:9A LTPK: 96FAEAC4513949FF774B014D55C33D187898B36D56FF48D79662DA9F0AC1A9B5
10:55:51.008 -> Paired Controller: 3BDFB87A-7130-441B-A015-A33362BE90B8 (admin) LTPK: 0F164ACC2D390411FCA74A45E266854CA441EFFC4031AC189B2B24AEEF9DB731
10:55:51.008 ->
10:55:51.008 -> Accessory configuration has changed. Updating configuration number to 5
10:55:51.008 ->
10:55:51.008 -> HomeSpan LEDs is READY!
10:55:51.008 ->
10:55:51.008 -> Trying to connect to BELL576. Waiting 1 second(s) for response...
10:55:52.179 -> Trying to connect to BELL576. Waiting 2 second(s) for response...
10:55:54.201 -> Trying to connect to BELL576. Waiting 4 second(s) for response...
10:55:56.497 -> Successfully connected to BELL576! IP Address: 192.168.2.13
10:55:56.497 ->
10:55:56.497 -> Starting MDNS...
10:55:56.497 ->
10:55:56.497 -> HostName: HomeSpan-3F3FBD72259A.local:80
10:55:56.497 -> Display Name: HomeSpan LEDs
10:55:56.497 -> Model Name: HomeSpan-ESP32
10:55:56.497 -> Setup ID: HSPN
10:55:56.497 ->
10:55:56.497 -> Starting Web (HTTP) Server supporting up to 8 simultaneous connections...
10:55:56.544 ->
10:58:48.086 ->
10:58:48.086 -> *** ERROR: Bad GET request - URL not found
10:58:48.086 ->
RE: Lesson2 - How to use Arduino to control relay ON/OFF - admin - 11-11-2021
because you have seen the lessons for input and relay output is for KC868-A4. KC868-A4 use ESP32 GPIO directly for input and output function.
But KC868-A8 use PCF8574 IIC chip to extend the GPIO for input and output use.
if you want to learn digital input and digital output by KC868-A8, see these links:
Lesson19- how to use PCF8574 IIC extend GPIO for ESP32 multi relay https://www.kincony.com/forum/showthread.php?tid=834
Lesson20- how to use PCF8574 IIC extend GPIO for ESP32 input ports https://www.kincony.com/forum/showthread.php?tid=838
RE: Lesson2 - How to use Arduino to control relay ON/OFF - admin - 11-11-2021
in other demo source code, just when use relay output and input detect, all need use by PCF8574 IIC way to repalce with GPIO.
RE: Lesson2 - How to use Arduino to control relay ON/OFF - Patrick - 11-11-2021
moved question here https://www.kincony.com/forum/showthread.php?tid=834
RE: Lesson2 - How to use Arduino to control relay ON/OFF - IvanPad - 04-14-2022
Hi, do I need to power the A4 with 12V for programming? Arduino IDE doesn't recognize the USB port
RE: Lesson2 - How to use Arduino to control relay ON/OFF - IvanPad - 04-14-2022
(04-14-2022, 12:35 PM)IvanPad Wrote: Hi, do I need to power the A4 with 12V for programming? Arduino IDE doesn't recognize the USB port
I see the USB power is isolated in my board, but it exists in the schema:
Is that diode rquired to power esp32 for programming?
RE: Lesson2 - How to use Arduino to control relay ON/OFF - admin - 04-15-2022
not need, it's normal.
RE: Lesson2 - How to use Arduino to control relay ON/OFF - IvanPad - 04-18-2022
(04-15-2022, 12:11 AM)admin Wrote: not need, it's normal.
Thank you @admin, OK the diode is not requrired, but Do I need to connect 12V power to program esp32? My pc doesn't recognize the USB port when I connect.
RE: Lesson2 - How to use Arduino to control relay ON/OFF - admin - 04-18-2022
you should connect with DC12v power supply for board, only connect with USB port, no power.
|