Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MQTT support #17

Open
marksev1 opened this issue Aug 25, 2017 · 11 comments
Open

Add MQTT support #17

marksev1 opened this issue Aug 25, 2017 · 11 comments
Assignees

Comments

@marksev1
Copy link

MQTT is an industry standard for home automation and machine 2 machine communication so it would be nice to have that implemented in your app to directly interface with home automation software.

@vitas
Copy link
Owner

vitas commented Sep 22, 2017

Hi, Could you provide more details about use cases, thanks

@marksev1
Copy link
Author

For example beacons would be placed in different parts of the house, when your app would detect one it would publish a MQTT message with a certain topic (for example /home/rooms/bedroom/) indicating in which room the app has detected that we are present. If needed/as an option, it could also send rssi values etc. in json format since I believe MQTT can also transfer that.

@vitas
Copy link
Owner

vitas commented Sep 26, 2017

so basically you need MQTT server to receive those messages, right? i do not think we will have enough customers/users using this feature, but i leave it as an enhancement request for the future. thanks

@vitas vitas self-assigned this Sep 26, 2017
@marksev1
Copy link
Author

No your app can serve as a mqtt client...the server is the app doing homeautomation (for example HASS running on RPi)...so your app would just need to be the client, I believe there are a lot of libs available for that so you could code it fast.

@vitas
Copy link
Owner

vitas commented Sep 26, 2017

I understand that the app will be a client, just worry about size of the app, it will much bigger and only few users will use the feature

@renekliment
Copy link

+1 on this

MQTT is heavily used for home automation and DIY tinkering and I believe it would be more convenient to a bunch of people.

@vitas
Copy link
Owner

vitas commented Oct 29, 2017

i can implement it, could someone tell me what we need to send to server? what data ist needed?

@marksev1
Copy link
Author

marksev1 commented Nov 6, 2017

Just identifier of beacon region and for example 1 or 0 depending on if we are entering a region or leaving it? Perhaps there could be a separate option to send rssi of beacon also...Renekliment do you have some other ideas.

@Netoperz
Copy link

Netoperz commented Nov 7, 2017

I think that a few information should be sent.

  1. RSSI - for estaimating distance from the beacon to the device with app on server side.
  2. Beacon mac adress/ID (for knowing is it "our" beacon and what kind
  3. Payload if there is some on beacon.

MQTT can work on separate topics, and publish the data to particular topic.

so in app there should be:

  1. a place in configuration that you can input
  • a MQTT server IP
  • port if different than standard mqtt , 1883 for standard TCP/IP, and 8883 for SSL TCP/IP
  1. A place to define topic name for particular data
  • topic name for RSSI
  • topic name for MAC
  • Topic name for Payload

That should be just fine to automate forwarding of the beacon stuff to some server side software using MQTT

Second thing (if we consider two way communication with backend (mqtt server and mainframe) we can add "listen" function as subscribing to additional "BACKlink" topic, that could be communication channel to the user interface.

So those functions together will grant You ability to locate beacons, transfer scanning results to backend and show backend response (of your choice) as result of being in range of particular beacon.

That is really Huge functionality, that can open a way to simple in house navigation, or smart actions with backend support.

@markrennie71
Copy link

I would love this

@hvddrift
Copy link

I was just about to ask about this.

There is another app: BeaconMQTT that seems to be an Alpha stage app. However, it did work with combining MQTT and iBeacons. The problem was the MQTT did not have the ability to add a Username or Password. I wrote to the developer and he replied:

"Unfortunately I don't really have the time for that right now. However, since the project is fully open source you can implement it yourself if you want :)

If you choose to implement it and create a PR I can see if I can push it to the play store as well.

https://github.com/bjaanes/BeaconMqtt

Good luck!"

Prehaps you could look at his code to integrate into your app?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants