Relative Content

Tag Archive for c#asynchronousmariadbthread-safetybuffer

KNX Bus – Read – Buffer – Write to SQL database. What best practice to perform deferral queue in Async way?

BackGround Info: For a Home Automation, an KNX installation (running sound and stable), setup a Group Address recorder. Logging values of heating control valve actuators positions, room temperatures, temperature Setpoints, Outside Temp, ect. KNX supplies the Falcon SDK to get access to the bus. This SDK facilitates a bus “MessageReceived” Event. With this you can capture all traffic and filter for EventType. With method “bus.RequestGroupValueAsync(<groupaddress)” you can ping the bus actively. Up on arrival, I’m converting the inbound telegrams into a business object “Telegram”, buffer this a List and write towards table in a MariaDB (wit INSERT Stored Procedure). The logging is working. NOTE: Inbound traffic on a “busy bus” can be average 3 msg/sec up to 12 msg/sec at peak.