esphome / issues

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

PZEM-004T V3 Modbus CRC Check failed! #2158

Closed Pelbru closed 3 years ago

Pelbru commented 3 years ago

Operating system : Debian GNU/Linux 10 (buster) Version Docker 20.10.6 Supervisor Version supervisor-2021.06.3 Core Version core-2021.6.5

ESP8266 NodeMcu

ESPHome v .19.1

Affected component: https://esphome.io/components/sensor/pzemac.html

Description of problem: 3 pzem addressed respectively 1, 2 and 3 are on the bus. No increase in U, I, W values. Modbus CRC Check failed! in the logs

YAML-configuration:

esphome: name: pzem_ecs platform: ESP8266 board: nodemcuv2

wifi: ssid: "secret! esphome_ssid" password: "secret! esphome_password"

Enable fallback hotspot (captive portal) in case wifi connection fails

ap: ssid: "Pzem Ecs Fallback Hotspot" password: "GZVhGXrhstXD"

captive_portal:

Enable logging

logger: level: debug baud_rate: 0

Enable Home Assistant API

api:

ota:

uart:

modbus:

id: mbus

uart_id: ubus

time: platform: homeassistant id: homeassistant_time

on_time:

sensor:

 #### PZEM-004T V3 ####
 ##################################################################################
 #### Phase 1 ####

##################################################################################

Phase 2

switch:

binary_sensor:

Text sensors with general information.

text_sensor:

Expose ESPHome version as sensor.

Sensor to display uptime in Days/hours/minutes

LOGS:

INFO Reading configuration /config/esphome/pzem_ecs.yaml... INFO Detected timezone 'CET' with UTC offset 1 and daylight saving time from 27 March 02:00:00 to 30 October 03:00:00 INFO Starting log output from pzem_ecs.local using esphome API INFO Connecting to pzem_ecs.local:6053 (192.168.0.31) INFO Successfully connected to pzem_ecs.local [23:15:00][I][app:105]: ESPHome version 1.19.1 compiled on Jun 19 2021, 22:54:57

[23:15:00][C][wifi:344]: SSID: [redacted] [23:15:00][C][wifi:345]: IP Address: 192.168.0.31 [23:15:00][C][wifi:347]: BSSID: [redacted]

[23:15:00][C][wifi:352]: Signal strength: -54 dB ▂▄▆█ [23:15:00][C][wifi:356]: Channel: 1 [23:15:00][C][wifi:357]: Subnet: 255.255.255.0 [23:15:00][C][wifi:358]: Gateway: 192.168.0.254 [23:15:00][C][wifi:359]: DNS1: 192.168.0.250

[23:15:00][C][uart_esp8266:075]: UART Bus: [23:15:00][C][uart_esp8266:077]: TX Pin: GPIO1 [23:15:00][C][uart_esp8266:080]: RX Pin: GPIO3 [23:15:00][C][uart_esp8266:081]: RX Buffer Size: 256 [23:15:00][C][uart_esp8266:083]: Baud Rate: 9600 baud [23:15:00][C][uart_esp8266:084]: Data Bits: 8 [23:15:00][C][uart_esp8266:085]: Parity: NONE [23:15:00][C][uart_esp8266:086]: Stop bits: 2 [23:15:00][C][uart_esp8266:088]: Using hardware serial interface.

[23:15:00][C][template.sensor:021]: Template Sensor 'Energie cumulée Ph1' [23:15:00][C][template.sensor:021]: State Class: '' [23:15:00][C][template.sensor:021]: Unit of Measurement: 'kWh' [23:15:00][C][template.sensor:021]: Accuracy Decimals: 1

[23:15:00][C][template.sensor:022]: Update Interval: 5.0s [23:15:00][C][template.sensor:021]: Template Sensor 'Consommation Ph1 de la veille' [23:15:00][C][template.sensor:021]: State Class: '' [23:15:00][C][template.sensor:021]: Unit of Measurement: 'kwh' [23:15:00][C][template.sensor:021]: Accuracy Decimals: 2

[23:15:00][C][template.sensor:022]: Update Interval: 10.0s [23:15:00][C][template.sensor:021]: Template Sensor 'Puissance Apparente Ph1' [23:15:00][C][template.sensor:021]: State Class: '' [23:15:00][C][template.sensor:021]: Unit of Measurement: 'VA' [23:15:00][C][template.sensor:021]: Accuracy Decimals: 2

