5
votes

I have a Raspberry Pi running Windows IOT Core and it is running my home automation application. Now I need to set up communication between the RB pie and ESP8266.

I've been considering the MQTT protocol but I don't want to have an external server running the MQTT broker and I can't find a broker for the Win IOT. Does a MQTT broker exist for Windows IOT Core? If not, what communication protocol would you recommend for this purpose?

4
Which one did you eventually choose? Is there any more feedback you need? If not I suggest you accept the right answer so that SO can mark this question as closed, meta.stackexchange.com/questions/5234/….Marcel Stör

4 Answers

3
votes

Antonio there are a few options available for you on Windows IoT Core

If you're building an application using Node.js there's Mosca (http://www.mosca.io)

If you're building an application using Python, you can check out hbmqtt (https://github.com/beerfactory/hbmqtt)

Of course for .NET applications you can search Nuget. GnattMQ (www.nuget.org/packages/GnatMQ) seems to be pretty popular .NET library

2
votes

The is the GnatMQTT which is written in C# so I guess should build on Window IoT

1
votes

Possibly there exist some MQTT lib or another protocol. But I assume the following situation and going to suggest a solution:

Assumptions:

  • Rpi is at the core of the system.
  • ESP is working like satellite, sensor etc.
  • So ESP is reporting data to the Rpi
  • They (Rpi and ESPs) all are in the same subnet.

Solution:

  • On the Rpi side implement a simple UDP bcast listener and listen to some specific port on BROADCAST ip. (ex: 8889)
  • On the ESP side implement a UDP Client to send data to BROADCAST ip and to specific port. (ex: 8889)
  • Implement a message format and make ESP to send it and Rpi to parse it.

Example Message Format:

The message can be a string (ASCII encoded).

ABBBEEECCCDDDD.....DDD
A: Start Header
BBB: Sender ID
EEE: Receiver ID
CCC: Payload Byte Count
D..: Payload

OR

A|BBB|EEE|DDDDD..DDDDDD|F
A: Start Header
|: Seperator
BBB: Sender ID
EEE: Receiver ID
D..: DATA payload
F: End Header.

This config will allow you to use DHCP, not to record any IP address of the clients and it is cheap to implement (according to resources ram,cpu etc). Note: I don't know how MQTT uses resources.

-2
votes

There are a ton of MQTT brokers available. ActiveMQ is built with Java and can be installed on any platform that supports Java. Mosquitto and RabbitMQ have installers for Windows.

However, if you want something even more lightweight than MQTT you might also want to look into CoAP.