Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
K868-E16S use digital input and I2C in the same time
#1
I've defined the digital inputs and switches as in the example and also added a DS18B20 temp sensor to the I2C. But as soon as I add in yaml the Dallas configuration, the update_interval toggles the switches on and off at the interval set in the update_interval.
I saw that the I2C port is the same as the Dallas sensor but I don't know how I can connect them in a different way.

esphome:
  name: kincony-kc868-e16s
  friendly_name: Kincony KC868-E16S
  platform: ESP32
  board: esp32dev

logger:

captive_portal:

i2c:
  sda: 16
  scl: 15
  scan: true
  id: bus_a

pcf8574:
  - id: 'pcf8574_hub_out_1'  # for output channel 1-8
    address: 0x21

  - id: 'pcf8574_hub_out_2'  # for output channel 9-16
    address: 0x25

  - id: 'pcf8574_hub_in_1'  # for input channel 1-8
    address: 0x22

  - id: 'pcf8574_hub_in_2'  # for input channel 9-16
    address: 0x24

switch:
  - platform: gpio
    name: "e16s-output14"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 5
      mode: OUTPUT
      inverted: true
    id: output14

  - platform: gpio
    name: "e16s-output15"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 6
      mode: OUTPUT
      inverted: true
    id: output15

  - platform: gpio
    name: "e16s-output16"
    pin:
      pcf8574: pcf8574_hub_out_2
      number: 7
      mode: OUTPUT
      inverted: true
    id: output16

binary_sensor:
  - platform: gpio
    name: "DI1 - Entrance Left B1"
    pin:
      pcf8574: pcf8574_hub_in_2
      number: 7
      mode: INPUT
      inverted: true
    internal: true
    on_press:
      then:
      - switch.toggle: output14

dallas:
  - pin: 16
    update_interval: 30s

sensor:
  - platform: dallas
    address: 0x453c430457d4c928
    name: "Livingroom Temperature"
    id: livingroom_temperature
  - platform: dallas
    address: 0x9d3c450457bfc728
    name: "Bedroom Temperature"
    id: bedroom_temperature
Reply
#2
DS18B20 can't use I2C bus pin. if you want to use DS18B20, try to use other free GPIO, such as there is a serial port extender on PCB (white 4pin socket).
Reply
#3
Thank you for the info, it was a confirmation of what I have to do.
So, I've used RX from the extended serial pin GPIO14.
Also I've added a 4.7K resistor between data and VCC+ (3.3V) of the temp sensor. It's not working without the resistor, that's why it wasn't working yesterday.

dallas:
- pin: 14
update_interval: 10s

Thank you!
Reply
#4
RXD:GPIO14
TXD:GPIO33
you can try to use by GPIO14 or GPIO33, if GPIO14 not work, you can try GPIO33.
Reply
#5
Hi, I need some help with connecting DS18B20 sensor to E16S, can you make some tutorial or screenshots?
The sensor have 3 wire, but serial on the PCB have 4! Help!
Thx in advance, im begginer!
Reply
#6
DS18B20 3 wire: 3.3v, gnd, data. connect these pins with board.
Reply
#7
(05-27-2024, 11:44 PM)admin Wrote: DS18B20 3 wire: 3.3v, gnd, data. connect these pins with board.

Where, how? Can you put here some screenshot? Thx in advance!
Reply
#8
please search by google, how to use ds18b20
Reply
#9
(05-28-2024, 01:45 AM)admin Wrote: please search by google, how to use ds18b20

Are you kidding me? I know how to connect DS18B20 to ESP32, i have a working project on this, but i dont know how to connect DS18B20 tou your PCB(E16S)! NOW you understand? If you can put here some guide or screenshot, is OK, if not, Bye, bye!
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)