[23:15:00][C][template.sensor:022]: Update Interval: 10.0s [23:15:00][C][template.sensor:021]: Template Sensor 'Puissance Réactive Ph1' [23:15:00][C][template.sensor:021]: State Class: '' [23:15:00][C][template.sensor:021]: Unit of Measurement: 'VAr' [23:15:00][C][template.sensor:021]: Accuracy Decimals: 2

[23:15:00][C][template.sensor:022]: Update Interval: 10.0s [23:15:00][C][template.sensor:021]: Template Sensor 'Energie cumulée Ph2' [23:15:00][C][template.sensor:021]: State Class: '' [23:15:00][C][template.sensor:021]: Unit of Measurement: 'kWh' [23:15:00][C][template.sensor:021]: Accuracy Decimals: 1

[23:15:00][C][template.sensor:022]: Update Interval: 5.0s [23:15:00][C][template.sensor:021]: Template Sensor 'Consommation Ph2 de la veille' [23:15:00][C][template.sensor:021]: State Class: '' [23:15:00][C][template.sensor:021]: Unit of Measurement: 'kwh' [23:15:00][C][template.sensor:021]: Accuracy Decimals: 2

[23:15:00][C][template.sensor:022]: Update Interval: 10.0s [23:15:00][C][template.sensor:021]: Template Sensor 'Puissance Apparente Ph2' [23:15:00][C][template.sensor:021]: State Class: '' [23:15:00][C][template.sensor:021]: Unit of Measurement: 'VA' [23:15:00][C][template.sensor:021]: Accuracy Decimals: 2

[23:15:00][C][template.sensor:022]: Update Interval: 10.0s [23:15:00][C][template.sensor:021]: Template Sensor 'Puissance Réactive Ph2' [23:15:00][C][template.sensor:021]: State Class: '' [23:15:00][C][template.sensor:021]: Unit of Measurement: 'VAr' [23:15:00][C][template.sensor:021]: Accuracy Decimals: 2

[23:15:00][C][template.sensor:022]: Update Interval: 10.0s [23:15:00][C][template.sensor:021]: Template Sensor 'Energie cumulée Ph3' [23:15:00][C][template.sensor:021]: State Class: '' [23:15:00][C][template.sensor:021]: Unit of Measurement: 'kWh' [23:15:00][C][template.sensor:021]: Accuracy Decimals: 1

[23:15:00][C][template.sensor:022]: Update Interval: 5.0s [23:15:00][C][template.sensor:021]: Template Sensor 'Consommation Ph3 de la veille' [23:15:00][C][template.sensor:021]: State Class: '' [23:15:00][C][template.sensor:021]: Unit of Measurement: 'kwh' [23:15:00][C][template.sensor:021]: Accuracy Decimals: 2

[23:15:00][C][template.sensor:022]: Update Interval: 10.0s [23:15:00][C][template.sensor:021]: Template Sensor 'Puissance Apparente Ph3' [23:15:00][C][template.sensor:021]: State Class: '' [23:15:00][C][template.sensor:021]: Unit of Measurement: 'VA' [23:15:00][C][template.sensor:021]: Accuracy Decimals: 2

[23:15:00][C][template.sensor:022]: Update Interval: 10.0s [23:15:00][C][template.sensor:021]: Template Sensor 'Puissance Réactive Ph3' [23:15:00][C][template.sensor:021]: State Class: '' [23:15:00][C][template.sensor:021]: Unit of Measurement: 'VAr' [23:15:00][C][template.sensor:021]: Accuracy Decimals: 2

[23:15:00][C][template.sensor:022]: Update Interval: 10.0s [23:15:00][D][sensor:117]: 'Puissance Wifi Pzem': Sending state -54.00000 dBm with 0 decimals of accuracy [23:15:00][W][modbus:079]: Modbus CRC Check failed! C011!=1000 [23:15:00][C][template.sensor:021]: Template Sensor 'Puissance Totale' [23:15:00][C][template.sensor:021]: State Class: '' [23:15:00][C][template.sensor:021]: Unit of Measurement: 'W' [23:15:00][C][template.sensor:021]: Accuracy Decimals: 2

