Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 9,240
» Latest member: RobertPQuillin
» Forum threads: 4,099
» Forum posts: 20,550

Full Statistics

Online Users
There are currently 70 online users.
» 0 Member(s) | 57 Guest(s)
Amazonbot, Baidu, Bing, Bytespider, PetalBot, bot

Latest Threads
Switching power supply wi...
Forum: KC868-A16v3
Last Post: admin
5 hours ago
» Replies: 1
» Views: 6
KCS v3 - Remote modificat...
Forum: KC868-A16
Last Post: admin
Yesterday, 05:13 AM
» Replies: 9
» Views: 367
"KCS" v3.25.4 firmware BI...
Forum: "KCS" v3 firmware
Last Post: admin
Yesterday, 05:11 AM
» Replies: 0
» Views: 46
A24 configure yaml for ES...
Forum: KinCony A24
Last Post: admin
06-21-2026, 12:52 PM
» Replies: 29
» Views: 8,569
KinCony Pi5M8 – Raspberry...
Forum: News
Last Post: admin
06-20-2026, 12:00 AM
» Replies: 0
» Views: 39
Need Advice for New 3-Flo...
Forum: Suggestions and feedback on KinCony's products
Last Post: admin
06-19-2026, 02:58 AM
» Replies: 1
» Views: 42
N series Energy Meter for...
Forum: N60
Last Post: admin
06-18-2026, 12:49 PM
» Replies: 2
» Views: 129
Request for free sample
Forum: Apply for free sample product
Last Post: oscarsoler
06-18-2026, 09:02 AM
» Replies: 0
» Views: 20
KCS v2 relay state after ...
Forum: "KCS" v2 firmware system
Last Post: admin
06-18-2026, 04:33 AM
» Replies: 1
» Views: 51
Multiple phase L1,L2,L3
Forum: N20
Last Post: admin
06-18-2026, 02:35 AM
» Replies: 7
» Views: 420

  KC868-HAv2 phantom press in ESPhome
Posted by: Dario - 10-26-2024, 09:27 AM - Forum: KC868-HA /HA v2 - Replies (1)

Hi,

Is there a way to optimise the Kincony KC868-HAv2? I currently use the new B16M and 2 of the KC868-HAv2 boards in test on ESPhome and I noticed that when I press and release the button quickly multiple times the B16M sees the button as pressed while it is not. When I press again it ofcourse gets reset.

It needs to be fool/child proof in my solution because I'm going to work with double/triple and long press commands in my solution.
Might the debounce setting do something?

Kind regards,

Dario

Print this item

  B16M ESPHome yaml for home assistant work with Tuya app
Posted by: admin - 10-26-2024, 07:01 AM - Forum: B16M - No Replies

   

Code:
esphome:
  name: b16m
  friendly_name: b16m
  platformio_options:
    board_build.extra_flags:
      # WIFI_CONTROL_SELF_MODE = 0
      # WIFI_CONTROL_SELF_MODE = 1
      - "-DWIFI_CONTROL_SELF_MODE=1"
esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: arduino
   

external_components:
  - source:
      type: git
      url: https://github.com/hzkincony/esphome-tuya-wifi-mcu
      ref: v1.1.0

# Enable logging

  # hardware_uart: USB_SERIAL_JTAG
# Enable Home Assistant API
api:
  encryption:
    key: "WeVOuL5oNhjXcfzXtTirlOwvtWvCD5yqIxd3oV4es1k="

ethernet:
  type: W5500
  clk_pin: GPIO42
  mosi_pin: GPIO43
  miso_pin: GPIO44
  cs_pin: GPIO41
  interrupt_pin: GPIO2
  reset_pin: GPIO1

i2c:
   - id: bus_a
     sda: 38
     scl: 39
     scan: true
     frequency: 400kHz

pcf8574:
  - id: 'pcf8574_hub_out_1'  # for output channel 1-16
    i2c_id: bus_a
    address: 0x25
    pcf8575: true

  - id: 'pcf8574_hub_in_1'  # for input channel 1-16
    i2c_id: bus_a
    address: 0x24
    pcf8575: true

