esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 36 forks source link

NodeMCU v2 board with 10 Dallas temperature sensors #695

Closed poerlemans closed 3 years ago

poerlemans commented 5 years ago

I have setup a NodeMCU v2 board with 10 Dallas temperature sensors. Only 9 sensors are registrated. I don't know how to improve this. I tried "esp8266_store_log_strings_in_flash: false" in the config but this had no effect.

The vloerverwarming.yaml file and log file are given below:

Operating environment/Installation (Hass.io/Docker/pip/etc.): Ubuntu with docker containers

Ubuntu based docker system (15 containers) running on Intel NUC

ESP (ESP32/ESP8266, Board/Sonoff): ESP8266

Affected component: Dallas temperature sensors

Description of problem: Only 9 measurement are reported (10 sensors present). Does this has to do something with the message: "Message skipped because it was too big to fit in TCP buffer - This is only cosmetic"??

Problem-relevant YAML-configuration entries:

PASTE YAML FILE HERE

esphome:
  name: vloerverwarming
  platform: ESP8266
  board: nodemcuv2

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

# Enable logging
logger:
  level: DEBUG
  esp8266_store_log_strings_in_flash: false

# Enable Home Assistant API
api:

ota:
# Sync time with Home Assistant.
time:
  - platform: homeassistant
    id: homeassistant_time

 # Text sensors with general information.
text_sensor:
  # Expose ESPHome version as sensor.
  - platform: version
    name: Vloerverwarming ESPHome Version
  # Expose WiFi information as sensors.
  - platform: wifi_info
    ip_address:
      name: Vloerverwarming IP
    ssid:
      name: Vloerverwarming SSID
    bssid:
      name: Vloerverwarming BSSID

# Example configuration entry
dallas:
  - pin: D5

# Individual sensors 
sensor:
  - platform: dallas
    address: 0x8f0214635fa6ff28
    name: "Ketelwater, in"
    unit_of_measurement: "°C"
  - platform: dallas
    address: 0x870314621cf6ff28
    name: "Ketelwater, uit"
    unit_of_measurement: "°C"
  - platform: dallas
    address: 0xf3021463029cff28
    name: "Woonkamer 1, in"
    unit_of_measurement: "°C"
  - platform: dallas
    address: 0xa20214635fb1ff28
    name: "Woonkamer 1, uit"
    unit_of_measurement: "°C"
  - platform: dallas
    address: 0x74021463604fff28
    name: "Woonkamer 2, uit"
    unit_of_measurement: "°C"
  - platform: dallas
    address: 0xa902146302b2ff28
    name: "Keuken 1, in"
    unit_of_measurement: "°C"
  - platform: dallas
    address: 0x3202146361b0ff28
    name: "Keuken 1, uit"
    unit_of_measurement: "°C"
  - platform: dallas
    address: 0xf10314557369ff28
    name: "Keuken 2, uit"
    unit_of_measurement: "°C"
  - platform: dallas
    address: 0x8f0214635fa6ff28
    name: "Kelder, in"
    unit_of_measurement: "°C"
  - platform: dallas
    address: 0x9a0314558320ff28
    name: "Kelder, uit"
    unit_of_measurement: "°C"

# Sensors with general information.  
  # Uptime sensor.
  - platform: uptime
    name: Vloerverwarming Uptime

  # WiFi Signal sensor.
  - platform: wifi_signal
    name: Vloerverwarming WiFi Signal
    update_interval: 60s

Logs (if applicable):