[23:15:00][C][template.sensor:022]: Update Interval: 10.0s [23:15:00][C][template.sensor:021]: Template Sensor 'Consommation de la veille' [23:15:00][C][template.sensor:021]: State Class: '' [23:15:00][C][template.sensor:021]: Unit of Measurement: 'kwh' [23:15:00][C][template.sensor:021]: Accuracy Decimals: 2

[23:15:00][C][template.sensor:022]: Update Interval: 10.0s [23:15:00][C][uptime.sensor:030]: Uptime Sensor 'Up' [23:15:00][C][uptime.sensor:030]: State Class: '' [23:15:00][C][uptime.sensor:030]: Unit of Measurement: 's' [23:15:00][C][uptime.sensor:030]: Accuracy Decimals: 0

[23:15:00][C][template.text_sensor:020]: Template Sensor 'Uptime Pzem FCS'

[23:15:00][C][logger:190]: Level: DEBUG [23:15:00][C][logger:191]: Log Baud Rate: 0 [23:15:00][C][logger:192]: Hardware UART: UART0

[23:15:00][C][pzemac:067]: Address: 0x01

[23:15:00][C][pzemac:068]: Device Class: 'voltage' [23:15:00][C][pzemac:068]: State Class: 'measurement' [23:15:00][C][pzemac:068]: Unit of Measurement: 'V' [23:15:00][C][pzemac:068]: Accuracy Decimals: 2

[23:15:00][C][pzemac:069]: Device Class: 'current' [23:15:00][C][pzemac:069]: State Class: 'measurement' [23:15:00][C][pzemac:069]: Unit of Measurement: 'A' [23:15:00][C][pzemac:069]: Accuracy Decimals: 2

[23:15:00][C][pzemac:070]: Device Class: 'power' [23:15:00][C][pzemac:070]: State Class: 'measurement' [23:15:00](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic) [23:15:00](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic) [23:15:00](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic) [23:15:00](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic) [23:15:00](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic) [23:15:00](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic) [23:15:00](Message skipped because it was too big to fit in TCP buffer - This is only cosmetic) [23:15:00][C][pzemac:073]: Power Factor 'Facteur de puissance Ph1' [23:15:00][C][pzemac:073]: Device Class: 'power_factor' [23:15:00][C][pzemac:073]: State Class: 'measurement' [23:15:00][C][pzemac:073]: Unit of Measurement: '' [23:15:00][C][pzemac:073]: Accuracy Decimals: 2 [23:15:00][D][text_sensor:015]: 'Uptime Pzem FCS': Sending state '0j 00h 19m 36s' [23:15:00][C][total_daily_energy:022]: Total Daily Energy 'Consommation Ph1 du jour' [23:15:00][C][total_daily_energy:022]: State Class: '' [23:15:00][C][total_daily_energy:022]: Unit of Measurement: 'kWh' [23:15:00][C][total_daily_energy:022]: Accuracy Decimals: 2

[23:15:00][C][pzemac:067]: Address: 0x02

[23:15:00][C][pzemac:068]: Device Class: 'voltage' [23:15:00][C][pzemac:068]: State Class: 'measurement' [23:15:00][C][pzemac:068]: Unit of Measurement: 'V' [23:15:00][C][pzemac:068]: Accuracy Decimals: 2

[23:15:00][C][pzemac:069]: Device Class: 'current' [23:15:00][C][pzemac:069]: State Class: 'measurement' [23:15:00][C][pzemac:069]: Unit of Measurement: 'A' [23:15:00][C][pzemac:069]: Accuracy Decimals: 2

[23:15:00][C][pzemac:070]: Device Class: 'power' [23:15:00][C][pzemac:070]: State Class: 'measurement' [23:15:00][C][pzemac:070]: Unit of Measurement: 'W' [23:15:00][C][pzemac:070]: Accuracy Decimals: 2

[23:15:00][C][pzemac:071]: Device Class: 'energy' [23:15:00][C][pzemac:071]: State Class: '' [23:15:00][C][pzemac:071]: Unit of Measurement: 'Wh' [23:15:00][C][pzemac:071]: Accuracy Decimals: 1

