I am quite new to TTN and working on a project for 2 weeks now using the old api. Now that the old api v0 & v0.1 have been offline for a while and it doesn't seem like it is going back any time soon ( correct me if iam wrong) my project is in quite a mess without access to any ttn data. I read that TTN is stepping over to MQTT but i cant find any explanation on the wiki on how to work with this.
Also, the application iam building is built in c# and i tried some code to get things working again. But so far i haven't managed to get anything working. Here is some code i were try to "connect" to ttn.;
public MQTTController()
{
MqttClient client = new MqttClient("staging.thethingsnetwork.org");
client.MqttMsgPublishReceived += client_MqttMsgPublishReceived;
string clientId = Guid.NewGuid().ToString();
client.Connect(clientId);
client.Subscribe(new string[] { "+/devices/+/up" }, new byte[] { MqttMsgBase.QOS_LEVEL_EXACTLY_ONCE });
}
private void client_MqttMsgPublishReceived(object sender, MqttMsgPublishEventArgs e)
{
// do something with response
}
Is there anyone that could help me in the right direction so that i can get things working again?
Thanks in advance..
A Student