Closed mak-gitdev closed 2 years ago
Thanks a lot for this useful contribution!
I have only a minor formal comment. According my understanding variable names with an underscore prefix are considered unused or private. This does not really fit to _id
? Maybe id_
or cur_id
would be better?
Btw, did you try to run pylint
on the code? I guess it should warn on this.
Do you want to fix this or shall I just merge the pull request as it is?
Hello @romor
I just made a new commit to take into account your comments.
I will run pylint
on the code from now. Thanks !
Improve grouping mechanism previously added by allowing multilevel grouping: For example, for D2-01-12, defining
channel = IO/CMD
in the device configuration will group received data under IOx/CMDy where x and y are the values of IO and CMD fields in the received packet. This improves message classification from multi-channel, multi-message EnOcean devices.Handling of packet.learn for VLD and RPS EnOcean devices: Python EnOcean library always sets packet.learn to True for VLD and RPS EnOcean devices even if the received packet is not a learn packet. It is the responsibility of the library users to handle those cases. RPS devices always send normal data telegrams so learn can always be considered false. VLD ones use UTE telegrams as learn mechanism. Hence, a packet once received is tested against aforementioned conditions to determine the correct value of packet.learn