I read another thread initiated by hplus regarding the update of a device status when triggered externaly. Actually, I'm looking for the same in PLCBUS but it may be a bit different since in my case devices could be triggered by a local switch.
However, this is what the polling is meant for, I think.
When going through CPLCBUS.class I noticed the following (note I'm running a modified code with the address conversion (http://www.domoticaforum.eu/viewtopic.php?f=38&t=5777) and checksum on last byte(http://www.domoticaforum.eu/viewtopic.php?f=38&t=5735)):
- I have devices on different home addresses :
Code: Select all
[PLCBUS] Found PLCBUS device(s) with home address(es): B A
Code: Select all
2010/12/19 07:34:04 [PLCBUS] > 02 05 FA 10 1C 00 00 03
2010/12/19 07:34:04 [PLCBUS] > 02 05 FA 10 1C 00 00 03
2010/12/19 07:34:04 [PLCBUS] > 02 05 FA 00 1C 00 00 03
2010/12/19 07:34:04 [PLCBUS] > 02 05 FA 00 1C 00 00 03
2010/12/19 07:34:04 [PLCBUS] < 02 06 FA 10 1C 00 00 1C B6
2010/12/19 07:34:05 [PLCBUS] < 02 06 FA 10 1C 00 FF 40 93 Addr: B01 Cmd: GET_ALL_ID_PULSE Data1: 00 Data2: FF GET ALL ID PULSE UNITS: 00000000 11111111
2010/12/19 07:34:05 [PLCBUS] > 02 05 FA 10 1D 00 00 03
2010/12/19 07:34:05 [PLCBUS] > 02 05 FA 10 1D 00 00 03
2010/12/19 07:34:05 [PLCBUS] < 02 06 FA 10 1D 00 00 1C B5
2010/12/19 07:34:05 [PLCBUS] < 02 06 FA 10 1D 00 C8 40 C9 Addr: B01 Cmd: GET_ONLY_ON_ID_PULSE Data1: 00 Data2: C8 GET ONLY ON ID PULSE UNITS ON: 00000000 11001000
Then I trigger manually B1 for example (local switch):
Code: Select all
2010/12/19 07:41:05 [PLCBUS] < 02 06 FA 10 1D 00 C9 40 C8 Addr: B01 Cmd: GET_ONLY_ON_ID_PULSE Data1: 00 Data2: C9 GET ONLY ON ID PULSE UNITS ON: 00000000 11001001
However, it is not reported in the device status.
So I see the two following issues :
- polling is not run on all home addresses
- polling is not interpreted to update devices status
Do you agree ? I will try to propose a fix but I'm not too sure since I'm just starting with Gambas.