INFO Reading configuration...
INFO Detected timezone 'CET' with UTC offset 1 and daylight savings time from 03/29/20 02:00:00 to 10/25/20 03:00:00
INFO Starting log output from vloerverwarming.local using esphome API
INFO Connecting to vloerverwarming.local:6053 (192.168.1.33)
INFO Successfully connected to vloerverwarming.local
[09:26:45][D][time:030]: Synchronized time: Fri Sep 27 09:26:45 2019
[09:26:45][I][app:096]: esphome version 1.13.6 compiled on Sep 26 2019, 22:12:48
[09:26:45][C][wifi:372]: WiFi:
[09:26:45][C][wifi:254]:   SSID: [redacted]
[09:26:45][C][wifi:255]:   IP Address: 192.168.1.33
[09:26:45][C][wifi:257]:   BSSID: [redacted]
[09:26:45][C][wifi:258]:   Hostname: 'vloerverwarming'
[09:26:45][C][wifi:262]:   Signal strength: -70 dB ▂▄▆█
[09:26:45][C][wifi:263]:   Channel: 4
[09:26:45][C][wifi:264]:   Subnet: 255.255.255.0
[09:26:45][C][wifi:265]:   Gateway: 192.168.1.1
[09:26:45][C][wifi:266]:   DNS1: 192.168.1.1
[09:26:45][C][wifi:267]:   DNS2: 0.0.0.0
[09:26:45][C][logger:137]: Logger:
[09:26:45][C][logger:138]:   Level: DEBUG
[09:26:45][C][logger:139]:   Log Baud Rate: 115200
[09:26:45][C][logger:140]:   Hardware UART: UART0
[09:26:45][C][homeassistant.time:010]: Home Assistant Time:
[09:26:45][C][homeassistant.time:011]:   Timezone: 'CET-1CEST-2,M3.5.0/2,M10.4.0/3'
[09:26:45][C][version.text_sensor:015]: Version Text Sensor 'Vloerverwarming ESPHome Version'
[09:26:45][C][version.text_sensor:015]:   Icon: 'mdi:new-box'
[09:26:45][C][dallas.sensor:070]: DallasComponent:
[09:26:45][C][dallas.sensor:071]:   Pin: GPIO14 (Mode: INPUT)
[09:26:45][C][dallas.sensor:072]:   Update Interval: 60.0s
[09:26:45][D][dallas.sensor:077]:   Found sensors:
[09:26:45][D][dallas.sensor:080]:     0x9A0314558320FF28
[09:26:45][D][dallas.sensor:080]:     0x3202146361B0FF28
[09:26:45][D][dallas.sensor:080]:     0xF3021463029CFF28
[09:26:45][D][dallas.sensor:080]:     0xA902146302B2FF28
[09:26:45][D][dallas.sensor:080]:     0x8F0214635FA6FF28
[09:26:45][D][dallas.sensor:080]:     0x870314621CF6FF28
[09:26:45][D][dallas.sensor:080]:     0xBB021463021EFF28
[09:26:45][D][dallas.sensor:080]:     0xA20214635FB1FF28
[09:26:45][D][dallas.sensor:080]:     0xF10314557369FF28
[09:26:45][D][dallas.sensor:080]:     0x74021463604FFF28
[09:26:45][C][dallas.sensor:085]:   Device 'Ketelwater, in'
[09:26:45][C][dallas.sensor:085]:     Unit of Measurement: '°C'
[09:26:45](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic)
[09:26:45][C][dallas.sensor:085]:     Icon: 'mdi:thermometer'
[09:26:45][C][dallas.sensor:093]:     Address: 0x8F0214635FA6FF28
[09:26:45][C][dallas.sensor:094]:     Resolution: 12
[09:26:45][C][dallas.sensor:085]:   Device 'Ketelwater, uit'
[09:26:45][C][dallas.sensor:085]:     Unit of Measurement: '°C'
[09:26:45][C][dallas.sensor:085]:     Accuracy Decimals: 1
[09:26:45][C][dallas.sensor:085]:     Icon: 'mdi:thermometer'
[09:26:45][C][dallas.sensor:093]:     Address: 0x870314621CF6FF28
[09:26:45][C][dallas.sensor:094]:     Resolution: 12
[09:26:45][C][dallas.sensor:085]:   Device 'Woonkamer 1, in'
[09:26:45][C][dallas.sensor:085]:     Unit of Measurement: '°C'
[09:26:45][C][dallas.sensor:085]:     Accuracy Decimals: 1
[09:26:45][C][dallas.sensor:085]:     Icon: 'mdi:thermometer'
[09:26:45][C][dallas.sensor:093]:     Address: 0xF3021463029CFF28
[09:26:45][C][dallas.sensor:094]:     Resolution: 12
[09:26:45][C][dallas.sensor:085]:   Device 'Woonkamer 1, uit'
[09:26:45][C][dallas.sensor:085]:     Unit of Measurement: '°C'
[09:26:45][C][dallas.sensor:085]:     Accuracy Decimals: 1
[09:26:45][C][dallas.sensor:085]:     Icon: 'mdi:thermometer'
[09:26:45][C][dallas.sensor:093]:     Address: 0xA20214635FB1FF28
[09:26:45][C][dallas.sensor:094]:     Resolution: 12
[09:26:45][C][dallas.sensor:085]:   Device 'Woonkamer 2, uit'
[09:26:45][C][dallas.sensor:085]:     Unit of Measurement: '°C'
[09:26:45][C][dallas.sensor:085]:     Accuracy Decimals: 1
[09:26:45][C][dallas.sensor:085]:     Icon: 'mdi:thermometer'
[09:26:45][C][dallas.sensor:093]:     Address: 0x74021463604FFF28
[09:26:45][C][dallas.sensor:094]:     Resolution: 12
[09:26:45][C][dallas.sensor:085]:   Device 'Keuken 1, in'
[09:26:45][C][dallas.sensor:085]:     Unit of Measurement: '°C'
[09:26:45][C][dallas.sensor:085]:     Accuracy Decimals: 1
[09:26:45][C][dallas.sensor:085]:     Icon: 'mdi:thermometer'
[09:26:45][C][dallas.sensor:093]:     Address: 0xA902146302B2FF28
[09:26:45][C][dallas.sensor:094]:     Resolution: 12
[09:26:45][C][dallas.sensor:085]:   Device 'Keuken 1, uit'
[09:26:45][C][dallas.sensor:085]:     Unit of Measurement: '°C'
[09:26:45][C][dallas.sensor:085]:     Accuracy Decimals: 1
[09:26:45][C][dallas.sensor:085]:     Icon: 'mdi:thermometer'
[09:26:45][C][dallas.sensor:093]:     Address: 0x3202146361B0FF28
[09:26:45][C][dallas.sensor:094]:     Resolution: 12
[09:26:45][C][dallas.sensor:085]:   Device 'Keuken 2, uit'
[09:26:45][C][dallas.sensor:085]:     Unit of Measurement: '°C'
[09:26:45][C][dallas.sensor:085]:     Accuracy Decimals: 1
[09:26:45][C][dallas.sensor:085]:     Icon: 'mdi:thermometer'
[09:26:45][C][dallas.sensor:093]:     Address: 0xF10314557369FF28
[09:26:45][C][dallas.sensor:094]:     Resolution: 12
[09:26:45][C][dallas.sensor:085]:   Device 'Kelder, in'
[09:26:45][C][dallas.sensor:085]:     Unit of Measurement: '°C'
[09:26:45][C][dallas.sensor:085]:     Accuracy Decimals: 1
[09:26:45][C][dallas.sensor:085]:     Icon: 'mdi:thermometer'
[09:26:45][C][dallas.sensor:093]:     Address: 0x8F0214635FA6FF28
[09:26:45][C][dallas.sensor:094]:     Resolution: 12
[09:26:45][C][dallas.sensor:085]:   Device 'Kelder, uit'
[09:26:45][C][dallas.sensor:085]:     Unit of Measurement: '°C'
[09:26:45][C][dallas.sensor:085]:     Accuracy Decimals: 1
[09:26:45][C][dallas.sensor:085]:     Icon: 'mdi:thermometer'
[09:26:45][C][dallas.sensor:093]:     Address: 0x9A0314558320FF28
[09:26:45][C][dallas.sensor:094]:     Resolution: 12
[09:26:45][D][sensor:092]: 'Vloerverwarming WiFi Signal': Sending state -72.00000 dB with 0 decimals of accuracy
[09:26:45][C][ota:029]: Over-The-Air Updates:
[09:26:45][C][ota:030]:   Address: vloerverwarming.local:8266
[09:26:45][C][api:103]: API Server:
[09:26:45][C][api:104]:   Address: vloerverwarming.local:6053
[09:26:45][C][wifi_signal.sensor:009]: WiFi Signal 'Vloerverwarming WiFi Signal'
[09:26:45][C][wifi_signal.sensor:009]:   Unit of Measurement: 'dB'
[09:26:45][C][wifi_signal.sensor:009]:   Accuracy Decimals: 0
[09:26:45][C][wifi_signal.sensor:009]:   Icon: 'mdi:wifi'
[09:27:01][D][dallas.sensor:144]: 'Ketelwater, uit': Got Temperature=21.3°C
[09:27:01][D][sensor:092]: 'Ketelwater, uit': Sending state 21.31250 °C with 1 decimals of accuracy
[09:27:01][D][dallas.sensor:144]: 'Woonkamer 1, in': Got Temperature=19.3°C
[09:27:01][D][sensor:092]: 'Woonkamer 1, in': Sending state 19.31250 °C with 1 decimals of accuracy
[09:27:01][D][dallas.sensor:144]: 'Woonkamer 1, uit': Got Temperature=19.0°C
[09:27:01][D][sensor:092]: 'Woonkamer 1, uit': Sending state 19.00000 °C with 1 decimals of accuracy
[09:27:01][D][dallas.sensor:144]: 'Woonkamer 2, uit': Got Temperature=19.0°C
[09:27:01][D][sensor:092]: 'Woonkamer 2, uit': Sending state 19.00000 °C with 1 decimals of accuracy
[09:27:01][D][dallas.sensor:144]: 'Keuken 1, in': Got Temperature=18.9°C
[09:27:01][D][sensor:092]: 'Keuken 1, in': Sending state 18.87500 °C with 1 decimals of accuracy
[09:27:01][D][dallas.sensor:144]: 'Keuken 1, uit': Got Temperature=19.1°C
[09:27:01](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic)
[09:27:01][D][dallas.sensor:144]: 'Keuken 2, uit': Got Temperature=18.6°C
[09:27:01][D][sensor:092]: 'Keuken 2, uit': Sending state 18.62500 °C with 1 decimals of accuracy
[09:27:01][D][dallas.sensor:144]: 'Kelder, in': Got Temperature=19.7°C
[09:27:01][D][sensor:092]: 'Kelder, in': Sending state 19.68750 °C with 1 decimals of accuracy
[09:27:01][D][dallas.sensor:144]: 'Kelder, uit': Got Temperature=19.4°C
[09:27:01][D][sensor:092]: 'Kelder, uit': Sending state 19.37500 °C with 1 decimals of accuracy
[09:27:44][D][sensor:092]: 'Vloerverwarming Uptime': Sending state 40481.94531 s with 0 decimals of accuracy
[09:27:45][D][sensor:092]: 'Vloerverwarming WiFi Signal': Sending state -71.00000 dB with 0 decimals of accuracy
[09:28:01][D][dallas.sensor:144]: 'Ketelwater, uit': Got Temperature=21.3°C
[09:28:01][D][sensor:092]: 'Ketelwater, uit': Sending state 21.31250 °C with 1 decimals of accuracy
[09:28:01][D][dallas.sensor:144]: 'Woonkamer 1, in': Got Temperature=19.2°C
[09:28:01][D][sensor:092]: 'Woonkamer 1, in': Sending state 19.25000 °C with 1 decimals of accuracy
[09:28:01][D][dallas.sensor:144]: 'Woonkamer 1, uit': Got Temperature=18.9°C
[09:28:01][D][sensor:092]: 'Woonkamer 1, uit': Sending state 18.93750 °C with 1 decimals of accuracy
[09:28:01][D][dallas.sensor:144]: 'Woonkamer 2, uit': Got Temperature=18.9°C
[09:28:01][D][sensor:092]: 'Woonkamer 2, uit': Sending state 18.93750 °C with 1 decimals of accuracy
[09:28:01][D][dallas.sensor:144]: 'Keuken 1, in': Got Temperature=18.9°C
[09:28:01][D][sensor:092]: 'Keuken 1, in': Sending state 18.87500 °C with 1 decimals of accuracy
[09:28:01][D][dallas.sensor:144]: 'Keuken 1, uit': Got Temperature=19.1°C
[09:28:01](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic)
[09:28:01][D][dallas.sensor:144]: 'Keuken 2, uit': Got Temperature=18.7°C
[09:28:01](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic)
[09:28:01][D][dallas.sensor:144]: 'Kelder, in': Got Temperature=19.7°C
[09:28:01][D][sensor:092]: 'Kelder, in': Sending state 19.68750 °C with 1 decimals of accuracy
[09:28:01][D][dallas.sensor:144]: 'Kelder, uit': Got Temperature=19.4°C
[09:28:01][D][sensor:092]: 'Kelder, uit': Sending state 19.37500 °C with 1 decimals of accuracy
[09:28:44][D][sensor:092]: 'Vloerverwarming Uptime': Sending state 40541.94531 s with 0 decimals of accuracy
[09:28:45][D][sensor:092]: 'Vloerverwarming WiFi Signal': Sending state -71.00000 dB with 0 decimals of accuracy
[09:29:01][D][dallas.sensor:144]: 'Ketelwater, uit': Got Temperature=21.3°C
[09:29:01][D][sensor:092]: 'Ketelwater, uit': Sending state 21.31250 °C with 1 decimals of accuracy

