kipe / enocean

Python library for EnOcean serial protocol
MIT License
71 stars 101 forks source link

Creating RadioPacket with an rangeitem {value} description #121

Closed zpfvo closed 3 years ago

zpfvo commented 3 years ago

Iam trying to create a D2-01-01 radio packet. Problem is, that some datapoints are defined as range items using ne {value} escape for parsing. It seems like it is not possible to create packages from such a description because it cant find the value in the profile.

Example:

<enum description="Output value" shortcut="OV" offset="17" size="7">
  <item description="Output value 0% or OFF" value="0" />
  <rangeitem description="Output value {value}% or ON" start="1" end="100" />
  <rangeitem description="Not used" start="101" end="126" />
  <item description="output value not valid / not set" value="127" />
</enum>

When Iam trying to set OV to Output value 100% or ON it will not find the corresponding value. Is there a way around it or do u have to redefine the EEP.xml to a Integer profile.

zpfvo commented 3 years ago

I made a mistake. It works bei setting the raw value