Logging eBus messages - J0EK3R/ebusd-configuration-weishaupt GitHub Wiki

Settig option "--lograwdatafile" of ebusd enables the buffered logging-mechanism for raw-messages to a dedicated file.

--lograwdatafile=FILE

The Problem of this mechanism is the buffering of the output: you can't watch the messages on the eBus just-in-time!

See: https://github.com/john30/ebusd/blob/master/src/lib/utils/rotatefile.cpp#L83

Only flush to logfile if condition is true:

83  if ((m_fileSize%1024) == 0) {
84    fflush(m_stream);
85  }

If option "--lograwdatafile" isn't set, ebusd is writing the raw-messages to the standard logfile [/var/log/ebusd.log] together with all other logging-output - but unbuffered!

But you can watch all logging-output just-in-time with the tail-command:

pi@fhem:~ $ tail -f /var/log/ebusd.log
2017-06-15 11:28:46.435 [update notice] unknown MS cmd: 705109030860161c5cffffffff / 00
2017-06-15 11:28:48.430 [update notice] unknown MS cmd: 705109030870161c5cffffffff / 00
2017-06-15 11:28:50.404 [update notice] unknown MS cmd: 705109030412010c00 / 00
2017-06-15 11:28:51.619 [update notice] update hc1 Set: hotwater;stopconsumer;25.00;-;-;40.0;-
2017-06-15 11:28:52.875 [update notice] update hc2 Set: hotwater;-;25.00;-;-;-;-
2017-06-15 11:28:53.087 [update notice] update hc2 Act QQ=70: 26.000;2;128;25.0;20.0;25.0;27;22;hotwater;32;0;0
2017-06-15 11:28:54.291 [update notice] update broadcast datetime QQ=30: 27.000;11:32:04;15.06.2017
2017-06-15 11:28:58.434 [update notice] update hc1 Set: hotwater;stopconsumer;25.00;-;-;40.0;-
2017-06-15 11:28:59.695 [update notice] update hc2 Set: hotwater;-;25.00;-;-;-;-
2017-06-15 11:28:59.899 [update notice] update hc2 Act QQ=70: 26.000;2;128;25.0;20.0;25.0;27;22;hotwater;32;0;0

To enable raw-logging of ebus-messages set option "raw" with ebusctl:

pi@fhem:~ $ ebusctl raw
pi@fhem:~ $ tail -f /var/log/ebusd.log
2017-06-15 11:33:39.673 [bus notice] <70f105070955ff90010080ffffffb300
2017-06-15 11:33:39.873 [update notice] update hc2 Act QQ=70: 26.000;2;128;25.0;20.0;25.0;27;23;hotwater;32;0;0
2017-06-15 11:33:39.913 [bus notice] <7051501004001a02806400093228321b1720200000cc00
2017-06-15 11:33:44.735 [update notice] update sc Act QQ=f1: 1;BrennerAus;1;1;1;0;0;0;0;0;0;Summer;0;0;0;0;0;Heating;0;40.0;-;44.0;0.0;27;22.480;8
2017-06-15 11:33:44.738 [bus notice] <f1fe500a0d010007000050ff58001b7b1608ff
2017-06-15 11:33:47.476 [bus notice] >ff350902031601020f<0002960079>00
2017-06-15 11:33:47.658 [bus notice] >ff75090203160102f7<00028c00ff>00
2017-06-15 11:33:48.436 [update notice] update hc1 Set: hotwater;stopconsumer;25.00;-;-;40.0;-
2017-06-15 11:33:48.437 [bus notice] <30f1050709550390010080ff50ff5c00
2017-06-15 11:33:49.682 [update notice] update broadcast datetime QQ=30: 27.000;11:37:00;15.06.2017
2017-06-15 11:33:50.887 [update notice] update hc2 Set: hotwater;-;25.00;-;-;-;-
2017-06-15 11:33:51.102 [update notice] update hc2 Act QQ=70: 26.000;2;128;25.0;20.0;25.0;27;23;hotwater;32;0;0

Now you can see the raw-messages (with prefix [bus notice]) between all other logging-output. To filter output to this kind of output just pipe the output of tail to grep:

tail -f /var/log/ebusd.log | grep "\[bus notice\]"
pi@fhem:~ $ tail -f /var/log/ebusd.log | grep "\[bus notice\]"
2017-06-15 11:37:50.852 [bus notice] <70f105070955ff90010080ffffffb300
2017-06-15 11:37:51.084 [bus notice] <7051501004001a02806400093228321b1720200000cc00
2017-06-15 11:37:58.419 [bus notice] <30f1050709550390010080ff50ff5c00
2017-06-15 11:37:59.681 [bus notice] <70f105070955ff90010080ffffffb300
2017-06-15 11:37:59.916 [bus notice] <7051501004001a02806400093228321b1720200000cc00
2017-06-15 11:38:07.751 [bus notice] >ff08500003db12d3bd<000300a30bb0>00
2017-06-15 11:38:08.385 [bus notice] <30f1050709550390010080ff50ff5c00
⚠️ **GitHub.com Fallback** ⚠️