Closed ThomasLammens closed 7 years ago
Hi Thomas
The function doesn't return a value because the bus functions are async, you have to subscribe to events:
e.g.:
connection.KnxStatusDelegate += Status;
connection.RequestStatus("1/1/16");
static void Status(string address, string state)
{
if (address == "1/1/16")
{
decimal temp = (decimal)connection.FromDataPoint("9.001", state);
Console.WriteLine("New Event: device " + address + " has status " + temp);
return;
}
}
Hi Abel,
Thank you very much for your reply, it was a big help to us.
Kind regards, Thomas
Hey,
I am working on a vb.net project where one connected appliance, lets say a lightbulb for example can be turned on by my program, but also by a lightswitch. I was looking through the code to find out if there exists a statusrequest of my bus(adress). Of course, i found the "connection".statusrequest but this doesn't seem to return a value.
Is there a way in which I can read the status of an adress?
Kind regards, Thomas