uart:
  - id: uart_1    #RS485
    baud_rate: 9600
    debug:
      direction: BOTH
      dummy_receiver: true
      after:
        timeout: 10ms
    tx_pin: 18
    rx_pin: 8

  - id: tuya_mcu_uart
    tx_pin: GPIO16
    rx_pin: GPIO17
    baud_rate: 9600

tuya_wifi_mcu:
  # tuya mcu product id
  product_id: tg4bava25acki7vz
  uart_id: tuya_mcu_uart
  wifi_reset_pin: 28
  wifi_led_pin: 16

switch:
  - platform: uart
    uart_id: uart_1
    name: "RS485 Button"
    data: [0x11, 0x22, 0x33, 0x44, 0x55]

  - platform: gpio
    name: "b16m-output01"
    id: "b16m_output01"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 0
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-output1-tuya
    dp_id: 1
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16m_output01"

  - platform: gpio
    name: "b16m-output02"
    id: "b16m_output02"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 1
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-output2-tuya
    dp_id: 2
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16m_output02"

  - platform: gpio
    name: "b16m-output03"
    id: "b16m_output03"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 2
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-output3-tuya
    dp_id: 3
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16m_output03"

  - platform: gpio
    name: "b16m-output04"
    id: "b16m_output04"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 3
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-output4-tuya
    dp_id: 4
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16m_output04"

  - platform: gpio
    name: "b16m-output05"
    id: "b16m_output05"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 4
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-output5-tuya
    dp_id: 5
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16m_output05"

  - platform: gpio
    name: "b16m-output06"
    id: "b16m_output06"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 5
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-output6-tuya
    dp_id: 6
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16m_output06"

  - platform: gpio
    name: "b16m-output07"
    id: "b16m_output07"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 6
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-output7-tuya
    dp_id: 101
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16m_output07"

  - platform: gpio
    name: "b16m-output08"
    id: "b16m_output08"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 7
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-output8-tuya
    dp_id: 102
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16m_output08"

  - platform: gpio
    name: "b16m-output09"
    id: "b16m_output09"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 8
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-output9-tuya
    dp_id: 103
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16m_output09"

  - platform: gpio
    name: "b16m-output10"
    id: "b16m_output10"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 9
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-output10-tuya
    dp_id: 104
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16m_output10"

  - platform: gpio
    name: "b16m-output11"
    id: "b16m_output11"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 10
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-output11-tuya
    dp_id: 105
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16m_output11"

  - platform: gpio
    name: "b16m-output12"
    id: "b16m_output12"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 11
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-output12-tuya
    dp_id: 106
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16m_output12"

  - platform: gpio
    name: "b16m-output13"
    id: "b16m_output13"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 12
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-output13-tuya
    dp_id: 107
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16m_output13"

  - platform: gpio
    name: "b16m-output14"
    id: "b16m_output14"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 13
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-output14-tuya
    dp_id: 108
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16m_output14"

  - platform: gpio
    name: "b16m-output15"
    id: "b16m_output15"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 14
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-output15-tuya
    dp_id: 109
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16m_output15"

  - platform: gpio
    name: "b16m-output16"
    id: "b16m_output16"
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 15
      mode: OUTPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-output16-tuya
    dp_id: 110
    # hide from homeassistant ui
    internal: true
    # bind other switch, sync state
    bind_switch_id: "b16m_output16"

