Comments (5)
Hi,
I added a string sending method for DPT16. Please try it out, I did not test it.
from esp-knx-ip.
Many thanks Envy.
I tried to compile my sctach but it didn't work.
In the file "esp-knx-ip.h" I delete the parts "knx_command_type_t ct,".
So from:
void write_14byte_string(address_t const &receiver, knx_command_type_t ct, const char *val) { send_14byte_string(receiver, KNX_CT_WRITE, val); }
to:
void write_14byte_string(address_t const &receiver, const char *val) { send_14byte_string(receiver, KNX_CT_WRITE, val); }
Now it is compilingand tomorrow I will do a test with the sensor. I keep you posted.
Many thanks.
Poseidon
from esp-knx-ip.
Whoops, sorry.
Copy and paste error on my side. I fixed this in the repo, too.
from esp-knx-ip.
Hi Envy,
I tested today and now it working but I had to do some changes in esp-knx-ip-send.cpp.
Following is the change:
void ESPKNXIP::send_14byte_string(address_t const &receiver, knx_command_type_t ct, const char *val)
{
uint8_t buf[15] = {0x00};
int len = strlen(val);
if (len > 15)
{
len = 15;
}
memcpy(buf+1, val, len);
send(receiver, ct, 15, buf);
}
I got some strange values and I assume that there was something in buf. So I took the value from the examples above the file {0x00.
And the length have do be 15 otherwise ETS will not show only 13 bytes.
I don't really understand how it works so I did try and error and end up with a working result.
Many thanks
Poseidon
from esp-knx-ip.
Thanks, fixed. I forgot to initialize the array and account for the first extra byte being needed.
from esp-knx-ip.
Related Issues (20)
- [ Question ] Sending and receiving a float type value HOT 2
- ESPAsyncUDP stop working on Arduino Core STAGE HOT 1
- Static example does not compile HOT 6
- Compile error with 2.5.0-beta1 - invalid operands of types 'double' and 'int' to binary 'operator&' HOT 1
- KNX Communication - uncalled UDP response HOT 13
- ESP ETS5 registration HOT 1
- ESP32 HOT 1
- Receive messages on group 2/1/0 HOT 2
- Make MULTICAST_IP externally configurable using compiler switches HOT 8
- physical address HOT 1
- Hello, has anyone managed to get this library to work with esp32? HOT 2
- Simple 1-bit 'Blink' to group address
- Consistent spelling of GA/PA
- Read GA associated to callback
- limited config params count? HOT 1
- Port to ESP32? HOT 10
- No Issues But ethernet ..
- physical address problems for programming in ETS5 HOT 7
- Error: flexible array member in union
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp-knx-ip.