calimero-project / calimero-core

Core library for KNX network access and management
Other
128 stars 65 forks source link

ProcessCommunicator.readBool switches light #52

Closed itineric closed 6 years ago

itineric commented 6 years ago

Hello,

First of all, thanks for the lib, great work ! Im starting a projet and just testing stuff with the API and provided examples. I have an issue I do not understand... I use processCommunicator.readBool(dpAddress) to get the current state of a switch group address. But when the read is performed, the light switches (off to on or the other way). I cannot understand why a read changes some value ?! How can I get the state of GA to initialize the states (get if the light is on or off) ?

Regards,

Eric

bmalinowsky commented 6 years ago

readXXX is the right command for read-only stuff. The read command does not contain any state of that group address, so I think the described behavior comes from somewhere else.

Do you have a chance to use a monitor while reading? For example, the ETS monitor, or the calimero ProcComm tool or GUI. (If you have a second KNX interface you can start a network/bus monitor on it, on the same interface you can only use the group monitor in parallel.)

It could be that some knx device issues a group write as response to the read? Or a read response is interpreted as write? This does not explain the toggle effect, though...

itineric commented 6 years ago

Thanks, I effectively have the same issue when reading the value of that particular GA using the group monitor. Still havent found why but looking into it but not a Calimero issue. Sorry.