binary_sensor:
  - platform: gpio
    name: "b16m-input01"
    id: "b16m_input01"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 0
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-input1-tuya
    dp_id: 111
    bind_binary_sensor_id: b16m_input01
    internal: true

  - platform: gpio
    name: "b16m-input02"
    id: "b16m_input02"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 1
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-input2-tuya
    dp_id: 112
    bind_binary_sensor_id: b16m_input02
    internal: true

  - platform: gpio
    name: "b16m-input03"
    id: "b16m_input03"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 2
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-input3-tuya
    dp_id: 113
    bind_binary_sensor_id: b16m_input03
    internal: true

  - platform: gpio
    name: "b16m-input04"
    id: "b16m_input04"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 3
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-input4-tuya
    dp_id: 114
    bind_binary_sensor_id: b16m_input04
    internal: true

  - platform: gpio
    name: "b16m-input05"
    id: "b16m_input05"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 4
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-input5-tuya
    dp_id: 115
    bind_binary_sensor_id: b16m_input05
    internal: true

  - platform: gpio
    name: "b16m-input06"
    id: "b16m_input06"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 5
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-input6-tuya
    dp_id: 116
    bind_binary_sensor_id: b16m_input06
    internal: true

  - platform: gpio
    name: "b16m-input07"
    id: "b16m_input07"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 6
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-input7-tuya
    dp_id: 117
    bind_binary_sensor_id: b16m_input07
    internal: true

  - platform: gpio
    name: "b16m-input08"
    id: "b16m_input08"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 7
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-input8-tuya
    dp_id: 118
    bind_binary_sensor_id: b16m_input08
    internal: true

  - platform: gpio
    name: "b16m-input09"
    id: "b16m_input09"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 8
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-input9-tuya
    dp_id: 119
    bind_binary_sensor_id: b16m_input09
    internal: true

  - platform: gpio
    name: "b16m-input10"
    id: "b16m_input10"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 9
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-input10-tuya
    dp_id: 120
    bind_binary_sensor_id: b16m_input10
    internal: true

  - platform: gpio
    name: "b16m-input11"
    id: "b16m_input11"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 10
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-input11-tuya
    dp_id: 121
    bind_binary_sensor_id: b16m_input11
    internal: true

  - platform: gpio
    name: "b16m-input12"
    id: "b16m_input12"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 11
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-input12-tuya
    dp_id: 122
    bind_binary_sensor_id: b16m_input12
    internal: true

  - platform: gpio
    name: "b16m-input13"
    id: "b16m_input13"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 12
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-input13-tuya
    dp_id: 123
    bind_binary_sensor_id: b16m_input13
    internal: true

  - platform: gpio
    name: "b16m-input14"
    id: "b16m_input14"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 13
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-input14-tuya
    dp_id: 124
    bind_binary_sensor_id: b16m_input14
    internal: true

  - platform: gpio
    name: "b16m-input15"
    id: "b16m_input15"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 14
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-input15-tuya
    dp_id: 125
    bind_binary_sensor_id: b16m_input15
    internal: true

  - platform: gpio
    name: "b16m-input16"
    id: "b16m_input16"
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 15
      mode: INPUT
      inverted: true
  - platform: tuya_wifi_mcu
    name: b16m-input16-tuya
    dp_id: 126
    bind_binary_sensor_id: b16m_input16
    internal: true

##pull-up resistance on PCB
  - platform: gpio
    name: "b16m-W1-io40"
    pin:
      number: 40
      inverted: true

  - platform: gpio
    name: "b16m-W1-io15"
    pin:
      number: 15
      inverted: true

  - platform: gpio
    name: "b16m-W1-io48"
    pin:
      number: 48
      inverted: true

  - platform: gpio
    name: "b16m-W1-io47"
    pin:
      number: 47
      inverted: true
## without resistance on PCB
  - platform: gpio
    name: "b16m-W1-io13"
    pin:
      number: 13
      inverted: false

  - platform: gpio
    name: "b16m-W1-io14"
    pin:
      number: 14
      inverted:  false

  - platform: gpio
    name: "b16m-W1-io21"
    pin:
      number: 21
      inverted: false

ads1115:
  - address: 0x48
sensor:
  - platform: ads1115
    multiplexer: 'A0_GND'
    gain: 6.144
    resolution: 16_BITS
    name: "ADS1115 Channel A0-GND"
    update_interval: 5s
  - platform: ads1115
    multiplexer: 'A1_GND'
    gain: 6.144
    name: "ADS1115 Channel A1-GND"
    update_interval: 5s
  - platform: ads1115
    multiplexer: 'A2_GND'
    gain: 6.144
    name: "ADS1115 Channel A2-GND"
    update_interval: 5s
  - platform: ads1115
    multiplexer: 'A3_GND'
    gain: 6.144
    name: "ADS1115 Channel A3-GND"
    update_interval: 5s

web_server:
  port: 80

font:
  - file: "gfonts://Roboto"
    id: roboto
    size: 20

