Help with the SHT30-P - Waterproof Humidity and temperature probe

I need Help with my new SHT30-P - Waterproof Humidity and temperature probe + espWroom-32?

I cant find what code to use in esphome
Do I absolutely need to use the I2C IIC Serial Digital Temperature Humidity Sensor Breakout with it?
https://abra-electronics.com/sensors/sensors-temperature-en/sens-sht30-i2c-iic-serial-digital-temperature-humidity-sensor-breakout.html
Can’t i just use the 4 wires connected to a espWroom-32 or esp8266?

Can’t seem to find much information on how to hook it up on the espwroom 32
This doesn’t work: taken str8 from esphome.io

i2c:
  sda: 21
  scl: 22
  scan: True
  id: bus_a
  • this in the sensor section:
sensor:
  - platform: sht3xd
    temperature:
      name: "zone1 soil  Temperature"
    humidity:
      name: "zone1 soil Humidity"
    address: 0x44
    update_interval: 60s

This is the sensor: https://abra-electronics.com/sensors/sensors-temperature-en/sens-sht30-p-sht30-temperature-and-humidity-sensor-probe.html
Any help would be appreciated!
thanks

Thia? SHT3X-D Temperature+Humidity Sensor — ESPHome

Maybe those are the pages you already quoted from though. What is your log showing you?

Yes it’s one of the two i quoted earlier. I didn’t even get to logs, it actually wont let me compile…
It’s weird because I find all these others in the same family but nothing on this one?

I think this is the actual sensor chip. I know it’s made by sensirion, but even on their site i find only it’s cousins or something. The one thing i think I’ve found for sure is that its * I2C interface. and also that I do not know for sure how to interface with i2c…

do I need an extra module to be able to use I2c or i could use it directly.

I have 4 wires which are labeled as SDA:grn/blu VCC:red, SCK:ylw/wht GRND:blk
i know what 3 of the four are… i do not know what SCK is.

maybe you can help me.

also there is this code on the tag: FS304-SHTXX
Which led me to some datasheet, but i’m still trying to decypher it plus it’s for an older model i think, help please please please :wink:

I really am trying the hardest i can to learn but learning curve is real steep and so many fields of study that i never did too… but i am learning so much because of the generous time and help of this community!

Attempts to compile create a log. What does it say?

I think I’ve found how to do this, give me a minute ill try this , then i’ll get the log if it doesn’t work.
the thing is that i compiled and uploaded using a different computer using esphomeflasher cmdline because sometimes my HA on VM is not recognizing the usb… so i did it that way…

i am writing the yaml now… brb

Esphome compiling still creates logs. But you said you couldn’t compile so now you have totally lost me.

what are the two !2C pins on the esp32 wroom.

I am using 21 and 22 but it tells me that ium wrong when i try compiling

this is the last bit from the last few hours on my mac, ill try to get to the ones that i did on my virtual machine on my nas, I am less sure how to get to that one specifically…

