Page 1 of 1

How to log RFLink "raw" messages in Domoticz ?

Posted: Saturday 28 January 2017 12:32
by gerardwr
Hi,

For debugging purposes I would like to log:
- all "raw" RFLink messages that Domoticz received for handling, like

Code: Select all

20;03;PT2262;ID=52;SWITCH=8;CMD=OFF;
- all "raw" messages that Domoticz sends to the RFLink, like

Code: Select all

10;NewKaku;00c142;1;ON;
Tried setting loglevel in the Domoticz DAEMON from 0 to 1, but the raw messages are nog logged.

I know I can use Minicom to connect to the RFLink directly and seen the "raw" commands, but that forces me to stop Domoticz.

Searched the forum, but found no clues.

Who can help?

Thx.

Re: How to log RFLink "raw" messages in Domoticz ?

Posted: Wednesday 01 February 2017 13:52
by Stuntteam
We crafted a quick and dirty solution for this.
In the hardware tab, select the "Create RFLink Devices" button and in the popup enter:
10;rfdebug=on;
to activate the debug feature within the Domoticz log.
and
10;rfdebug=off;
to deactivate the debug feature.

If you get a timeout, the Domoticz (beta) version does not have support for this yet.
Obviously you will need a beta version that was compiled today..

Note: activating the debug option is only so that users can capture some debug packets without stopping/starting Domoticz, reconnecting RFLink etc.
It is not meant to be used in normal operation.

Re: How to log RFLink "raw" messages in Domoticz ?

Posted: Wednesday 01 February 2017 16:28
by gerardwr
Stuntteam wrote:We crafted a quick and dirty solution for this.
Bedankt voor de snelle reactie, top!

Werkt prima.

Op deze manier kun je FF snel een Debug maken zonder gehannes.

In de D. log krijg ik nu plaats van deze weinig informatieve regel

Code: Select all

2017-02-01 21:37:19.686  (RFlink Original RPi Boven) Temp (Prologue Buiten)
na het 1-malig invoeren van "10;rfdebug=on;" deze uitgebreide informatie

Code: Select all

2017-02-01 21:37:29.153  User:  initiated RFLink Enable Debug mode with command: 10;rfdebug=on;
2017-02-01 21:37:29.229  RFLink: 20;8B;RFDEBUG=ON;
<knip>
2017-02-01 21:38:09.402  RFLink: 20;A1;Prologue;ID=94a0;TEMP=0038;
2017-02-01 21:38:09.402  (RFlink Original RPi Boven) Temp (Prologue Buiten)
2017-02-01 21:38:09.642  RFLink: 20;A2;DEBUG;Pulses=76;Pulses(uSec)=540,3720,450,1770,450,1800,450,3720,450,1770,450,3750,450,1770,450,1800,450,3750,450,1770,450,3720,450,1770,450,1770,450,1770,420,1800,420,1800,450,1800,450,1770,450,1800,450,1800,450,1800,450,1800,450,3750,450,3720,450,3720,450,1770,450,1800,450,1770,450,3720,450,3720,450,1770,450,1770,450,3750,450,3720,450,1770,450,1800,450,1890,480,6990;
De "Pulses" informatie heb je meestal niet nodig, maar de "raw" RFLink boodschappen zijn eigenlijk onmisbaar. Zeker als je D. aan het inrichten bent.

Ik zou dan ook willen voorstellen om in de toekomstige releases deze Q&D oplossing formeel te implementeren.

Ik stel me het volgende voor:

Deze informatie altijd in de Domoticz log opnemen

Code: Select all

2017-02-01 21:38:09.402  RFLink: 20;A1;Prologue;ID=94a0;TEMP=0038;
En deze informatie alleen bij het commando "10;rfdebug=on;"

Code: Select all

2017-02-01 21:38:09.642  RFLink: 20;A2;DEBUG;Pulses=76;Pulses(uSec)=540,3720,450,1770,450,1800,450,3720,450,1770,450,3750,450,1770,450,1800,450,3750,450,1770,450,3720,450,1770,450,1770,450,1770,420,1800,420,1800,450,1800,450,1770,450,1800,450,1800,450,1800,450,1800,450,3750,450,3720,450,3720,450,1770,450,1800,450,1770,450,3720,450,3720,450,1770,450,1770,450,3750,450,3720,450,1770,450,1800,450,1890,480,6990;
Wat vinden jullie?

Re: How to log RFLink "raw" messages in Domoticz ?

Posted: Tuesday 07 February 2017 0:14
by gerardwr
gerardwr wrote: Wat vinden jullie?
Ben benieuwd naar jullie reactie.

Re: How to log RFLink "raw" messages in Domoticz ?

Posted: Tuesday 07 February 2017 0:30
by Stuntteam
Eventueel een aparte mode om de standaard informatie zonder de pulses zichtbaar te maken.
Altijd aan lijkt me niet de beste oplossing..

Re: How to log RFLink "raw" messages in Domoticz ?

Posted: Tuesday 07 February 2017 12:27
by gerardwr
Stuntteam wrote:Eventueel een aparte mode om de standaard informatie zonder de pulses zichtbaar te maken.
Altijd aan lijkt me niet de beste oplossing..
Bedankt voor je reactie.

Aparte mode (zonder de pluses) zou ik al erg tevreden mee zijn, bijv met

Code: Select all

10;debug=on;
Als je vervolgens dan OOK nog met "10;rfdebug=on" de pulses kunt bijschakelen is het perfect.

Zag dat in de Domotizc source al een voorziening lijkt te zitten voor een dergelijke voorziening. In file :https://github.com/domoticz/domoticz/bl ... nkBase.cpp

Code: Select all

#ifdef ENABLE_LOGGING
if (!bHideDebugLog)
		_log.Log(LOG_NORM, "RFLink: %s", sLine.c_str());
#endif