display:
  - platform: ssd1306_i2c
    i2c_id: bus_a
    model: "SSD1306 128x64"
    address: 0x3C
    lambda: |-
      it.printf(0, 0, id(roboto), "KinCony B16M");
ESPHome yaml file download:

.txt   B16M_HA-Tuya.txt (Size: 13.87 KB / Downloads: 743)

Print this item

  KinCony Product Tree
Posted by: admin - 10-26-2024, 06:05 AM - Forum: News - Replies (3)

Here is KinCony products tree , help you to find suitable product. We will continue to innovate and update our product tree.
   
   
   
   

Print this item

  MQTT PREFIX TOPIC could be changed in the kincony firmware webpage.
Posted by: Aladin - 10-25-2024, 10:24 AM - Forum: Suggestions and feedback on KinCony's products - Replies (1)

It's possible to permit MQTT PREFIX TOPIC to be changed in the kincony firmware webpage like in TASMOTA?

SOME_CUSTOM_PREFIX/KC868_A16/B8D61B4AA69C/STATE
or
SOME_CUSTOM_PREFIX/XXXXX/XXXXX/STATE 

Instead of : KC868_A16/B8D61A5AA69C/STATE

You could keep the default PREFIX & permit to set the entire CUSTOM PREFIX.

We also need to choose UPPERCASE or LOWERCASE format for the MQTT TOPIC.

Thanks!

Print this item

  H32B pro: No IP adress assigned to controller
Posted by: kenny H - 10-24-2024, 07:34 PM - Forum: KC868-HxB series Smart Controller - Replies (8)

Hello, 

I have the KC868-H32B controller. I managed to follow all steps to connect with homekit and also open the admin page via it's IP adress.
Now, with trying to get in to work in Home assistent, I accidently removed its Ethernet settings ( IP adress, mac, port, etc... ) . So instead of Controller Ethernet IP adress 192.168.1.200. , now scanning it wit ' UDP_Scan_List ' tool . It detects the controller with adress 0.0.0.0.0. I cannot connect to it anymore now.
Everything in the red square, was empty when I clicked on ' save settings '

Is there a way to put all factory settings back?

Kind regards

Kenny

   

Print this item

  KinCony AS ESP32-S3 voice assistant released
Posted by: admin - 10-22-2024, 05:25 AM - Forum: News - No Replies

KinCony ESP32-S3 voice assistant based on ESP32-S3-WROOM-1U (N16R8) wifi chip. It use by I2S INMP441 microphone and MAX98357A amplifier. SD card socket on PCB. there are WS2812B RGB LED you can use for assistant. It also have IR receiver and many free GPIOs on PCB.
[Image: AS1_pix400.jpg][Image: AS2_pix400.jpg]
[Image: AS3_pix400.jpg][Image: AS4_pix400.jpg]
Model No. KinCony AS
Description: KinCony ESP32-S3 voice assistant – AS
Power supply: 5V DC by USB cable
Processor: ESP32-S3-WROOM-1U (N16R8)
Size: 118mm*70mm*70mm
interfaces: WiFi,Bluetooth,USB-Mini
SD Card: inside of BOX
WS2812B RGB LED: 2 different channel of GPIO
IR receiver: HS0038
433M receiver PCB pins reserved
Microphone: INMP441 (I2S bus)
Amplifier:MAX98357A (MAX:3.2W)
free GPIOs for DIY extend: 13 pins
hardware details:
[Image: 5.jpg]
[Image: 7.jpg]
[Image: 6.jpg][Image: 8.jpg]
[Image: esp32-s3-wroom-1u.JPG]
software solution:
1. install Speech-to-text add-on “faster-whisper” on home assistant.
2. install Text-to-speech add-on “piper” on home assistant.
3. download AS’ ESPHome yaml file from KinCony forum, modify wifi router SSID and PASSWORD.
4. download firmware to AS(ESP32-S3).
5. begin use in home assistant.
Easy integrate KinCony ESP32-S3 voice assistant to home assistant by ESPHome. You can download yaml file from KinCony forum.
[Image: voice-assistant-ready.png]
[Image: voice-assistant-listen.png]

Print this item

  how to use AS ESP32-S3 voice assistant in home assistant