Last login: Fri May 21 20:44:15 on ttys000
-bash: /Users/fabiendostie/.bash_profile: line 14: unexpected EOF while looking for matching `"'
-bash: /Users/fabiendostie/.bash_profile: line 15: syntax error: unexpected end of file
Fabiens-Mac-Pro:~ fabiendostie$ esphomeflasher
objc[6136]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit (0x7fffa572a3f0) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x10d857f50). One of the two will be used. Which one is undefined.
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/esphomeflasher/__main__.py", line 158, in run_esphomeflasher
    esptool.write_flash(stub_chip, mock_args)
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/esptool.py", line 2361, in write_flash
    blocks = esp.flash_defl_begin(uncsize, len(image), address)
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/esptool.py", line 104, in inner
    return func(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/esptool.py", line 660, in flash_defl_begin
    self.check_command("enter compressed flash mode", self.ESP_FLASH_DEFL_BEGIN,
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/esptool.py", line 369, in check_command
    val, data = self.command(op, data, chk, timeout=timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/esptool.py", line 347, in command
    p = self.read()
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/esptool.py", line 292, in read
    return next(self._slip_reader)
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/esptool.py", line 2045, in slip_reader
    raise FatalError("Timed out waiting for packet %s" % waiting_for)
esptool.FatalError: Timed out waiting for packet content

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/esphomeflasher/gui.py", line 163, in run
    run_esphomeflasher(argv)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/esphomeflasher/__main__.py", line 160, in run_esphomeflasher
    raise EsphomeflasherError("Error while writing flash: {}".format(err))
esphomeflasher.common.EsphomeflasherError: Error while writing flash: Timed out waiting for packet content
Fabiens-Mac-Pro:~ fabiendostie$ esphomeflasher
objc[6200]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit (0x7fffa572a3f0) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x114a82f50). One of the two will be used. Which one is undefined.
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/esphomeflasher/gui.py", line 163, in run
    run_esphomeflasher(argv)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/esphomeflasher/__main__.py", line 158, in run_esphomeflasher
    esptool.write_flash(stub_chip, mock_args)
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/esptool.py", line 2414, in write_flash
    esp.flash_begin(0, 0)
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/esptool.py", line 569, in flash_begin
    self.check_command("enter Flash download mode", self.ESP_FLASH_BEGIN,
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/esptool.py", line 369, in check_command
    val, data = self.command(op, data, chk, timeout=timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/esptool.py", line 358, in command
    self._port.timeout = saved_timeout
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/serial/serialutil.py", line 372, in timeout
    self._reconfigure_port()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/serial/serialposix.py", line 517, in _reconfigure_port
    termios.tcsetattr(
termios.error: (22, 'Invalid argument')
Fabiens-Mac-Pro:~ fabiendostie$ esphomeflasher
objc[8296]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit (0x7fffa572a3f0) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x118a8ef50). One of the two will be used. Which one is undefined.
Fabiens-Mac-Pro:~ fabiendostie$ esptool.py 
esptool.py v2.8
usage: esptool [-h] [--chip {auto,esp8266,esp32}] [--port PORT] [--baud BAUD]
               [--before {default_reset,no_reset,no_reset_no_sync}]
               [--after {hard_reset,soft_reset,no_reset}] [--no-stub]
               [--trace] [--override-vddsdio [{1.8V,1.9V,OFF}]]
               {load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,chip_id,flash_id,read_flash_status,write_flash_status,read_flash,verify_flash,erase_flash,erase_region,version}
               ...

esptool.py v2.8 - ESP8266 ROM Bootloader Utility

positional arguments:
  {load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,chip_id,flash_id,read_flash_status,write_flash_status,read_flash,verify_flash,erase_flash,erase_region,version}
                        Run esptool {command} -h for additional help
    load_ram            Download an image to RAM and execute
    dump_mem            Dump arbitrary memory to disk
    read_mem            Read arbitrary memory location
    write_mem           Read-modify-write to arbitrary memory location
    write_flash         Write a binary blob to flash
    run                 Run application code in flash
    image_info          Dump headers from an application image
    make_image          Create an application image from binary files
    elf2image           Create an application image from ELF file
    read_mac            Read MAC address from OTP ROM
    chip_id             Read Chip ID from OTP ROM
    flash_id            Read SPI flash manufacturer and device ID
    read_flash_status   Read SPI flash status register
    write_flash_status  Write SPI flash status register
    read_flash          Read SPI flash content
    verify_flash        Verify a binary blob against flash
    erase_flash         Perform Chip Erase on SPI flash
    erase_region        Erase a region of the flash
    version             Print esptool version

optional arguments:
  -h, --help            show this help message and exit
  --chip {auto,esp8266,esp32}, -c {auto,esp8266,esp32}
                        Target chip type
  --port PORT, -p PORT  Serial port device
  --baud BAUD, -b BAUD  Serial port baud rate used when flashing/reading
  --before {default_reset,no_reset,no_reset_no_sync}
                        What to do before connecting to the chip
  --after {hard_reset,soft_reset,no_reset}, -a {hard_reset,soft_reset,no_reset}
                        What to do after esptool.py is finished
  --no-stub             Disable launching the flasher stub, only talk to ROM
                        bootloader. Some features will not be available.
  --trace, -t           Enable trace-level output of esptool.py interactions.
  --override-vddsdio [{1.8V,1.9V,OFF}]
                        Override ESP32 VDDSDIO internal voltage regulator (use
                        with care)
Fabiens-Mac-Pro:~ fabiendostie$ esptool.py erase_flash -a hard_reset
usage: esptool [-h] [--chip {auto,esp8266,esp32}] [--port PORT] [--baud BAUD]
               [--before {default_reset,no_reset,no_reset_no_sync}]
               [--after {hard_reset,soft_reset,no_reset}] [--no-stub]
               [--trace] [--override-vddsdio [{1.8V,1.9V,OFF}]]
               {load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,make_image,elf2image,read_mac,chip_id,flash_id,read_flash_status,write_flash_status,read_flash,verify_flash,erase_flash,erase_region,version}
               ...
esptool: error: unrecognized arguments: -a hard_reset
Fabiens-Mac-Pro:~ fabiendostie$ esptool.py erase_flash
esptool.py v2.8
Found 2 serial ports
Serial port /dev/cu.SLAB_USBtoUART
Connecting....
Detecting chip type... ESP32
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 9c:9c:1f:c7:74:38
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 3.5s
Hard resetting via RTS pin...
Fabiens-Mac-Pro:~ fabiendostie$ esphomeflasher
objc[14711]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit (0x7fffa572a3f0) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x119ca2f50). One of the two will be used. Which one is undefined.
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/esphomeflasher/gui.py", line 163, in run
    run_esphomeflasher(argv)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/esphomeflasher/__main__.py", line 158, in run_esphomeflasher
    esptool.write_flash(stub_chip, mock_args)
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/esptool.py", line 2374, in write_flash
    esp.flash_defl_block(block, seq, timeout=DEFAULT_TIMEOUT * ratio * 2)
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/esptool.py", line 104, in inner
    return func(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/esptool.py", line 671, in flash_defl_block
    self.check_command("write compressed data to flash after seq %d" % seq,
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/esptool.py", line 369, in check_command
    val, data = self.command(op, data, chk, timeout=timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/esptool.py", line 358, in command
    self._port.timeout = saved_timeout
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/serial/serialutil.py", line 372, in timeout
    self._reconfigure_port()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/serial/serialposix.py", line 517, in _reconfigure_port
    termios.tcsetattr(
termios.error: (22, 'Invalid argument')
Fabiens-Mac-Pro:~ fabiendostie$ 

One thing I forgot to mention, it would compile when the sensor wasn’t plugged on the esp32 but would not when it was. would actually make it crash when i tried booting whith the code cited above flashed on it…

I have been trying without success all day and night to get this running

Now i’m pretty confident of my yaml… Except i cant succeed to flash the damn code the esp wroom 32 s
on home assistant OR on my mac, even while holding the flash button…

I am literally pulling hair off my scalp at the moment, i am going completely nuts.
here is my yaml:

esphome:
  name: esp32test
  platform: ESP32
  board: nodemcu-32s


wifi:
  ssid: "xxxxxxxxx"
  password: "xxxxxxxxx"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Test Fallback Hotspot"
    password: "xxxxxxxxx"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: "xxxxxxxxx"

ota:
  password: "xxxxxxxxx"

i2c:
  sda: 21
  scl: 22
  scan: False


sensor:
  - platform: sht3xd
    temperature:
      name: "zone1 soil  Temperature"
    humidity:
      name: "zone1 soil Humidity"
    address: 0x44
    update_interval: 60s

here is the log from esphomeflasher:


Last login: Fri May 21 21:21:09 on ttys000
-bash: /Users/fabiendostie/.bash_profile: line 14: unexpected EOF while looking for matching `"'
-bash: /Users/fabiendostie/.bash_profile: line 15: syntax error: unexpected end of file
Fabiens-Mac-Pro:~ fabiendostie$ esphomeflasher
objc[30042]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/Versions/A/FinderKit (0x7fffa572a3f0) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x10e299f50). One of the two will be used. Which one is undefined.
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/esphomeflasher/__main__.py", line 119, in run_esphomeflasher
    stub_chip.change_baud(args.upload_baud_rate)
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/esptool.py", line 104, in inner
    return func(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/esptool.py", line 705, in change_baud
    self.command(self.ESP_CHANGE_BAUDRATE, struct.pack('<II', baud, second_arg))
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/esptool.py", line 347, in command
    p = self.read()
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/esptool.py", line 292, in read
    return next(self._slip_reader)
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/esptool.py", line 2045, in slip_reader
    raise FatalError("Timed out waiting for packet %s" % waiting_for)
esptool.FatalError: Timed out waiting for packet header

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/esphomeflasher/gui.py", line 163, in run
    run_esphomeflasher(argv)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/esphomeflasher/__main__.py", line 121, in run_esphomeflasher
    raise EsphomeflasherError("Error changing ESP upload baud rate: {}".format(err))
esphomeflasher.common.EsphomeflasherError: Error changing ESP upload baud rate: Timed out waiting for packet header

HA esphome logs:


2021-05-22 00:23:49 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.radarr_upcoming_media is taking over 10 seconds
2021-05-22 00:23:49 WARNING (SyncWorker_13) [custom_components.radarr_upcoming_media.sensor] Host 192.168.1.8 is not available
2021-05-22 00:24:16 WARNING (MainThread) [homeassistant.components.esphome] Can't connect to ESPHome API for esp32s1 (192.168.1.118): Timeout while waiting for API response!
2021-05-22 00:24:19 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.radarr_upcoming_media is taking over 10 seconds
2021-05-22 00:24:19 WARNING (SyncWorker_8) [custom_components.radarr_upcoming_media.sensor] Host 192.168.1.8 is not available

2021-05-22 00:22:49 WARNING (SyncWorker_13) [custom_components.radarr_upcoming_media.sensor] Host 192.168.1.8 is not available
2021-05-22 00:23:13 WARNING (MainThread) [homeassistant.components.esphome] Can't connect to ESPHome API for esp32s1 (192.168.1.118): Timeout while connecting to ('192.168.1.118', 6053)
2021-05-22 00:23:19 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.radarr_upcoming_media is taking over 10 seconds
2021-05-22 00:23:19 WARNING (SyncWorker_1) [custom_components.radarr_upcoming_media.sensor] Host 192.168.1.8 is not available

2021-05-21 23:21:31 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Deskjet 3050A J611 series [218C22]' for ipp integration not ready yet: Invalid response from API: Error occurred while communicating with IPP server.; Retrying in background
2021-05-21 23:21:37 WARNING (MainThread) [homeassistant.components.esphome] Can't connect to ESPHome API for esp32s1 (192.168.1.118): Error connecting to ('192.168.1.118', 6053): [Errno 113] Connect call failed ('192.168.1.118', 6053)
2021-05-21 23:21:37 WARNING (MainThread) [homeassistant.components.esphome] Can't connect to ESPHome API for ultrasonic (192.168.1.142): Error connecting to ('192.168.1.142', 6053): [Errno 113] Connect call failed ('192.168.1.142', 6053)

etc...

IT DOES FLASH WHEN nothing is plugged on it, then it goes green if there is nothing plugged on it but as soon as i plug something on it then put the power back on it doesn’t go green anymore. it stays red
This is insane.

My yaml validates, it uploads, goes green except when i plug the sensor on the appropriate pins which are these by the way:
RED: VCC, 3.3v GRND: BLack Yellow: (data/sda/12c) GPIO 21 green: clk/I2C: GPIO 22

i will actually loose some sleep on this, it’s driving me nuts.

ill try again on one of my esp8266 we’ll see…

I asked for the compile logs.

esphomeflasher does not compile, it uploads a .bin file that esphome has already compiled - this may be what you are missing!

Why are you this rude?

Is it not obvious that i dont know, i tried to give you what you were asking for, but i did make mistakes, i am not sure where to look for this specific log could you at least point me to it so that i learn something?

Its the vocabulary that i am missing, that is exactly what im doing uploading the .bin to the esp using usb because it does not work most of the time directly from esphome ( i thought we had discussed this earlier)
I can upload only if there is no sensors hooked on the esp32 if theres anything on it, the upload fails…
then after its the sa,me, if i un plug it, and plug it again without nothing hooked on it it goes green in HA if something is hooked/p[lugged on one of the gpio it does not work/go green in HA

what do you think it is, my Yaml is ok, the code works when nothing is plugged, its weird i find…

Tried it on one of my esp8266, same yaml , same results, when plugged in … it does not boot, as soon as i remove it, the node mcu boots and reads all attached sensors… so the problem is with that specific sensor + the config.

thoughts anyone?

I am not rude, you are. You tell me your code won’t compile. I ask you for the log of that. You won’t supply it. How do you expect help on that basis?

i do not know how to provide the log, i keep telling you. i dont have all the knowledge you have concerning HA. I corrected myself its a language thing I am french and i guess i didn’t express myself correctly, but you must have noticed i am not experienced!?!

Maybe you could have asked me: Do you know how to get the logs so that i can help you? That would have been a non-rude way of saying things.

I do not know hot to provide what you are asking for, can you help me by directing me to where this log is located like i’ve asked you twice to help me by directing me to where its located. Maybe you didn’t read all the messages I wrote… anyways. Sans rancunes! Like we say in french.

I am asking for help. could you please direct me to where I can find it so that i can get help?

Thanks

Then you that you connect them to

So have you switched the green and yellow?

Sda is green which you say that you connect to gpio 22 which is scl.

Should it not be connected to gpio21.

/Mattias

1 Like

When you compile in the UI the log appears in front of your eyes.

OMG, lemme try soon, i think you are right, I FEEL SOO dumb if that’s what this is… OMG!

i did provide this a few times too…
why are you so angry, i am just asking for help and making mistakes!?