|
@@ -16,18 +16,18 @@ namespace SicknessReduction.Haptic
|
|
|
{
|
|
|
server = new MqttFactory().CreateMqttServer();
|
|
|
var service = new ServiceProfile("blabla", "_mqtt._tcp", 1883,
|
|
|
- new[] {new IPAddress(new[] {(byte) 192, (byte) 168, (byte) 1, (byte) 4})});
|
|
|
+ new[] {new IPAddress(new[] {(byte) 192, (byte) 168, (byte) 1, (byte) 7})});
|
|
|
var sd = new ServiceDiscovery();
|
|
|
sd.Advertise(service);
|
|
|
await server.StartAsync(new MqttServerOptions());
|
|
|
Debug.Log("Mqtt Server started");
|
|
|
- await PublishBla();
|
|
|
+ //await PublishBla();
|
|
|
}
|
|
|
|
|
|
public async Task PublishBla()
|
|
|
{
|
|
|
- await server.PublishAsync(new MqttApplicationMessageBuilder().WithTopic("Test/Bla")
|
|
|
- .WithPayload("Hallihallo").Build());
|
|
|
+ await server.PublishAsync(new MqttApplicationMessageBuilder().WithTopic("Fan/0/Control")
|
|
|
+ .WithPayload("Hallihallo\0").Build());
|
|
|
}
|
|
|
|
|
|
private async void Update()
|
|
@@ -36,7 +36,8 @@ namespace SicknessReduction.Haptic
|
|
|
if (dif > 4f)
|
|
|
{
|
|
|
lastTime = Time.time;
|
|
|
- await PublishBla();
|
|
|
+ //TODO: publish proper data
|
|
|
+ //await PublishBla();
|
|
|
}
|
|
|
}
|
|
|
|