[23:15:00][C][pzemac:072]: State Class: 'measurement' [23:15:00][C][pzemac:072]: Unit of Measurement: 'Hz' [23:15:00][C][pzemac:072]: Accuracy Decimals: 2

[23:15:00][C][pzemac:073]: Power Factor 'Facteur de puissance Ph2' [23:15:00][C][pzemac:073]: Device Class: 'power_factor' [23:15:00][C][pzemac:073]: State Class: 'measurement' [23:15:00][C][pzemac:073]: Unit of Measurement: '' [23:15:00][C][pzemac:073]: Accuracy Decimals: 2 [23:15:00][C][total_daily_energy:022]: Total Daily Energy 'Consommation Ph2 du jour' [23:15:00][C][total_daily_energy:022]: State Class: '' [23:15:00][C][total_daily_energy:022]: Unit of Measurement: 'kWh' [23:15:00][C][total_daily_energy:022]: Accuracy Decimals: 2

[23:15:00][C][pzemac:067]: Address: 0x03

[23:15:00][C][pzemac:068]: Device Class: 'voltage' [23:15:00][C][pzemac:068]: State Class: 'measurement' [23:15:00][C][pzemac:068]: Unit of Measurement: 'V' [23:15:00][C][pzemac:068]: Accuracy Decimals: 2

[23:15:00][C][pzemac:069]: Device Class: 'current' [23:15:00][C][pzemac:069]: State Class: 'measurement' [23:15:00][C][pzemac:069]: Unit of Measurement: 'A' [23:15:00][C][pzemac:069]: Accuracy Decimals: 2 [23:15:00][C][pzemac:073]: Power Factor 'Facteur de puissance Ph3' [23:15:00][C][pzemac:073]: Device Class: 'power_factor' [23:15:00][C][pzemac:073]: State Class: 'measurement' [23:15:00][C][pzemac:073]: Unit of Measurement: '' [23:15:00][C][pzemac:073]: Accuracy Decimals: 2 [23:15:00][C][total_daily_energy:022]: Total Daily Energy 'Consommation Ph3 du jour' [23:15:00][C][total_daily_energy:022]: State Class: '' [23:15:00][C][total_daily_energy:022]: Unit of Measurement: 'kWh' [23:15:00][C][total_daily_energy:022]: Accuracy Decimals: 2

[23:15:00][C][total_daily_energy:022]: Total Daily Energy 'Consommation du jour' [23:15:00][C][total_daily_energy:022]: State Class: '' [23:15:00][C][total_daily_energy:022]: Unit of Measurement: 'kWh' [23:15:00][C][total_daily_energy:022]: Accuracy Decimals: 2

[23:15:00][C][restart:021]: Restart Switch 'Restart Pzem ECS'

[23:15:00][C][status:034]: Status Binary Sensor 'status Pzem ECS' [23:15:00][C][status:034]: Device Class: 'connectivity' [23:15:00][C][version.text_sensor:021]: Version Text Sensor 'Version Pzem ECS'

[23:15:00][C][homeassistant.time:010]: Home Assistant Time:

[23:15:00][C][captive_portal:148]: Captive Portal: [23:15:00][C][ota:029]: Over-The-Air Updates: [23:15:00][C][ota:030]: Address: pzem_ecs.local:8266 [23:15:00][C][api:095]: API Server: [23:15:00][C][api:096]: Address: pzem_ecs.local:6053 [23:15:00][C][wifi_signal.sensor:009]: WiFi Signal 'Puissance Wifi Pzem' [23:15:00][C][wifi_signal.sensor:009]: Device Class: 'signal_strength' [23:15:00][C][wifi_signal.sensor:009]: State Class: 'measurement' [23:15:00][C][wifi_signal.sensor:009]: Unit of Measurement: 'dBm' [23:15:00][C][wifi_signal.sensor:009]: Accuracy Decimals: 0 [23:15:00][D][sensor:117]: 'Energie cumulée Ph1': Sending state nan kWh with 1 decimals of accuracy [23:15:02][D][sensor:117]: 'Energie cumulée Ph2': Sending state nan kWh with 1 decimals of accuracy [23:15:02][D][sensor:117]: 'Up': Sending state 1181.03796 s with 0 decimals of accuracy [23:15:02][D][sensor:117]: 'Energie cumulée Ph3': Sending state nan kWh with 1 decimals of accuracy [23:15:02][D][sensor:117]: 'Puissance Totale': Sending state nan W with 2 decimals of accuracy [23:15:03][D][sensor:117]: 'Puissance Apparente Ph2': Sending state nan VA with 2 decimals of accuracy [23:15:05][W][modbus:079]: Modbus CRC Check failed! 20!=00 [23:15:05][W][modbus:079]: Modbus CRC Check failed! C071!=14 [23:15:05][W][modbus:079]: Modbus CRC Check failed! C071!=3928 [23:15:05][D][text_sensor:015]: 'Uptime Pzem FCS': Sending state '0j 00h 19m 41s' [23:15:05][D][sensor:117]: 'Energie cumulée Ph1': Sending state nan kWh with 1 decimals of accuracy [23:15:06][D][sensor:117]: 'Puissance Réactive Ph3': Sending state nan VAr with 2 decimals of accuracy [23:15:06][D][sensor:117]: 'Puissance Apparente Ph3': Sending state nan VA with 2 decimals of accuracy [23:15:06][D][sensor:117]: 'Puissance Apparente Ph1': Sending state nan VA with 2 decimals of accuracy [23:15:06][D][sensor:117]: 'Puissance Réactive Ph2': Sending state nan VAr with 2 decimals of accuracy [23:15:07][D][sensor:117]: 'Energie cumulée Ph2': Sending state nan kWh with 1 decimals of accuracy [23:15:07][D][sensor:117]: 'Up': Sending state 1186.03796 s with 0 decimals of accuracy [23:15:07][D][sensor:117]: 'Puissance Réactive Ph1': Sending state nan VAr with 2 decimals of accuracy [23:15:07][D][sensor:117]: 'Energie cumulée Ph3': Sending state nan kWh with 1 decimals of accuracy [23:15:10][D][sensor:117]: 'Puissance Wifi Pzem': Sending state -54.00000 dBm with 0 decimals of accuracy [23:15:10][D][text_sensor:015]: 'Uptime Pzem FCS': Sending state '0j 00h 19m 46s' [23:15:10][D][sensor:117]: 'Energie cumulée Ph1': Sending state nan kWh with 1 decimals of accuracy [23:15:12][D][sensor:117]: 'Energie cumulée Ph2': Sending state nan kWh with 1 decimals of accuracy [23:15:12][D][sensor:117]: 'Up': Sending state 1191.03796 s with 0 decimals of accuracy [23:15:12][D][sensor:117]: 'Energie cumulée Ph3': Sending state nan kWh with 1 decimals of accuracy [23:15:12][D][sensor:117]: 'Puissance Totale': Sending state nan W with 2 decimals of accuracy [23:15:13][D][sensor:117]: 'Puissance Apparente Ph2': Sending state nan VA with 2 decimals of accuracy [23:15:15][W][modbus:079]: Modbus CRC Check failed! 20!=00 [23:15:15][W][modbus:079]: Modbus CRC Check failed! C071!=01 [23:15:15][D][text_sensor:015]: 'Uptime Pzem FCS': Sending state '0j 00h 19m 51s' [23:15:15][D][sensor:117]: 'Energie cumulée Ph1': Sending state nan kWh with 1 decimals of accuracy [23:15:16][D][sensor:117]: 'Puissance Réactive Ph3': Sending state nan VAr with 2 decimals of accuracy [23:15:16][D][sensor:117]: 'Puissance Apparente Ph3': Sending state nan VA with 2 decimals of accuracy [23:15:16][D][sensor:117]: 'Puissance Apparente Ph1': Sending state nan VA with 2 decimals of accuracy [23:15:16][D][sensor:117]: 'Puissance Réactive Ph2': Sending state nan VAr with 2 decimals of accuracy [23:15:17][D][sensor:117]: 'Energie cumulée Ph2': Sending state nan kWh with 1 decimals of accuracy [23:15:17][D][sensor:117]: 'Up': Sending state 1196.03796 s with 0 decimals of accuracy [23:15:17][D][sensor:117]: 'Puissance Réactive Ph1': Sending state nan VAr with 2 decimals of accuracy [23:15:17][D][sensor:117]: 'Energie cumulée Ph3': Sending state nan kWh with 1 decimals of accuracy [23:15:20][W][modbus:079]: Modbus CRC Check failed! C0FE!=00 [23:15:20][D][sensor:117]: 'Puissance Wifi Pzem': Sending state -53.00000 dBm with 0 decimals of accuracy [23:15:20][W][modbus:079]: Modbus CRC Check failed! 20!=7300 [23:15:20][D][text_sensor:015]: 'Uptime Pzem FCS': Sending state '0j 00h 19m 56s' [23:15:20][D][sensor:117]: 'Energie cumulée Ph1': Sending state nan kWh with 1 decimals of accuracy [23:15:22][D][sensor:117]: 'Energie cumulée Ph2': Sending state nan kWh with 1 decimals of accuracy [23:15:22][D][sensor:117]: 'Up': Sending state 1201.03796 s with 0 decimals of accuracy [23:15:22][D][sensor:117]: 'Energie cumulée Ph3': Sending state nan kWh with 1 decimals of accuracy [23:15:22][D][sensor:117]: 'Puissance Totale': Sending state nan W with 2 decimals of accuracy [23:15:23][D][sensor:117]: 'Puissance Apparente Ph2': Sending state nan VA with 2 decimals of accuracy [23:15:25][W][modbus:079]: Modbus CRC Check failed! F0FA!=00 [23:15:25][W][modbus:079]: Modbus CRC Check failed! C071!=00 [23:15:25][D][text_sensor:015]: 'Uptime Pzem FCS': Sending state '0j 00h 20m 01s' [23:15:25][D][sensor:117]: 'Energie cumulée Ph1': Sending state nan kWh with 1 decimals of accuracy [23:15:26][D][sensor:117]: 'Puissance Réactive Ph3': Sending state nan VAr with 2 decimals of accuracy [23:15:26][D][sensor:117]: 'Puissance Apparente Ph3': Sending state nan VA with 2 decimals of accuracy [23:15:26][D][sensor:117]: 'Puissance Apparente Ph1': Sending state nan VA with 2 decimals of accuracy [23:15:26][D][sensor:117]: 'Puissance Réactive Ph2': Sending state nan VAr with 2 decimals of accuracy [23:15:27][D][sensor:117]: 'Energie cumulée Ph2': Sending state nan kWh with 1 decimals of accuracy [23:15:27][D][sensor:117]: 'Up': Sending state 1206.03796 s with 0 decimals of accuracy [23:15:27][D][sensor:117]: 'Puissance Réactive Ph1': Sending state nan VAr with 2 decimals of accuracy [23:15:27][D][sensor:117]: 'Energie cumulée Ph3': Sending state nan kWh with 1 decimals of accuracy [23:15:30][W][modbus:079]: Modbus CRC Check failed! 94E5!=00 [23:15:30][D][sensor:117]: 'Puissance Wifi Pzem': Sending state -54.00000 dBm with 0 decimals of accuracy [23:15:30][D][text_sensor:015]: 'Uptime Pzem FCS': Sending state '0j 00h 20m 06s' [23:15:30][D][sensor:117]: 'Energie cumulée Ph1': Sending state nan kWh with 1 decimals of accuracy [23:15:32][D][sensor:117]: 'Energie cumulée Ph2': Sending state nan kWh with 1 decimals of accuracy [23:15:32][D][sensor:117]: 'Up': Sending state 1211.03894 s with 0 decimals of accuracy [23:15:32][D][sensor:117]: 'Energie cumulée Ph3': Sending state nan kWh with 1 decimals of accuracy [23:15:32][D][sensor:117]: 'Puissance Totale': Sending state nan W with 2 decimals of accuracy [23:15:33][D][sensor:117]: 'Puissance Apparente Ph2': Sending state nan VA with 2 decimals of accuracy

close-issue-app[bot] commented 3 years ago

This issue was auto-closed because the issue template was not filled out. The ESPHome developers invest lots of time to maintain this project, so please at least fill out the issue template so that a bunch of standard questions don't need to be asked again each time. Thank you for taking the time to report a bug, hopefully it can be resolved soon.