Closed JelleKoster closed 2 years ago
How are you getting those logs? It looks like you are using a serial connection and not the API logger via WiFi.
But serial logging ought to be disabled by baud_rate: 0
, so I would in that case not expect much more than a few gurgles from the device at boot up.
For your debugger config, please use the string-based version. Hex bytes are only useful for debugging encrypted DSMR telegrams. So something like this:
uart:
baud_rate: 115200
rx_pin: D7
debug:
direction: RX
after:
delimiter: "\r\n"
sequence:
- lambda: UARTDebug::log_string(direction, bytes);
By serial connection(USB) because WIFI is problem in the latest releases of ESPHome too.Not to talk about he bootloops....
Here is what i get:
INFO Starting log output from /dev/ttyUSB1 with baud rate 115200
[11:14:52]rll\x90r$\xe2n\xc4l\xc7b|\x8e\x90\x92rb\xc4b\xf2nnlnnbbp\x8c$blrlp\xf2n\x82\x90l\x8cbn\xe2n\xc7lb\xc4\xf2nn'l\x8cl`\x90nnl`nr\x8e\x92\x92nbl`r\x92\x92nbl`\x9cb\x8el\x92lr\x92`\xfc\x82nb\xe0
[11:14:52]SDK:2.2.2-dev(38a443e)/Core:2.7.3-3-g2843a5ac=20703003/lwIP:STABLE-2_1_2_RELEASE/glue:1.2-30-g92add50/BearSSL:5c771be
[11:14:52][I][logger:214]: Log initialized
[11:14:52][C][ota:452]: There have been 4 suspected unsuccessful boot attempts.
[11:14:52][I][app:029]: Running through setup()...
[11:14:52][V][app:030]: Sorting components by setup priority...
[11:14:52][VV][scheduler:057]: set_interval(name='', interval=60000, offset=19760)
[11:14:52][C][uart.arduino_esp8266:052]: Setting up UART bus...
[11:14:52][VV][scheduler:057]: set_interval(name='update', interval=60000, offset=24894)
[11:14:52][I][main:042]: Not using decryption key. If you need to set a key use Home Assistant service 'ESPHome: slimmelezer_set_dsmr_key'
[11:14:52][V][text_sensor:016]: 'ESPHome Version': Received new state 2021.10.3
[11:14:52][D][text_sensor:067]: 'ESPHome Version': Sending state '2021.10.3'
[11:14:52][C][wifi:037]: Setting up WiFi...
[11:14:52][V][wifi_esp8266:068]: Disabling AP.
[11:14:52]bcn 0
[11:14:52]del if1
[11:14:52]usl
[11:14:52]mode : null
[11:14:52][V][wifi_esp8266:058]: Enabling STA.
[11:14:52]mode[V][wifi_esp8266:535]: Event: Changed Mode old=AP new=OFF
[11:14:52]wifi evt: 8
[11:14:52] : sta(ac:0b:fb:cf:d9:ab)
[11:14:52]add if0
[11:14:52][V][wifi_esp8266:535]: Event: Changed Mode old=OFF new=STA
[11:14:52]wifi evt: 8
[11:14:52]sleep disable
[11:14:52][D][wifi:372]: Starting scan...
[11:14:52][VV][scheduler:152]: Running interval 'update' with interval=60000 last_execution=4294882513 (now=184)
[11:14:52][V][sensor:062]: 'SlimmeLezer Uptime': Received new state 0.192000
[11:14:52][D][sensor:113]: 'SlimmeLezer Uptime': Sending state 0.19200 s with 0 decimals of accuracy
[11:14:52][VV][scheduler:152]: Running interval '' with interval=60000 last_execution=4294887634 (now=184)
[11:14:53][V][dsmr:045]: Header of telegram found
[11:14:53][D][uart_debug:152]: <<< "/ISK5\\2M550E\xCB\xCC\x16&\xD6\n\r\n"
[11:14:53][D][uart_debug:152]: <<< "1-3:0.2.8(50)\r\n"
[11:14:53][D][uart_debug:152]: <<< "0-0:\xCC\x19\xE6\x82\x86&\x16.\x8B\x06F\x8A\x16\x16FVFvK\xD6\n\x98-\x98:96.1.1(45303034393030f\xB3\xE6\xB3f6v\x9AV\x9B\x966V6&\x9A\x166\x96J\xD6\n1-0:1.8.1(002248.870*kWh)\r\n"
[11:14:53][D][uart_debug:152]: <<< "1-0:1.8.2(002085\x97\x86\xD5*kWh)\r\n"
[11:14:53][D][uart_debug:152]: <<< "1-0:2.8.1(000001.563*k5[YHX\xD6\x06\xA6\x92\xE6\x86\xE6\x92B\x06\x06\x06\x82\x06\x06\xE6\x06\x06\x06\xA6Z\xBBCKj\n0-0:96.14.0(0002)\r\n"
[11:14:53][D][uart_debug:152]: <<< "1-0:1.7.0(00.351*kW)\r\n"
[11:14:53][D][uart_debug:152]: <<< "1-0:2.7.0(00.000*kW)\r\n"
[11:14:53][D][uart_debug:152]: <<< "0-0:96.7\x97ff\x19\x06\x06\x16\x16J\xD6\n0-0:96.7.9(00003)\r\n"
[11:14:53][D][uart_debug:152]: <<< "1-0:9\xCEYv\xE6\x06\x86&J\x86\x06\xD6\x82\xA6\x96f\xE6\xBA\xE6\x16\x96J\x86\x16\x96\x06\x96&F\x16\x06V\x86&\x866-\t\x19\x06\x06\x82\x06\x066\x06F\x06\xA66K\x86\x16\xCA\x06\x96&V\x82\x96&\x86\x8A&6-\x19\x19\x06\x06\x06\x06f.\x96Fv\xA66Kj\n1-0:32.32.0(00010)\r\n"
[11:14:53][D][uart_debug:152]: <<< "1-0:32.36.0(00001)\r\n"
[11:14:53][D][uart_debug:152]: <<< "0-0:96.13.0()\r\n"
[11:14:53][D][uart_debug:152]: <<< "1-0:32.7.0(228.7*V)\r\n"
[11:14:53][D][uart_debug:152]: <<< "\xCC\xCB\xA66\x16\xE6v\xE6\x06\x86\x06\x06&\xA6\x16\xA5\r\n"
[11:14:53][D][uart_debug:152]: <<< "1-0:21.\x9B\x97\x86\x06\x06s6F&S\xB6\xBBK\xD6\n1\xCB\xA6&&\xE6v\xE6\x06\x86\x06\x06\xE6\x06\x06\x06\xA6\xB6\xBBK\xD6\n0-1:24.1.0(003)\r\n"
[11:14:53][D][uart_debug:152]: <<< "0-1:96.1.0(4730303738353635353838303538383230)\r\n"
[11:14:53][V][dsmr:073]: Footer of telegram found
[11:14:53][D][uart_debug:152]: <<< "0-1:24.2\x97\xCC\x99\x16\x16\x16\x06F\x16\x16\x16\x06\x83\x96v-\x199\x82&v6\xE6fv&\xA6\xD6\x9B\x96\xD6\n!1DE7\r\n"
[11:14:53][V][dsmr:161]: Trying to parse telegram
[11:14:53][E][dsmr:168]: !1DE7
[11:14:53] ^
[11:14:53]Checksum mismatch
[11:14:54][V][dsmr:045]: Header of telegram found
[11:14:54][D][uart_debug:152]: <<< "/ISK5\\2M550E-1012\r\n"
[11:14:54][D][uart_debug:152]: <<< "\r\n"
[11:14:54][D][uart_debug:152]: <<< "1-3:0.2.8(50)\r\n"
[11:14:54][D][uart_debug:152]: <<< "0-0:1.0.0(211104111455W)\r\n"
[11:14:54][D][uart_debug:152]: <<< "0-0:96.1.1(\x9Aff6\x066\x8E6\xCA6\x066\x06\x9Av6F6\xC36v\x9A\xAB6\x966V6&\x9A\x166\x96\x96\xD6\n1-0:1.8.1(002248.870*kWh)\x86\x85L\xCB\xA6\x16\xE6\xC2\xE6&\x86\x06\x06&\x06\x86\xAA\xE6v\x86fR\xB6\xBBC\xA5\r\n"
[11:14:54][D][uart_debug:152]: <<< "1-0:2.8.1(00\x98\x98\x16sV\xB3\x9A\xA6\xB6\xEF\r[Y\x98(\xD6\x06\xA6&\xE6\x86\xE6&\x86\x06\x06\x82\x06\x06\x06\xCE\t\x06\x06\xA6Z\xBBCK\xD6\n0-0:96.14.0(0002)\r\n"
[11:14:54][D][uart_debug:152]: <<< "1-0:1\x97\xE6\x06\x86\x82\x06\xE666\xBAS\xB6\xBB\xA5\r\n"
[11:14:54][D][uart_debug:152]: <<< "1-0:2.7.0(00.000*m\xB5Y\x98\b\xD6\x06\xA6\x96\xB2\xE6v\xE6\x92\x16\x86\x06\x06\x06\x16\x16\x96j\n0-0:96.7.9(00003)\r\n"
[11:14:54][D][uart_debug:152]: <<< "1-0:99.97.0(2)(0-0:96.7.19)(190924105828S)(00000030\x9A0*s)(1\x9C09\x995092812S)(\x98000069947*nJ\xC3a\xCC\xCB\xD26&\xE66&\xE6\x06\x86\x1E\x83\x06\x16\x06\x96\xD6\n1-0:32.36.0(00001)\r\n"
[11:14:54][D][uart_debug:152]: <<< "0-0:96.13.\x98()\r\n"
[11:14:54][D][uart_debug:152]: <<< "1-0:32.7.0(229.0*V)\r\n"
[11:14:54][D][uart_debug:152]: <<< "1-0:31.7.0(002*A)\r\n"
[11:14:54][D][uart_debug:152]: <<< "1-0:21.7.0(00.340*kW)\r\n"
[11:14:54][D][uart_debug:152]: <<< "1-0:22.7.0(00.000*kW)\r\n"
[11:14:54][D][uart_debug:152]: <<< "0-1:24.1.0(003)\r\n"
[11:14:54][D][uart_debug:152]: <<< "0-1:96.1.0(4730303738353635353838303538383230)\r\n"
[11:14:54][D][uart_debug:152]: <<< "0-\x98:24.2.1(211104111009W)(00273.672*m3)\r\n"
[11:14:54][V][dsmr:073]: Footer of telegram found
[11:14:54][D][uart_debug:152]: <<< "!4724\r\n"
[11:14:54][V][dsmr:161]: Trying to parse telegram
[11:14:54][E][dsmr:168]: !4724
[11:14:54] ^
[11:14:54]Checksum mismatch
[11:14:55][V][dsmr:045]: Header of telegram found
[11:14:55][D][uart_debug:152]: <<< "/ISK5\\2M550E-1012\r\n"
[11:14:55][D][uart_debug:152]: <<< "\r\n"
[11:14:55][D][uart_debug:152]: <<< "1-3:0.2.8(50)\r\n"
[11:14:55][D][uart_debug:152]: <<< "0-0:1.0.0(211104111456W)\r\n"
[11:14:55][D][uart_debug:152]: <<< "0-\x98:96\x971.1(4\x9A3030343\x9C3030f\xDE\xA26\x866v\x9AV6\x966V6&\x9A\x166\x96\x96\xD6\n1-0\x9D1.8.1(002\x9948.\x9C70*kWh)\r\n"
[11:14:55][D][uart_debug:152]: <<< "1-0:1.8.2(002085.786*kWh)\r\n"
[11:14:55][D][uart_debug:152]: <<< "1-0:2.8.1(\x98\x9800\x981.56\x99*kWh)\r\n"
[11:14:55][D][uart_debug:152]: <<< "\xCC\xCB\xD2&\xE6\x86r\x92\x86\x06\x06\x82\x06\x06\x06\xE6\x82\x06\x06SZ\xBBCK\xD6\n0-0:96.14.0(0002)\r\n"
[11:14:55][D][uart_debug:152]: <<< "1-0:1.7.0(00\x97403\xBDkW)\r\n"
[11:14:55][D][uart_debug:152]: <<< "1-0:2.7.0(00.000*kW)\r\n"
[11:14:55][D][uart_debug:152]: <<< "0-0:96.7.21(00011)\r\n"
[11:14:55][D][uart_debug:152]: <<< "0-0:96.7.9(00003)\r\n"
[11:14:55][D][uart_debug:152]: <<< "1-0:99.97.0(2)(0-0:96.7.19)(190924\x98\x985828S)(0000003040*s)(190925092812S)(0000069947*s)\r\n"
[11:14:55][D][uart_debug:152]: <<< "1-0:32.32.0(00010)\r\n"
[11:14:55][D][uart_debug:152]: <<< "1-0:32.36.0(00001)\r\n"
[11:14:55][D][uart_debug:152]: <<< "0-0:96.13.0()\r\n"
[11:14:55][V][dsmr:045]: Header of telegram found
[11:14:55][D][uart_debug:152]: <<< "1-0:32.7.0(228/9*V)\r\n"
[11:14:55][D][uart_debug:152]: <<< "1-0:31.7.0(002*A)\r\n"
[11:14:55][D][uart_debug:152]: <<< "1-\x98\x9D21.7.0\x9400.f\xCDNem\xB5Y\x98X\xD6\x06\xA6&&\xE6v\xE6\x06\x86\x06\x06\xE6\x06\x06\x06\xA6\xB6\xBBK\xD6\n0-1:24.1.0(003)\r\n"
[11:14:55][D][uart_debug:152]: <<< "0-1:96.\x98.0(47303037383\xCDf\xB3f\xCDf\xCDf6\x866\x066V6\x866\x866&6\x06\x96\xD6\n0-1:2\x9A\x97\x99.1(211104111009W)(00273.672*m3)\r\n"
[11:14:55][V][dsmr:073]: Footer of telegram found
[11:14:55][D][uart_debug:152]: <<< "!DFFB\r\n"
[11:14:55][V][dsmr:161]: Trying to parse telegram
[11:14:55][E][dsmr:168]: !DFFB
[11:14:55] ^
[11:14:55]Checksum mismatch
[11:14:56][V][dsmr:045]: Header of telegram found
[11:14:56][D][uart_debug:152]: <<< "/ISK5\\2M550E-1012\r\n"
[11:14:56][D][uart_debug:152]: <<< "\r\n"
[11:14:56][D][uart_debug:152]: <<< "1-3:0.2.8(50)\r\n"
[11:14:56][D][uart_debug:152]: <<< "0-0:1.0.0(211104111457W)\r\n"
[11:14:56][D][uart_debug:152]: <<< "0-0:96.1\x971(\x9A5f6\x82\x9AF6\x966\x066\x06\x9Av6F6\x866v\x9AV\x9B\x966V6&\x9A\x166\x96\x96j\n1-0:1.8.1\x94002248.870*kW\xEC\xCA\xC3a\xCCK\xA6\x16\xE6\xC2\xE6&\x86\x06\x06&\x06\x86\xAA\xE6v\x86fR\xB6\xBBC\xA5\r\n"
[11:14:56][D][uart_debug:152]: <<< "1-0:2.8\x971(\x9800001.\x9E63*k5[Y\x98X\xD6\x06\xA6&\xE6\x86\xE6\x92\x86\x06\x06\x06\x06\x06\x06\xE6\x82\x0E\x06\xA6Z\xBBCK\xD6\n0-0:96.14.0(0002)\xC3a\xCCK\xA6\x16\xE6v\xE6\x06\x86\x06\x06\xE66F\x06\xA6\xB6\xBBK\xD6\n1-0:2.7.0(00.000*kW)\r\n"
[11:14:56][D][uart_debug:152]: <<< "0-0:96.7.21(00011)\r\n"
[11:14:56][D][uart_debug:152]: <<< "0-0:96.7.9(00003)\r\n"
[11:14:56][D][uart_debug:152]: <<< "1-0:99.97.0(2)(0-0:96.7.19)(190924105828S)(0\x98\x98\x9800304\x98*s)(190925092812S)(0000069947*s)\r\n"
[11:14:56][D][uart_debug:152]: <<< "1-0:32.32.0(00010)\r\n"
[11:14:56][D][uart_debug:152]: <<< "1-0:32.36.0(00001)\r\n"
[11:14:56][D][uart_debug:152]: <<< "0-0:96.13.0()\r\n"
[11:14:56][D][uart_debug:152]: <<< "1-0:32.7.0(228.8*V)\r\n"
[11:14:56][D][uart_debug:152]: <<< "1-0:31.7.0(002*A)\r\n"
[11:14:56][D][uart_debug:152]: <<< "1-0:21.7.0(00.339*kW)\r\n"
[11:14:56][D][uart_debug:152]: <<< "1-0:22.7.0(00.000*kW)\r\n"
[11:14:56][D][uart_debug:152]: <<< "0-1:24.1.0(003)\r\n"
[11:14:56][D][uart_debug:152]: <<< "0-1:96.1.0(4730303738353635353838303538383230)\r\n"
[11:14:56][D][uart_debug:152]: <<< "0-1:24.2.1(211104111009W)(00273.672*m3)\r\n"
[11:14:56][V][dsmr:073]: Footer of telegram found
[11:14:56][D][uart_debug:152]: <<< "!5A05\r\n"
[11:14:56][V][dsmr:161]: Trying to parse telegram
[11:14:56][E][dsmr:168]: !5A05
[11:14:56] ^
[11:14:56]Checksum mismatch
[11:14:57][V][dsmr:045]: Header of telegram found
[11:14:57][D][uart_debug:152]: <<< "/ISK5\\2M550E-1012\r\n"
[11:14:57][D][uart_debug:152]: <<< "\r\n"
[11:14:57][D][uart_debug:152]: <<< "1-3:0.2.8(50)\r\n"
[11:14:57][D][uart_debug:152]: <<< "0-0:1.0.0(211104111458W)\r\n"
[11:14:57][D][uart_debug:152]: <<< "0-0:96.1.\xCC\x19S\xB336\x066F6\xCA\xCD03\x9837343837353935323139)\r\n"
[11:14:57][D][uart_debug:152]: <<< "1-0:1.8.1(002248.83S[\xBBh)\r\n"
[11:14:57][D][uart_debug:152]: <<< "1-0:1.8.2(00208\xCD\xD93fR\xB6\xBBC\xA5\r\n"
[11:14:57][D][uart_debug:152]: <<< "1K\xD3&\xE6\x86\xE6\x16\x86\x06\a\x06\x82\x06\x16\xE6V\xB26\xA6\xB6\xBBCK\xD6\n1-0:2.8.2(000000.000*kWh)\r\n"
[11:14:57][D][uart_debug:152]: <<< "0-0:96.14.0(0002)\r\n"
[11:14:57][D][uart_debug:152]: <<< "1-0:1.7\x970(00.354*kW)\r\n"
[11:14:57][D][uart_debug:152]: <<< "1-0:2.7.0(00.000*kW)\r\n"
[11:14:57][D][uart_debug:152]: <<< "0-0:96.7.21(00011)\r\n"
[11:14:57][D][uart_debug:152]: <<< "0-0:96.7.9(0000\x99\xCA\xC3a\xCC\xCB\xA6\x96\xCB\xE6\x96v\xE6\x06\x86&\x96\x86\x06\xD6\x06\xA6\x96f\xE6v\xE6\x16\x96\x96B\x16\x96\x06\x96&F\x16\x06V\x86&\x866-\x19\x19\x06\x06\x06\x06\x066\x06F\x06\xA66K\x86\x16\x96\x83\x96&V\x06\x96&\x86\x16&6\x95\x86\x06\x06\x06\x06\x06f\x96\x96Fv\xA66K\xD6\n1-0:3\x99.32\x970(00010)\r\n"
[11:14:57][D][uart_debug:152]: <<< "1-0:32.36.0(00001)\r\n"
[11:14:57][D][uart_debug:152]: <<< "0-0:96.13.0()\r\n"
[11:14:57][D][uart_debug:152]: <<< "1-0:32.7.0(228.9*\xAB)\r\n"
[11:14:57][D][uart_debug:152]: <<< "1-0:31.7.0(002*A)\r\n"
[11:14:57][D][uart_debug:152]: <<< "1-0:21.7.0(00.351*kW)\r\n"
[11:14:57][V][dsmr:045]: Header of telegram found
[11:14:57][D][uart_debug:152]: <<< "1/0:22.7.0(00.000*kW)\r\n"
[11:14:57][D][uart_debug:152]: <<< "0-1:24.1.0(003)\r\n"
[11:14:57][D][uart_debug:152]: <<< "0-fg\xCE\xE6\x16\xE6\x06\x86Fv6\x066\x066v6\x86\x9BV6f6V6V6\x866\x866\x066V6\x866\x866&6\x06\x96\xD6\n0-1:24.2.1(21110411\xCC\x06\x96v-\xF9(00273.672*m3)\r\n"
[11:14:57][V][dsmr:073]: Footer of telegram found
[11:14:57][D][uart_debug:152]: <<< "!5EFE\r\n"
[11:14:57][V][dsmr:161]: Trying to parse telegram
[11:14:57][E][dsmr:168]: !5EFE
[11:14:57] ^
[11:14:57]Checksum mismatch
[11:14:58][V][dsmr:045]: Header of telegram found
[11:14:58][D][uart_debug:152]: <<< "/ISK5\\2M550E-1012\r\n"
[11:14:58][D][uart_debug:152]: <<< "\r\n"
[11:14:58][D][uart_debug:152]: <<< "1-3:0.2.8(50)\r\n"
[11:14:58][D][uart_debug:152]: <<< "0-0:1.0.0(211104111459W)\r\n"
[11:14:58][D][uart_debug:152]: <<< "0-0:96.1.1(\x9A\xCDf6\x066F6\xCA6\x066\x066vnF6\x86\x9Av6V6\x966V\x9A&6\x166\xCA\x96\xD6\n1-0:1\x978.1(002248.87\x98\x95m\x15+Y\x98Xj\x06\xA6\x16\x9E\x19\xE6&\x86\x06\x06\x93\x06\xC2V\xE6v\x86f\xA6\xB6]CK\xD6\n1-0\x9D\x99.8.1(00\x98\x06\x16\xE6\xD563*kWh)\r\n"
[11:14:58][D][uart_debug:152]: <<< "1-0:2.8.2\x94000000.000*kWh)\r\n"
[11:14:58][D][uart_debug:152]: <<< "0-0:96.14.0(0\x980\x99\xCA\xC3aL\xCB\xA6\x16\xE6v\xE6\x06B\x06\x06\xE666f\xA6\xB6\xBBK\xD6\n1-0:2.7.0(00.000*kW)\r\n"
[11:14:58][D][uart_debug:152]: <<< "0-0:96.7.21(00011)\r\n"
[11:14:58][D][uart_debug:152]: <<< "0-0:96.7.9(00003)\r\n"
[11:14:58][D][uart_debug:152]: <<< "1-0:99.97.0(2)(0-0:96.7.19)(190924105828S)(0000003040*s)(190925092812S)\x94\x98000069947*s)\r\n"
[11:14:58][D][uart_debug:152]: <<< "1-0:32.32.0(00010)\r\n"
[11:14:58][D][uart_debug:152]: <<< "1-0:32.36.0(00001)\r\n"
[11:14:58][D][uart_debug:152]: <<< "0-0:96.13.0()\r\n"
[11:14:58][D][uart_debug:152]: <<< "1-0:32.7.0(229.0*V)\r\n"
[11:14:58][D][uart_debug:152]: <<< "1-0:31.7.0(002*A)\r\n"
[11:14:58][D][uart_debug:152]: <<< "1-0:21.7.0(00.344*kW)\r\n"
[11:14:58][D][uart_debug:152]: <<< "1-0:22.7.0(00.000*kW)\r\n"
[11:14:58][D][uart_debug:152]: <<< "0-1:24.1.0(003)\r\n"
[11:14:58][D][uart_debug:152]: <<< "0-1:96.1.0(4730303738353635353838303538383230)\r\n"
[11:14:58][D][uart_debug:152]: <<< "0-1:24.2.1(211104111009W)(00273.672*m3)\r\n"
[11:14:58][V][dsmr:073]: Footer of telegram found
[11:14:58][D][uart_debug:152]: <<< "!F4B0\r\n"
[11:14:58][V][dsmr:161]: Trying to parse telegram
[11:14:58][E][dsmr:168]: !F4B0
[11:14:58] ^
[11:14:58]Checksum mismatch
[11:14:59][V][dsmr:045]: Header of telegram found
[11:14:59][D][uart_debug:152]: <<< "/ISK5\\2M550E-1012\r\n"
[11:14:59][D][uart_debug:152]: <<< "\r\n"
[11:14:59][D][uart_debug:152]: <<< "1-3:0.2.8(50)\r\n"
[11:14:59][D][uart_debug:152]: <<< "0-0:1.0.0(211104111500W)\r\n"
@Multipage But when you enable serial logging you force the UART that reads the telegrams to be in software mode. And that is a well known reason for getting the errors that you are seeing right now. The UART data loses bytes or has garbled data in it (and I see that happen in the serial logs from above). For example:
[11:14:56][D][uart_debug:152]: <<< "0-0:1.0.0(211104111457W)\r\n"
[11:14:56][D][uart_debug:152]: <<< "0-0:96.1\x971(\x9A5f6\x82\x9AF6\x966\x066\x06\x9Av6F6\x866v\x9AV\x9B\x966V6&\x9A\x166\x96\x96j\n1-0:1.8.1\x94002248.870*kW\xEC\xCA\xC3a\xCCK\xA6\x16\xE6\xC2\xE6&\x86\x06\x06&\x06\x86\xAA\xE6v\x86fR\xB6\xBBC\xA5\r\n"
[11:14:56][D][uart_debug:152]: <<< "1-0:2.8\x971(\x9800001.\x9E63*k5[Y\x98X\xD6\x06\xA6&\xE6\x86\xE6\x92\x86\x06\x06\x06\x06\x06\x06\xE6\x82\x0E\x06\xA6Z\xBBCK\xD6\n0-0:96.14.0(0002)\xC3a\xCCK\xA6\x16\xE6v\xE6\x06\x86\x06\x06\xE66F\x06\xA6\xB6\xBBK\xD6\n1-0:2.7.0(00.000*kW)\r\n"
[11:14:56][D][uart_debug:152]: <<< "0-0:96.7.21(00011)\r\n"
Those things like \x9AF6\x966\x066
indicate that there's non-ASCII data in the bytes, and therefore they are logged as escaped hex bytes. But a telegram only contains ASCII. That proves the data is broken here.
So the logger:
option baud_rate: 0
must really be used in order to get hardware UART working. As long as that's enabled, software UART will ruin your day, guaranteed.
With the set of fixes that were compiled so far, the device ought to work. To sum them up:
rx_buffer_size = 1500
for the uart:
componentbaud_rate = 0
for the logger:
componentexternal_components:
- source:
type: git
url: https://github.com/mmakaay/esphome
ref: fix-dsmr-read-chunk-size
components: [ "dsmr" ]
refresh: 60s
Boot loops and WiFi issues
You are talking about boot loops and WiFi issues. As far as I can tell, those are your actual issues here and those have no relation with the subject of this issue (except for the fact that you can't show us WiFi API logging because of those).
Are you sure the ESP8266 MCU isn't broken? It definitely is not default behavior. Anyhow, if you want to look into those, then find an issue that already describes this or create a new issue for further investigation. One thing to start with, would be to bring your config down to a minimal config that still shows the breakage, and get hold of serial device logging for the boot loop.
p.s.
Looking back at the discussion history, I also really wonder if the UART serial logger was really disabled in [https://github.com/esphome/issues/issues/2621#issuecomment-960552327](this reply of yours). Because what you pasted there says that logging is started from /dev/ttyUSB1
. Were the dsmr
logs that you pasted also read from the serial log? Because in that case, I'd be surprised when baud_rate: 0
was actually applied for the logger.
@mmakaay : You are right..for some reason it wasn't in the config anymore. Now i get this: INFO UART logging is disabled (baud_rate=0). Not starting UART logs. So that's right now.
I allready used your external component and that changed the error a bit to what it is now.
Like i said i'm new to ESPHome, will have to get me a hardware UART logger. But in this case i think i will send the hardware back to the seller ( slimmelezer ) so he can check what's going on with this thing. He allready told me there we're multiple issue with the current ESPHome release so i was hoping for some solutions here at Github. I can see more people with the same issues like i have. Wifi connecting first time OK..if you'r lucky, on reboot ..WiFi random errors party! And offcourse bootloop
Thanks for your time and trying to help me out!
The error that changed a bit simply changed because the number indicates the line number at which an error occurred. Because I added some code before that line, the line number went up. The number has nu further magical meaning than that.
The current issues that Marcel talke about were definitely not related to Wifi and bootloop issues for sure. The issues that we've seen all had to do with bad readings of the serial bus, and have been fixed by the changes that I posted above. Since there are many SlimmeLezer devices running without those issues, I think it's safe to assume that it might be a hardware fault in this case.
About the hardware UART logger: as far as I can tell, you already have that. When you can read serial logs (and you've proven that you can), then you have the required hardware for it. I'm not sure what other piece of hardware you would like to acquire here.
Hi,
I am still having issues. I have a Belgian DSMR5 meter. Currently running ESPHOME version 2021.10.3. I started from the configuration file from @zuidwijk. I was initially also getting the CRC error. Following the recommendations from @mmakaay I added the logger, uart and external components sections to my configuration file. However now I get "Missing Unit" errors?
---
substitutions:
device_name: slimmelezer
device_description: "DIY P1 module to read your smart meter"
esphome:
name: ${device_name}
comment: "${device_description}"
platform: ESP8266
esp8266_restore_from_flash: true
board: d1_mini
name_add_mac_suffix: false
project:
name: zuidwijk.slimmelezer
version: "1.0"
on_boot:
then:
- if:
condition:
lambda: return id(has_key);
then:
- lambda: |-
std::string key(id(stored_decryption_key), 32);
id(dsmr_instance).set_decryption_key(key);
else:
- logger.log:
level: info
format: "Not using decryption key. If you need to set a key use Home Assistant service 'ESPHome: ${device_name}_set_dsmr_key'"
wifi:
networks:
- ssid: !secret
password: !secret
ap:
ssid: ${device_name}
ap_timeout: 15s
captive_portal:
logger:
baud_rate: 0
level: VERBOSE
api:
services:
service: set_dsmr_key
variables:
private_key: string
then:
- logger.log:
format: Setting private key %s. Set to empty string to disable
args: [private_key.c_str()]
- globals.set:
id: has_key
value: !lambda "return private_key.length() == 32;"
- lambda: |-
if (private_key.length() == 32)
private_key.copy(id(stored_decryption_key), 32);
id(dsmr_instance).set_decryption_key(private_key);
ota:
web_server:
port: 80
uart:
baud_rate: 115200
rx_pin: D7
rx_buffer_size: 1500
external_components:
- source:
type: git
url: https://github.com/mmakaay/esphome
ref: fix-dsmr-read-chunk-size
components: [ "dsmr" ]
refresh: 60s
globals:
- id: has_key
type: bool
restore_value: yes
initial_value: "false"
- id: stored_decryption_key
type: char[32]
restore_value: yes
dsmr:
crc_check: false
id: dsmr_instance
sensor:
- platform: dsmr
energy_delivered_lux:
name: "Energy Consumed Luxembourg"
state_class: total_increasing
energy_delivered_tariff1:
name: "Energy Consumed Tariff 1"
state_class: total_increasing
energy_delivered_tariff2:
name: "Energy Consumed Tariff 2"
state_class: total_increasing
energy_returned_lux:
name: "Energy Produced Luxembourg"
state_class: total_increasing
energy_returned_tariff1:
name: "Energy Produced Tariff 1"
state_class: total_increasing
energy_returned_tariff2:
name: "Energy Produced Tariff 2"
state_class: total_increasing
power_delivered:
name: "Power Consumed"
accuracy_decimals: 3
power_returned:
name: "Power Produced"
accuracy_decimals: 3
electricity_failures:
name: "Electricity Failures"
icon: mdi:alert
electricity_long_failures:
name: "Long Electricity Failures"
icon: mdi:alert
voltage_l1:
name: "Voltage Phase 1"
voltage_l2:
name: "Voltage Phase 2"
voltage_l3:
name: "Voltage Phase 3"
current_l1:
name: "Current Phase 1"
current_l2:
name: "Current Phase 2"
current_l3:
name: "Current Phase 3"
power_delivered_l1:
name: "Power Consumed Phase 1"
accuracy_decimals: 3
power_delivered_l2:
name: "Power Consumed Phase 2"
accuracy_decimals: 3
power_delivered_l3:
name: "Power Consumed Phase 3"
accuracy_decimals: 3
power_returned_l1:
name: "Power Produced Phase 1"
accuracy_decimals: 3
power_returned_l2:
name: "Power Produced Phase 2"
accuracy_decimals: 3
power_returned_l3:
name: "Power Produced Phase 3"
accuracy_decimals: 3
gas_delivered:
name: "Gas Consumed"
state_class: total_increasing
gas_delivered_be:
name: "Gas Consumed Belgium"
state_class: total_increasing
- platform: uptime
name: "SlimmeLezer Uptime"
- platform: wifi_signal
name: "SlimmeLezer Wi-Fi Signal"
update_interval: 60s
text_sensor:
- platform: dsmr
identification:
name: "DSMR Identification"
p1_version:
name: "DSMR Version"
p1_version_be:
name: "DSMR Version Belgium"
- platform: wifi_info
ip_address:
name: "SlimmeLezer IP Address"
ssid:
name: "SlimmeLezer Wi-Fi SSID"
bssid:
name: "SlimmeLezer Wi-Fi BSSID"
- platform: version
name: "ESPHome Version"
hide_timestamp: true
[19:42:19][C][web_server:160]: Web Server: [19:42:19][C][web_server:161]: Address: slimmelezer.local:80 [19:42:19][C][ota:082]: Over-The-Air Updates: [19:42:19][C][ota:083]: Address: slimmelezer.local:8266 [19:42:19][C][api:134]: API Server: [19:42:19][C][api:135]: Address: slimmelezer.local:6053 [19:42:19][C][api:139]: Using noise encryption: NO [19:42:19][C][wifi_signal.sensor:009]: WiFi Signal 'SlimmeLezer Wi-Fi Signal' [19:42:19][C][wifi_signal.sensor:009]: Device Class: 'signal_strength' [19:42:19][C][wifi_signal.sensor:009]: State Class: 'measurement' [19:42:19][C][wifi_signal.sensor:009]: Unit of Measurement: 'dBm' [19:42:19][C][wifi_signal.sensor:009]: Accuracy Decimals: 0 [19:42:19][V][wifi_signal.sensor:009]: Unique ID: '308398807686-wifisignal' [19:42:19][C][wifi_info:009]: WifiInfo IPAddress 'SlimmeLezer IP Address' [19:42:19][V][wifi_info:009]: Unique ID: '308398807686-wifiinfo-ip' [19:42:19][C][wifi_info:011]: WifiInfo SSID 'SlimmeLezer Wi-Fi SSID' [19:42:19][V][wifi_info:011]: Unique ID: '308398807686-wifiinfo-ssid' [19:42:19][C][wifi_info:012]: WifiInfo BSSID 'SlimmeLezer Wi-Fi BSSID' [19:42:19][V][wifi_info:012]: Unique ID: '308398807686-wifiinfo-bssid' [19:42:19][V][dsmr:045]: Header of telegram found [19:42:19][V][dsmr:073]: Footer of telegram found [19:42:19][V][dsmr:161]: Trying to parse telegram
^
Missing unit [19:42:20][V][dsmr:045]: Header of telegram found [19:42:20][V][dsmr:073]: Footer of telegram found [19:42:20][V][dsmr:161]: Trying to parse telegram
^
Missing unit [19:42:21][V][dsmr:045]: Header of telegram found [19:42:21][V][dsmr:073]: Footer of telegram found [19:42:21][V][dsmr:161]: Trying to parse telegram
^
Missing unit [19:42:22][V][dsmr:045]: Header of telegram found [19:42:22][V][dsmr:073]: Footer of telegram found [19:42:22][V][dsmr:161]: Trying to parse telegram
^
Missing unit [19:42:22][V][component:186]: Component dsmr took a long time for an operation (0.05 s). [19:42:22][V][component:187]: Components should block for at most 20-30ms. [19:42:23][V][dsmr:045]: Header of telegram found [19:42:23][V][dsmr:073]: Footer of telegram found [19:42:23][V][dsmr:161]: Trying to parse telegram
^
Missing unit [19:42:24][V][dsmr:045]: Header of telegram found [19:42:24][V][dsmr:073]: Footer of telegram found [19:42:24][V][dsmr:161]: Trying to parse telegram
^
Missing unit [19:42:25][V][dsmr:045]: Header of telegram found [19:42:25][V][dsmr:073]: Footer of telegram found [19:42:25][V][dsmr:161]: Trying to parse telegram
^
Missing unit [19:42:25][V][component:186]: Component dsmr took a long time for an operation (0.05 s). [19:42:25][V][component:187]: Components should block for at most 20-30ms. [19:42:26][V][dsmr:045]: Header of telegram found [19:42:26][V][dsmr:073]: Footer of telegram found [19:42:26][V][dsmr:161]: Trying to parse telegram
^
Missing unit [19:42:27][V][dsmr:045]: Header of telegram found [19:42:27][V][dsmr:073]: Footer of telegram found [19:42:27][V][dsmr:161]: Trying to parse telegram
^
Missing unit [19:42:28][V][dsmr:045]: Header of telegram found [19:42:28][V][dsmr:073]: Footer of telegram found [19:42:28][V][dsmr:161]: Trying to parse telegram
^
Missing unit [19:42:28][V][component:186]: Component dsmr took a long time for an operation (0.05 s). [19:42:28][V][component:187]: Components should block for at most 20-30ms. [19:42:29][V][dsmr:045]: Header of telegram found [19:42:29][V][dsmr:073]: Footer of telegram found [19:42:29][V][dsmr:161]: Trying to parse telegram
^
Missing unit [19:42:30][V][dsmr:045]: Header of telegram found [19:42:30][V][dsmr:073]: Footer of telegram found [19:42:30][V][dsmr:161]: Trying to parse telegram
^
Missing unit [19:42:30][V][component:186]: Component dsmr took a long time for an operation (0.05 s). [19:42:30][V][component:187]: Components should block for at most 20-30ms. [19:42:30][D][api:098]: Accepted 192.168.0.136 [19:42:30][V][api.connection:720]: Hello from client: 'Home Assistant 2021.11.2 (192.168.0.136)' [19:42:31][D][api.connection:736]: Home Assistant 2021.11.2 (192.168.0.136): Connected successfully [19:42:31][V][dsmr:045]: Header of telegram found [19:42:31][V][dsmr:073]: Footer of telegram found [19:42:31][V][dsmr:161]: Trying to parse telegram
^
Missing unit [19:42:32][V][dsmr:045]: Header of telegram found [19:42:32][V][dsmr:073]: Footer of telegram found [19:42:32][V][dsmr:161]: Trying to parse telegram
^
Missing unit [19:42:32][V][component:186]: Component dsmr took a long time for an operation (0.05 s). [19:42:32][V][component:187]: Components should block for at most 20-30ms. [19:42:33][V][dsmr:045]: Header of telegram found [19:42:33][V][dsmr:073]: Footer of telegram found [19:42:33][V][dsmr:161]: Trying to parse telegram
^
Missing unit [19:42:34][V][dsmr:045]: Header of telegram found [19:42:34][V][dsmr:073]: Footer of telegram found [19:42:34][V][dsmr:161]: Trying to parse telegram
^
Missing unit [19:42:34][V][component:186]: Component dsmr took a long time for an operation (0.05 s). [19:42:34][V][component:187]: Components should block for at most 20-30ms. [19:42:35][V][dsmr:045]: Header of telegram found [19:42:35][V][dsmr:073]: Footer of telegram found [19:42:35][V][dsmr:161]: Trying to parse telegram
^
Missing unit [19:42:36][V][dsmr:045]: Header of telegram found [19:42:36][V][dsmr:073]: Footer of telegram found [19:42:36][V][dsmr:161]: Trying to parse telegram
^
Missing unit [19:42:36][V][component:186]: Component dsmr took a long time for an operation (0.05 s). [19:42:36][V][component:187]: Components should block for at most 20-30ms. [19:42:37][V][dsmr:045]: Header of telegram found [19:42:37][V][dsmr:073]: Footer of telegram found [19:42:37][V][dsmr:161]: Trying to parse telegram
^
Missing unit [19:42:37][V][component:186]: Component dsmr took a long time for an operation (0.06 s). [19:42:37][V][component:187]: Components should block for at most 20-30ms. [19:42:38][V][dsmr:045]: Header of telegram found [19:42:38][V][dsmr:073]: Footer of telegram found [19:42:38][V][dsmr:161]: Trying to parse telegram
It looks like reading is working just fine, but the telegram cannot be parsed because the format is not recognized.
The line 0-1:24.2.3(632525252525W)(00000.000)
should tell you how much gas is used, looking at the code at the start of that line. But apparently the value is zero. What the code would expect at the end here is ...(00000.000*m3)
, so including a unit indication.
Since this line does not contain useful data for you, maybe try commenting out the following definition from your config:
# gas_delivered_be:
# name: "Gas Consumed Belgium"
# state_class: total_increasing
If that is not a solution, then please create a new issue, containing this information. I am convinced that the actual telegram can be read, now you are using my pointers. Otherwise, the parser code would never even have tried to parse this line.
Hi,
You are a genius. This was indeed my problem. Thanks for the quick feedback. After commenting out the gas, your suggested fix for the CRC issue worked for me.
I actually do want to get my gas reading also, but clearly that is a separate issue than the CRC error, so I'll file a new ticket for that (after checking there is no issue with my digital gas meter).
If you create an issue ticket, then also follow the instructions from this message to setup a debugger for your UART. That way you can easily capture the full telegram data that is being transmitted by your smart meter. That makes inspection of what's going on a lot easier.
Thanks for the "genius" bit. My mom will be so proud! 😄
@mmakaay haven't you got a "buy me a coffee" or "buy me a beer" link? I'll buy you one for all the good work!
Hah, beer good! 🍺 I've got a sponsor link on my Xiaomi Bedside Lamp 2 project page (money goes into my open source "speelrekening").
@JelleKoster A lot of things were improved and some last improvements will be included in the upcoming 2021.12.0. Can you check if you are still running into problems? If not, then we can close this issue.
Working stably for me with the workaround mentioned in this comment.
I'll make a jira for myself to revert the workaround after installing ESPHome 2021.12.0 and feed back to this ticket. As far as I'm concerned we can close this issue.
Thanks for your help!
Thisd issue was closed, because the original poster's problem has been fixed by now. If you have issues, then please create a new ticket and include more information about the type of meter that you have, the country that you're in. Also make sure to post configs with three backticks above and below to get some sensible formatting. The above is unreadable.
``` like this ```
One this I see in your config is the use of decryption key 00112233445566778899AABBCCDDEEFF
.
That is not a valid decryption key. If your meter uses encryption, you ought to get the correct key to use from your provider. The key that you used is just an example of what the format should look like.
For logging, please use hex logging if your meter is encrypted, what seems to be the case. Thise was described above in this post: https://github.com/esphome/issues/issues/2621#issuecomment-955010222
The problem
Precisely since updating the ESPHome config of the Slimme Lezer (P1 DSMR reader by Marcel Zuidwijk) from v2019.3 to v2021.10.1, it no longer reads values from the DSMR v5 (Dutch) smart meter.
I can connect to the Slimme Lezer wirelessly from within ESPHome. When tailing the Slimme Lezer log within ESPHome, I see the wifi signal strength and device uptime being reported back OK. Neither the log nor Home Assistant shows the values of power consumed/produced (or per phase).
Powercycling the Slimme Lezer and re-plugging in the associated cables did not resolve the issue.
Which version of ESPHome has the issue?
2021.10.1
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2021.10.5
What platform are you using?
ESP8266
Board
d1_mini
Component causing the issue
DSMR
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response