lifeemotions / knx.net

KNX.net provides a KNX API for .NET
MIT License
101 stars 47 forks source link

Feedback status #63

Closed Malexys closed 3 years ago

Malexys commented 3 years ago

Hello, I want to print the status information of an address to the textbox. But I just couldn't. Can you help?

5/0/7 tempature set feedback

} string state; private void button7_Click(object sender, EventArgs e) {

        _connection = new KnxConnectionRouting { Debug = false, ActionMessageCode = 0x29 };
        _connection.KnxConnectedDelegate += Connected;
        _connection.KnxDisconnectedDelegate += Disconnected;
        _connection.KnxEventDelegate += Event;
        _connection.KnxStatusDelegate += Status;
        _connection.Connect();

        _connection.Action("5/0/8", 0x3E);  //tempature setpoint
        //_connection.Action(LightOnOffAddress2, false);
        Thread.Sleep(200);

        try
        {
            _connection.RequestStatus("5/0/7");
            int xxx = (int)_connection.FromDataPoint("9.001", state);
            comboBox1.Items.Add(xxx);

            _connection.Disconnect();
        }
        catch (Exception)
        {

        }