envy / esp-knx-ip

A KNX/IP library for the ESP8266 with Arduino
MIT License
136 stars 49 forks source link

How do I write a "small" telegram #9

Closed mrWheel closed 6 years ago

mrWheel commented 6 years ago

Hi Envy,

I try to use this great library to switch a lamp but it does not seem to work.

The log of KNXD shows these messages when I push a switch or dim with the same switch (see the first 3 log-lines). The same can be done by using the knxtool groupswrite command (I assume "s" stands for "small"):

LPDU: BC 11 82 10 0E E1 00 81 AE :L_Data low from 1.1.130 to 2/0/14 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 01 
LPDU: BC 11 83 10 0E E1 00 89 A7 :L_Data low from 1.1.131 to 2/0/14 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 09 
LPDU: BC 11 84 10 0E E1 00 88 A1 :L_Data low from 1.1.132 to 2/0/14 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write (small) 08 
LPDU: BC 11 85 10 0E E2 00 80 09 A2 :L_Data low from 1.1.133 to 2/0/14 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write 09 
LPDU: BC 11 82 18 0E E2 00 80 80 24 :L_Data low from 1.1.130 to 3/0/14 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write 80 

The last 2 lines are from the knxtool groupwrite command (without the "s").

Now, if i use the esp-knx-ip library and write a 1 byteInt value, the knxd log shows:

LPDU: BC 11 C8 08 0E E2 00 80 14 EA :L_Data low from 1.1.200 to 1/0/14 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write 14 
LPDU: BC 11 C8 08 0E E2 00 80 00 FE :L_Data low from 1.1.200 to 1/0/14 hops: 06 T_DATA_XXX_REQ A_GroupValue_Write 00 

It looks like a "groupwrite".

So, my question is: how do I send a "small" telegram? Here are the specs for a "small" telegram: image

The 1byteInt looks like these specs: image

mrWheel commented 6 years ago

Missed the sendBit() and writeBit() functions..