KNX "software" devices
marcopiraccini opened this issue · 4 comments
This is not exactly an "issue". I want to implement a KNX clock using node, I'm wondering if this is possible using node-eibd.
Indeed, excluding the ability of "programming" it through ETS, a timer simply generates at given intervals DPT 10 datatypes, so it should simply write "time"datagrams.
Has anyone an idea how these datagram should be created?
@marcopiraccini :
Currently sending DPT10 is not implemented.
AFAIK its a 24 byte payload with
3 bits for day of week (0 = none; 1 = Monday ; ...; 7 = Sunday)
5 bits for hour (00-23)
---- byte 1
2 bits ZERO as padding
6 bits for minutes (00-59)
---- byte 2
2 bits ZERO as padding
6 bits for seconds (00-59)
---- byte 3
==> so you probably can extend the encoder.js to handle DPT10 outgoing messages. The decoder.js is already capable of reading DPT10 and DPT11 (date) values. So you can have a look at that as a reference!
OK, I'll do that this we
Done, for both DPT10 and DPT11. See: #20
The "value" must be an arrya of numbers:
- [dayOfTheWeek, hour, minutes, seconds] -> DPT10
- [day, month, year] -> DPT11
Here the first "date" and "time" software components (still untested): https://github.com/marcopiraccini/knx-components