I found a way to debug the data send/received from RFLink and found out that dzVents is failing to send the "on" once the PIR was triggerd.
Code: Select all
Re: How to log RFLink "raw" messages in Domoticz ?
Post by Stuntteam » Wednesday 01 February 2017 14:52
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.
I Changed the switch to 'Schemerlamp Teak Kastje' in the dzVents script.
So what I did: 1. Turn on/off the light manually using the GUI of Domoticz. (The light did turn on and off).
Than I triggered the PIR so the script could kick in.
I found out that when I mannually turn on the light during the 60 seconds of the script, The lights are switched off by the script.
So it seem that the Switch ON is the problem.
2018-12-01 21:32:48.806 Status: User: Admin initiated a switch command (21/Schemerlamp Teak Kastje/On)
2018-12-01 21:32:48.807 Status: RFLink Sending: 10;TriState;8aa290;10;ON;
2018-12-01 21:32:49.062 RFLink: 20;D3;OK;
2018-12-01 21:32:49.066 (RFLink) Light/Switch (Schemerlamp Teak Kastje)
2018-12-01 21:32:54.543 RFLink: 20;D4;OK;
2018-12-01 21:32:54.547 (RFLink) Light/Switch (Schemerlamp Teak Kastje)
2018-12-01 21:32:54.278 Status: User: Admin initiated a switch command (21/Schemerlamp Teak Kastje/Off)
2018-12-01 21:32:54.279 Status: RFLink Sending: 10;TriState;8aa290;10;OFF;
2018-12-01 21:33:12.092 RFLink: 20;D5;DEBUG;Pulses=50;Pulses(uSec)=1200,300,1110,300,300,1110,300,1110,300,1110,1110,300,300,1110,300,1110,1110,300,1110,300,1110,300,300,1110,300,1110,300,1110,1110,300,300,1110,300,1110,300,1110,1110,300,1110,300,300,1110,1110,300,1110,300,300,1110,300,6990;
2018-12-01 21:33:12.100 RFLink: 20;D6;EV1527;ID=0c4e23;SWITCH=06;CMD=ON;
2018-12-01 21:33:12.112 (RFLink) Light/Switch (PIR)
2018-12-01 21:33:12.194 RFLink: 20;D7;DEBUG;Pulses=50;Pulses(uSec)=1200,300,1110,300,300,1110,300,1110,300,1110,1110,300,300,1110,300,1110,1110,300,1110,300,1110,300,300,1110,300,1110,300,1110,1110,300,300,1110,300,1110,300,1110,1110,300,1110,300,300,1110,1110,300,1110,300,300,1110,300,6990;
2018-12-01 21:33:12.360 RFLink: 20;D8;DEBUG;Pulses=50;Pulses(uSec)=1200,300,1110,300,300,1110,300,1110,300,1110,1110,300,300,1110,300,1110,1110,300,1110,300,1110,300,300,1110,300,1110,300,1110,1110,300,300,1110,300,1110,300,1110,1110,300,1110,300,300,1110,1110,300,1110,300,300,1110,300,6990;
2018-12-01 21:33:12.404 RFLink: 20;D9;DEBUG;Pulses=50;Pulses(uSec)=1200,300,1110,300,300,1110,300,1110,300,1110,1110,300,300,1110,300,1110,1110,300,1110,300,1110,300,300,1110,300,1110,300,1110,1110,300,300,1110,300,1110,300,1110,1110,300,1110,300,300,1110,1110,300,1110,300,300,1110,300,6990;
2018-12-01 21:33:12.617 RFLink: 20;DA;OK;
2018-12-01 21:33:12.620 (RFLink) Light/Switch (Schemerlamp Teak Kastje)
2018-12-01 21:33:12.760 RFLink: 20;DB;DEBUG;Pulses=50;Pulses(uSec)=1200,300,1110,300,300,1110,300,1110,300,1110,1110,300,300,1110,300,1110,1110,300,1110,300,1110,300,300,1110,300,1110,300,1110,1110,300,300,1110,300,1110,300,1110,1110,300,1110,300,300,1110,1110,300,1110,300,300,1110,300,6990;
2018-12-01 21:33:12.862 RFLink: 20;DC;DEBUG;Pulses=50;Pulses(uSec)=1200,300,1110,300,300,1110,300,1110,300,1110,1110,300,300,1110,300,1110,1110,300,1110,300,1110,300,300,1110,300,1110,300,1110,1110,300,300,1110,300,1110,300,1110,1110,300,1110,300,300,1110,1110,300,1110,300,300,1110,300,6990;
2018-12-01 21:33:12.969 RFLink: 20;DD;DEBUG;Pulses=50;Pulses(uSec)=1200,300,1110,300,300,1110,300,1110,300,1110,1110,300,300,1110,300,1110,1110,300,1110,300,1110,300,300,1110,300,1110,300,1110,1110,300,300,1110,300,1110,300,1110,1110,300,1110,300,300,1110,1110,300,1110,300,300,1110,300,6990;
2018-12-01 21:33:12.206 Status: dzVents: Info: Handling events for: "PIR", value: "On"
2018-12-01 21:33:12.206 Status: dzVents: Info: PIR: ------ Start internal script: Kippenhok log: Device: "PIR (RFLink)", Index: 64
2018-12-01 21:33:12.207 Status: dzVents: Debug: PIR: Processing device-adapter for Schemerlamp Teak Kastje: Switch device adapter
2018-12-01 21:33:12.207 Status: dzVents: Debug: PIR: PIR state: On
2018-12-01 21:33:12.207 Status: dzVents: Debug: PIR: Schemerlamp Teak Kastje state: Off
2018-12-01 21:33:12.207 Status: dzVents: Debug: PIR: PIR.state is On
2018-12-01 21:33:12.207 Status: dzVents: Debug: PIR: Constructed timed-command: On
2018-12-01 21:33:12.207 Status: dzVents: Debug: PIR: Constructed timed-command: On
2018-12-01 21:33:12.207 Status: dzVents: Debug: PIR: Constructed timed-command: Off
2018-12-01 21:33:12.208 Status: dzVents: Debug: PIR: Constructed timed-command: Off AFTER 60 SECONDS
2018-12-01 21:33:12.208 Status: dzVents: Info: PIR: ------ Finished Kippenhok log
2018-12-01 21:33:12.270 Status: EventSystem: Script event triggered: /home/pi/domoticz/dzVents/runtime/dzVents.lua
2018-12-01 21:33:12.283 Status: RFLink Sending: 10;TriState;8aa290;10;ON;
2018-12-01 21:33:13.071 RFLink: 20;DE;DEBUG;Pulses=50;Pulses(uSec)=1170,300,1110,300,300,1110,300,1110,300,1110,1110,300,300,1110,300,1110,1110,300,1110,300,1110,300,300,1110,300,1110,300,1110,1110,300,300,1110,300,1110,300,1110,1110,300,1110,300,300,1110,1110,300,1110,300,300,1110,300,6990;
2018-12-01 21:33:13.174 RFLink: 20;DF;DEBUG;Pulses=50;Pulses(uSec)=1200,300,1110,300,300,1110,300,1110,300,1110,1110,300,300,1110,300,1110,1110,300,1110,300,1110,300,300,1110,300,1110,300,1110,1110,300,300,1110,300,1110,300,1110,1110,300,1110,300,300,1110,1110,300,1110,300,300,1110,300,6990;
2018-12-01 21:33:13.275 RFLink: 20;E0;DEBUG;Pulses=50;Pulses(uSec)=1200,300,1110,300,300,1110,300,1110,300,1110,1110,300,300,1110,300,1110,1110,300,1110,300,1110,300,300,1110,300,1110,300,1110,1110,300,300,1110,300,1110,300,1110,1110,300,1110,300,300,1110,1110,300,1110,300,300,1110,300,6990;
2018-12-01 21:33:13.378 RFLink: 20;E1;DEBUG;Pulses=50;Pulses(uSec)=1200,300,1110,300,300,1110,300,1110,300,1110,1110,300,300,1110,300,1110,1110,300,1110,300,1110,300,300,1110,300,1110,300,1110,1110,300,300,1110,300,1110,300,1110,1110,300,1110,300,300,1110,1110,300,1110,300,300,1110,300,6990;
2018-12-01 21:33:22.133 (RFLink) Light/Switch (PIR)
2018-12-01 21:33:22.263 Status: dzVents: Info: Handling events for: "PIR", value: "Off"
2018-12-01 21:33:22.263 Status: dzVents: Info: PIR: ------ Start internal script: Kippenhok log: Device: "PIR (RFLink)", Index: 64
2018-12-01 21:33:22.264 Status: dzVents: Debug: PIR: Processing device-adapter for Schemerlamp Teak Kastje: Switch device adapter
2018-12-01 21:33:22.264 Status: dzVents: Debug: PIR: PIR state: Off
2018-12-01 21:33:22.264 Status: dzVents: Debug: PIR: Schemerlamp Teak Kastje state: On
2018-12-01 21:33:22.264 Status: dzVents: Info: PIR: ------ Finished Kippenhok log
2018-12-01 21:34:12.504 RFLink: 20;E2;OK;
2018-12-01 21:34:12.507 (RFLink) Light/Switch (Schemerlamp Teak Kastje)
2018-12-01 21:34:12.271 Status: RFLink Sending: 10;TriState;8aa290;10;OFF;