Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
KC868-A16 integrate to Node-Red for alexa voice control
#1

1. download web server firmware for KC868-A16
https://www.kincony.com/forum/showthread.php?tid=2240

2. register https://alexa-node-red.bm.hardill.me.uk
   

3. create device on "node-red-contrib-alexa-home-skill" skill website
   

4. add alexa skill on Node-Red
   

5. add "alexa" and "http request" node on Node-Red
   

light1-on http command is: http://192.168.1.60/1/on
light1-off http command is: http://192.168.1.60/1/off

just replace the KC868-A16's IP address with yours.

Node-Red follow download:

.zip   KC868-A16-Node-Red-Alexa-16switch.zip (Size: 2.03 KB / Downloads: 238)

6. add skill (Node-Red) on Alexa phone app
   

7. Discovery for new device
   
Reply
#2
Thanks for all the help KinCony! anyone else have any ideas how to control the outputs from the inputs more than just on/off using node red, e.g pulse for 0.5 seconds, 10 seconds or match input trigger to output trigger, thanks
Reply
#3
this video tour already can INPUT trigger OUTPUT, it have wrote arduino code for this function.
Reply
#4
(10-03-2022, 10:57 PM)admin Wrote: this video tour already can INPUT trigger OUTPUT, it have wrote arduino code for this function.

e.g pulse for 0.5 seconds, 10 seconds or match input trigger to output trigger, thanks
Reply
#5
0.5 second or 10 seconds, just modify the arduino IDE code key function. you can check with source code that we already uploaded.
Reply
#6
(10-05-2022, 11:15 AM)admin Wrote: 0.5 second or 10 seconds, just modify the arduino IDE code key function. you can check with source code that we already uploaded.

what would be written to turn a relay on as you hold in an input e.g relay 1 on when button 1 is on, relay 1 off when button 1 is off, i am guessing it is in this text? thanks 

// turns 32 relays on and off
            if (header.indexOf("GET /1/on") >= 0) {relay1state = "on";pcf8574_R1.digitalWrite(P0, LOW);}
            else if (header.indexOf("GET /1/off") >= 0) {relay1state = "off";pcf8574_R1.digitalWrite(P0, HIGH);}
            else if (header.indexOf("GET /2/on") >= 0)  {relay2state = "on";pcf8574_R1.digitalWrite(P1, LOW);}
            else if (header.indexOf("GET /2/off") >= 0) {relay2state = "off";pcf8574_R1.digitalWrite(P1, HIGH);}
            else if (header.indexOf("GET /3/on") >= 0)  {relay3state = "on";pcf8574_R1.digitalWrite(P2, LOW);}
Reply
#7
such as:
if(pcf8574_I1.digitalRead(P0) == LOW) //key1 pressed
{
delay(20); //anti-interference
if(pcf8574_I1.digitalRead(P0) == LOW) //key1 pressed again
{
pcf8574_R1.digitalWrite(P0,!pcf8574_R1.digitalRead(P0)); // toggle relay1 state
while(pcf8574_I1.digitalRead(P0) == LOW); //wait remove hand
if (pcf8574_R1.digitalRead(P0) == LOW) relay1state= "on"; else relay1state= "off";
}
}
//-------------------------------------------------------------------------------------------------------
you just change every key funtion's "delay(20);" replace 20 with other number will have different time.
Reply
#8
(10-05-2022, 01:11 PM)admin Wrote: such as:
if(pcf8574_I1.digitalRead(P0) == LOW)        //key1 pressed
  {
    delay(20);                        //anti-interference
    if(pcf8574_I1.digitalRead(P0) == LOW)      //key1 pressed again
    {
      pcf8574_R1.digitalWrite(P0,!pcf8574_R1.digitalRead(P0));    // toggle relay1 state   
      while(pcf8574_I1.digitalRead(P0) == LOW); //wait remove hand
      if (pcf8574_R1.digitalRead(P0) == LOW) relay1state= "on"; else relay1state= "off";
    }
  }
//-------------------------------------------------------------------------------------------------------
you just change every key funtion's "delay(20);"  replace 20 with other number will have different time.

i cant connect to the board all the picures from your colleague i need to do it from the whatsapp chat are gone, what is the most simple way to setup up this board, i just want to be able to choose what the inputs and outputs do and it to connect to alexa, im happy to use wifi and any app, if you can tell me your video for this or instructions, thanks
Reply
#9
just do as this video tour, our whatsapp number is :+86-15381188302
Reply
#10
No present de Node-Red in Skill Alexa


Attached Files Image(s)
   
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)