Posted by: admin - 10-22-2024, 01:46 AM - Forum: KinCony AS - Replies (17)

Set Up Voice Assist Pipeline

To set up voice assistant, we would need two components to create the Voice Assist pipeline in Home Assistant.

Whisper: For speech-to-text
Piper: For text-to-speech

1: Whisper Addon
2: Piper Addon
3: And finally the entire Voice Assist pipeline.
   
You don't need to set up the Wake Word addon, as we will use the on-device Wake Word detection with the Micro Wake Word framework
So make sure to watch it and set up the Voice Assist pipeline
   
   
   
ESPHome - add device - create new device called AS:
   
copy and paste KinCony AS yaml file:    

Code:
esphome:
  name: as
  friendly_name: AS
  platformio_options:
    board_build.flash_mode: dio
  on_boot:
    - light.turn_on:
        id: led_ww
        blue: 100%
        brightness: 60%
        effect: fast pulse

esp32:
  board: esp32-s3-devkitc-1
  framework:
    type: esp-idf

    sdkconfig_options:
      CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: "y"
      CONFIG_ESP32S3_DATA_CACHE_64KB: "y"
      CONFIG_ESP32S3_DATA_CACHE_LINE_64B: "y"
      CONFIG_AUDIO_BOARD_CUSTOM: "y"
   
psram:
  mode: octal  # quad for N8R2 and octal for N16R8
  speed: 80MHz


# Enable logging
logger:
  hardware_uart: USB_SERIAL_JTAG

# Enable Home Assistant API
api:
  encryption:
    key: "TFpb+pBAvQIS1MVwaA7EoJ2DkpWE+79UvVro7yMyGdU="
  on_client_connected:
        then:
          - delay: 50ms
          - light.turn_off: led_ww
          - micro_wake_word.start:
  on_client_disconnected:
        then:
          - voice_assistant.stop:



ota:
  - platform: esphome
    password: "1245211a05eef56614a2ef5a3f3e971c"

wifi:
  ssid: "KinCony"
  password: "a12345678"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp32-S3-Wake-Word"
    password: "LJfUrdJk3svP"

captive_portal:


button:
  - platform: restart
    name: "Restart"
    id: but_rest

switch:
  - platform: template
    id: mute
    name: mute
    optimistic: true
    on_turn_on:
      - micro_wake_word.stop:
      - voice_assistant.stop:
      - light.turn_on:
          id: led_ww           
          red: 100%
          green: 0%
          blue: 0%
          brightness: 60%
          effect: fast pulse
      - delay: 2s
      - light.turn_off:
          id: led_ww
      - light.turn_on:
          id: led_ww           
          red: 100%
          green: 0%
          blue: 0%
          brightness: 30%
    on_turn_off:
      - micro_wake_word.start:
      - light.turn_on:
          id: led_ww           
          red: 0%
          green: 100%
          blue: 0%
          brightness: 60%
          effect: fast pulse
      - delay: 2s
      - light.turn_off:
          id: led_ww
   
light:
  - platform: esp32_rmt_led_strip
    id: led_ww
    rgb_order: GRB
    pin: GPIO16
    num_leds: 1
    rmt_channel: 0
    chipset: ws2812
    name: "on board light"
    effects:
      - pulse:
      - pulse:
          name: "Fast Pulse"
          transition_length: 0.5s
          update_interval: 0.5s
          min_brightness: 0%
          max_brightness: 100%
         
         
# Audio and Voice Assistant Config         
i2s_audio:
  - id: i2s_in
    i2s_lrclk_pin: GPIO3  #WS
    i2s_bclk_pin: GPIO2 #SCK
  - id: i2s_speaker
    i2s_lrclk_pin: GPIO6  #LRC
    i2s_bclk_pin: GPIO7 #BLCK

microphone:
  - platform: i2s_audio
    id: va_mic
    adc_type: external
    i2s_din_pin: GPIO4 #SD pin on the INMP441
    channel: left
    pdm: false
    i2s_audio_id: i2s_in
    bits_per_sample: 32 bit
   