Additional information and things you've tried:

glmnet commented 5 years ago

Only 9 out of 10 working is actually an achievement already.

poerlemans commented 5 years ago

It's always the same sensor that fails. It is the sensor "Ketelwater, in". This sensor is detected (see the logs), but is always combined with the message: "Message skipped because it was too big to fit in TCP buffer - This is only cosmetic". The same set of sensors was functioning quit well with an EspEasy firmware. The wiring was not changed when going from EspEasy to EspHome. I was already thinking to go for an extra hub on the NodeMCU board, but there might be a solution for my problem with the actual setup. I didn't observed somewhere a remark that there is a maximum on the number of temperature sensors.

poerlemans commented 5 years ago

I tried a lot to overcome my problem. Nothing helped! I went back to EspEasy and all 10 temperature sensors came online immediately. If someone has suggestions: I'm still open for tests.

glmnet commented 5 years ago

I believe there are dallas sensors ESPHome just cannot handle, do you have the possibility of changing that one not working with another sensor?

poerlemans commented 5 years ago

The 10 DS18B20 sensors are all the same (waterproof sensors with cable of about 1 meter; see: https://www.hobbyelectronica.nl/product/ds18b20-waterdicht/). As I wrote already, it's always the same sensor (the first in a serie of 10 identical sensors; see the logs) that is causing the troubles. I have no other DS18B20 sensors here, so it's difficult for me to carry out test.

glmnet commented 5 years ago

Yes I understand what you say makes sense, however there are several reports of those sensors "randomly" not working, randomly here means you just don't know the cause.

poerlemans commented 5 years ago

Oke, it might have to do with malfunctioning of this troubleful sensor. But should EspEasy be more friendly with respect to this troubleful sensor? All 10 sensors are operating now without any trouble on the EspEasy operating system.

glmnet commented 5 years ago

My best bet is that ESPHome has an issue that causes some dallas sensors to not work. Figuring out the issue is not easy, the programmer would need one of this trouble sensors to figure out what's going wrong.

OttoWinter commented 5 years ago

One option would be that it's the internal pullups ESPHome enables - I don't believe other FWs do that. ESPHome enables the internal pullups on the ESP to support parasitic power mode. Maybe that is somehow interfering with the dallas sensors.

lwqcz commented 4 years ago

My 50 cents, I have like 10 years of experience with 1 wire ...

Maxim 1wire guidelines are good to study anyway: https://www.maximintegrated.com/en/design/technical-documents/tutorials/1/148.html

Answers to these question could be useful:

  1. What kind of cables do you use?
  2. What kind of interconnecting clamps do you use?
  3. What is the topology and length of the 1wire bus?
  4. Do you use a parasitic power supply?
poerlemans commented 4 years ago

As already described above (reaction 6), I use 10 identical DS18B20 waterproof sensors (see link above). Cable length for each sensor about 1 meter. The 10 power lines (3.3V), the 10 digital data lines and the 10 zero Volt lines are soldered and three lines are connected to the NodeMCU. Between the data line and the 3.3V line a resistor of 4700 Ohm is soldered. I think it can be described as star topology Power to the sensors is provided by the NodeMCU 3.3V connection

brandond commented 4 years ago

I would definitely read the document that @lwqcz linked. In particular:

Precautions with Star Topologies Testing has shown that unswitched star-type network topologies (i.e., those with several branches diverging at the master) are the most difficult to make reliable. The junction of various branches presents highly mismatched impedances; reflections from the end of one branch can travel distances equal to nearly the weight of the network (rather than the radius) and cause data errors. For this reason, the unswitched star topology is not recommended, and no guarantees can be made about its performance.

If you're going to try to run a bunch of devices with long wire lengths, I would definitely power them from the 5v Vin from the USB port, rather than trying to use the onboard 3v3 regulator. The regulator is frequently of low quality and cannot supply reliable power when you start adding more chips beyond just the esp.

poerlemans commented 4 years ago

Oke, you might have be right. But I now have the NodeMCU loaded with EspEasy firmware and I obtain in this situation very reliable temperature data. No disturbances or unrealistic sata at all!

lwqcz commented 4 years ago

No disturbances or unrealistic sata at all!

But do you use some kind of debug mode? Glitches could be simply filtered out. For further debugging, an oscilloscope would be rather useful. I would recommend a better 3V3 power supply and tree type bus instead of star topology.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.