speaker:
    platform: i2s_audio
    id: va_speaker
    i2s_audio_id: i2s_speaker
    dac_type: external
    i2s_dout_pin: GPIO8   #  DIN Pin of the MAX98357A Audio Amplifier
    channel: mono

micro_wake_word:
  on_wake_word_detected:
    # then:
    - voice_assistant.start:
        wake_word: !lambda return wake_word;
    - light.turn_on:
        id: led_ww           
        red: 30%
        green: 30%
        blue: 70%
        brightness: 60%
        effect: fast pulse
  models:
    - model: hey_jarvis
   
voice_assistant:
  id: va
  microphone: va_mic
  noise_suppression_level: 2.0
  volume_multiplier: 4.0
  speaker: va_speaker
  on_stt_end:
       then:
         - light.turn_off: led_ww
  on_error:
          - micro_wake_word.start: 
  on_end:
        then:
          - light.turn_off: led_ww
          - wait_until:
              not:
                voice_assistant.is_running:
          - micro_wake_word.start: 
Note: replace wifi router's ssid and password by yourself.
yaml file download from: https://www.kincony.com/forum/showthread.php?tid=6890
now connect AS to your Server16's USB port (raspberry pi or your own server) 
   
click right top windows "install" button, then will show you install way, chose "Plug into the computer running ESPHome Dashboard" item
   
click "USB=JTAG" option that detected.
   
ESPHome begin compile and download firmware:
   
now you will find the AS device discovered on "setting" - "device webpage". Just click "CONFIGURE" button, assign a room to the device.
   
AS is ready. 
   
if you speak "hey jarvis" command, voice assistant will show "listening", then you can say, such as "turn on light", "turn off light". just say the name of your device.

Print this item

  [arduino code examples for AS]-08 how to use WS2812B RGB LED by bottom direction
Posted by: admin - 10-22-2024, 01:30 AM - Forum: KinCony AS - No Replies

Code:
/*
  Made by KinCony IoT: https://www.kincony.com
  This code controls 3 WS2812 RGB LEDs connected to GPIO 15 on an ESP32-S3.
  Each LED will be set to blue with adjustable brightness.
  The Adafruit NeoPixel library is used to communicate with the WS2812 LEDs.

  Hardware setup:
  - WS2812 RGB LEDs are connected to GPIO 15 (data pin).
  - Total number of LEDs: 3.
*/

#include <Adafruit_NeoPixel.h>

// Create an instance of the Adafruit_NeoPixel class
// Parameters: number of LEDs (3), data pin (GPIO 15), LED type (NEO_GRB with 800 KHz communication)
Adafruit_NeoPixel rgb_display = Adafruit_NeoPixel(3, 15, NEO_GRB + NEO_KHZ800);

void setup() {
  // Initialize the NeoPixel library and prepare the LEDs for use
  rgb_display.begin();
}

void loop() {
  /*
    rgb_display.setPixelColor(uint16_t n, uint32_t c);
    This function sets the color of a specific LED.

    Parameters:
    - n: The LED number (starting from 0).
    - c: The color to set the LED to, in hexadecimal (0x0000ff = blue in RGB format).
  */

  // Set the first LED (LED 0) to blue
  rgb_display.setPixelColor(0, (0x0000ff)); // Blue color for the first LED (index 0)
  rgb_display.setBrightness(100);           // Set brightness to 100 out of 255
  rgb_display.show();                       // Update the LED to reflect the change

  // Set the second LED (LED 1) to blue
  rgb_display.setPixelColor(1, (0x0000ff)); // Blue color for the second LED (index 1)
  rgb_display.setBrightness(100);           // Set brightness to 100 out of 255
  rgb_display.show();                       // Update the LED to reflect the change

  // Set the third LED (LED 2) to blue
  rgb_display.setPixelColor(2, (0x0000ff)); // Blue color for the third LED (index 2)
  rgb_display.setBrightness(100);           // Set brightness to 100 out of 255
  rgb_display.show();                       // Update the LED to reflect the change
}
arduino ino file download:
.zip   LED_WS2812B-3pcs.zip (Size: 879 bytes / Downloads: 580)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:
.zip   LED_WS2812B.ino.merged.zip (Size: 177.55 KB / Downloads: 555)
   

Print this item

  [arduino code examples for AS]-07 how to use WS2812B RGB LED by vertical direction
Posted by: admin - 10-22-2024, 01:25 AM - Forum: KinCony AS - No Replies

Code:
/*
  Made by KinCony IoT: https://www.kincony.com
  This code controls 1 WS2812 RGB LEDs connected to GPIO 16 on an ESP32-S3.
  Each LED will be set to blue with adjustable brightness.
  The Adafruit NeoPixel library is used to communicate with the WS2812 LEDs.

  Hardware setup:
  - WS2812 RGB LEDs are connected to GPIO 15 (data pin).
  - Total number of LEDs: 3.
*/

#include <Adafruit_NeoPixel.h>

// Create an instance of the Adafruit_NeoPixel class
// Parameters: number of LEDs (3), data pin (GPIO 15), LED type (NEO_GRB with 800 KHz communication)
Adafruit_NeoPixel rgb_display = Adafruit_NeoPixel(1, 16, NEO_GRB + NEO_KHZ800);

void setup() {
  // Initialize the NeoPixel library and prepare the LEDs for use
  rgb_display.begin();
}

void loop() {
  /*
    rgb_display.setPixelColor(uint16_t n, uint32_t c);
    This function sets the color of a specific LED.

    Parameters:
    - n: The LED number (starting from 0).
    - c: The color to set the LED to, in hexadecimal (0x0000ff = blue in RGB format).
  */

  // Set the first LED (LED 0) to blue
  rgb_display.setPixelColor(0, (0x0000ff)); // Blue color for the first LED (index 0)
  rgb_display.setBrightness(100);           // Set brightness to 100 out of 255
  rgb_display.show();                       // Update the LED to reflect the change

}
arduino ino file download:

.zip   LED_WS2812B-1pc.zip (Size: 834 bytes / Downloads: 592)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:
.zip   LED_WS2812B-1pc.ino.merged.zip (Size: 179.91 KB / Downloads: 590)
   

Print this item

  [arduino code examples for AS]-06 how to play MP3 file by SD Card
Posted by: admin - 10-22-2024, 01:12 AM - Forum: KinCony AS - No Replies

Code:
/*
  ESP32 SD I2S Music Player
  esp32-i2s-sd-player.ino
  Plays MP3 file from microSD card
  Uses MAX98357 I2S Amplifier Module
  Uses ESP32-audioI2S Library - https://github.com/schreibfaul1/ESP32-audioI2S
*/

// Include required libraries
#include "Arduino.h"
#include "Audio.h"
#include "SD.h"
#include "FS.h"

// microSD Card Reader connections
#define SD_CS         13
#define SPI_MOSI      12
#define SPI_MISO      10
#define SPI_SCK       11

// I2S Connections
#define I2S_DOUT      8
#define I2S_BCLK      7
#define I2S_LRC       6

// Create Audio object
Audio audio;

void setup() {
   
    // Set microSD Card CS as OUTPUT and set HIGH
    pinMode(SD_CS, OUTPUT);     
    digitalWrite(SD_CS, HIGH);
   
    // Initialize SPI bus for microSD Card
    SPI.begin(SPI_SCK, SPI_MISO, SPI_MOSI);
   
    // Start Serial Port
    Serial.begin(115200);
   
    // Start microSD Card
    if(!SD.begin(SD_CS))
    {
      Serial.println("Error accessing microSD card!");
      while(true);
    }
   
    // Setup I2S
    audio.setPinout(I2S_BCLK, I2S_LRC, I2S_DOUT);
   
    // Set Volume
    audio.setVolume(50);
   
    // Open music file
    audio.connecttoFS(SD,"/music.mp3");
   
}

void loop()
{
    audio.loop();   
}
place music.mp3 file on your SD card, make sure SD card is FAT32 format. when board power on, will auto play the MP3 file.
arduino ino file download:
.zip   AS-mp3.zip (Size: 760 bytes / Downloads: 600)
BIN file (you can use esp32 download tool download to ESP32-S3 with address 0x0 then directly to use) download:
.zip   AS-mp3.ino.merged.zip (Size: 878.75 KB / Downloads: 588)
arduino IDE compile setting:    

Print this item