Code Monkey home page Code Monkey logo

Comments (17)

toddtreece avatar toddtreece commented on July 21, 2024

I've personally never used MQTT, but I've been planning on seeing how to integrate it. I'll let you know once I take a look at how it works.

from phant.

johncohn avatar johncohn commented on July 21, 2024

+1 for mqtt.. I use it for everything. for many things I find it easier to use than REST (eg, no need to poll for input). It's also very light weight.

from phant.

toddtreece avatar toddtreece commented on July 21, 2024

@jsilence & @johncohn:

I have spun up a new test server with a new (hopefully better) topic format at http://phantmqtt.sparkfun.com. You can test the server by downloading this Gist: https://gist.github.com/toddtreece/feb66ddef602c8ec0c1e

You'll need to run npm install and then node client.js from the extracted folder to start the client.

Topics

I'm going to use PUBLIC and PRIVATE as placeholders for your keys. Replace the placeholders with the hashes given to you during the creation process.

Pushing data

Payloads should be JSON encoded, and should only include the fields you defined when creating your stream.

Topic for pushing data

input/PUBLIC/PRIVATE

Push confirmations

Confirmations about the status of pushes can be subscribed to using the following topic.

Topic for responses about status of pushed data

response/PUBLIC/input

Live data output

Phant can receive data from multiple sources (HTTP, TCP, UDP, MQTT, etc), so if you'd like to receive the data from all sources, you can subscribe to the stream by using the following topic format.

Topic for subscribing to JSON encoded payloads with all fields

output/PUBLIC

If you would like to subscribe to a specific field, you can use the following format and replace FIELD_NAME with the name of your field.

Topic for subscribing to a specific field

output/PUBLIC/FIELD_NAME

from phant.

johncohn avatar johncohn commented on July 21, 2024

Todd,
I still can't build on x64 Win 7.. I will try to test at the end of the
week. In the mean time, do you have a broker set up on your end that I can
try to hit ?
-jc

John Cohn Ph.D,
IBM Fellow , Corporate Technical Strategy
phone 802-578-0985

From: Todd Treece [email protected]
To: sparkfun/phant [email protected]
Cc: John M Cohn/Burlington/IBM@IBMUS
Date: 08/12/2014 10:53 AM
Subject: Re: [phant] Consider MQTT input (#55)

@jsilence & @johncohn:
I have spun up a new test server with a new (hopefully better) topic
format at http://phantmqtt.sparkfun.com. You can test the server by
downloading this Gist:
https://gist.github.com/toddtreece/feb66ddef602c8ec0c1e
You'll need to run npm install and then node client.js from the extracted
folder to start the client.
Topics
I'm going to use PUBLIC and PRIVATE as placeholders for your keys. Replace
the placeholders with the hashes given to you during the creation process.
Pushing data
Payloads should be JSON encoded, and should only include the fields you
defined when creating your stream.
Topic for pushing data
input/PUBLIC/PRIVATE

Push confirmations
Confirmations about the status of pushes can be subscribed to using the
following topic.
Topic for responses about status of pushed data
response/PUBLIC/input

Live data output
Phant can receive data from multiple sources (HTTP, TCP, UDP, MQTT, etc),
so if you'd like to receive the data from all sources, you can subscribe
to the stream by using the following topic format.
Topic for subscribing to JSON encoded payloads with all fields
output/PUBLIC

If you would like to subscribe to a specific field, you can use the
following format and replace FIELD_NAME with the name of your field.
Topic for subscribing to a specific field
output/PUBLIC/FIELD_NAME


Reply to this email directly or view it on GitHub.

from phant.

toddtreece avatar toddtreece commented on July 21, 2024

@johncohn
http://phantmqtt.sparkfun.com is the instance of phant with the broker running on port 1883. You shouldn't need to build anything if you have your own MQTT client.

from phant.

johncohn avatar johncohn commented on July 21, 2024

So fat so good . I can connect with the broker and publish

-jc

John Cohn
+1 802 578 0985

On Aug 12, 2014, at 4:22 PM, "Todd Treece" [email protected] wrote:

@johncohn
http://phantmqtt.sparkfun.com is the instance of phant with the broker running on port 1883. You shouldn't need to build anything if you have your own MQTT client.


Reply to this email directly or view it on GitHub.

from phant.

jsilence avatar jsilence commented on July 21, 2024

Was able to connect, subscribe and publish with the WMQTT Sample client (ia92).
Thank you for implementing this protocol!

from phant.

toddtreece avatar toddtreece commented on July 21, 2024

MQTT over websockets is now live on data.sparkfun.com. I'm currently trying to get the load balancer to forward tcp traffic to 1883 and 8883 for ssl. I'll close the bug when mqtt over tcp is live.

from phant.

johncohn avatar johncohn commented on July 21, 2024

I am out of the office until 09/02/2014.

I am out of the office until 9/2/2014 having my turboencabulator
refragulated. I will not have access to email. Talk to you then. Thanks !

Note: This is an automated response to your message "Re: [phant] Consider
MQTT input (#55)" sent on 08/21/2014 19:06:10.

This is the only notification you will receive while this person is away.

from phant.

toddtreece avatar toddtreece commented on July 21, 2024

MQTT on data.sparkfun.com port 1883 is live, and I'm working on getting SSL enabled on port 8883. I'm going to close this issue, but I'll post once SSL is enabled.

from phant.

bbhoss avatar bbhoss commented on July 21, 2024

I'm trying to publish to "input/PUBLIC/PRIVATE" to no avail. The server just immediately closes the connection without cause. Can someone confirm this still works?

Thanks

from phant.

hollie avatar hollie commented on July 21, 2024

I'm using the MQTT interface to receive values from a datastream on data.sparkfun.com and it works well.

One question: would be possible to set the 'retained' flag to data that is posted to the MQTT broker? This way a new client gets an update of the last received value from the broker upon connecting. Otherwise the client needs to wait for a new value to be posted to the broker before it receives its first value. If there are only a few values posted per day then the client is in the blue about the status of the data source for quite an extended time. The retained flag solves this. See here for some more details on this.

Regards,
Lieven.

from phant.

q2dg avatar q2dg commented on July 21, 2024

Last suggestion is interesting.
On the other hand: "I'm going to close this issue, but I'll post once SSL is enabled."...isn't it still?
Thanks!

from phant.

erniberni avatar erniberni commented on July 21, 2024

I just tried to connect to my stream at data.sparkfun.com with a mqtt client and failed
broker: data.sparkfun.com
port:1883
(no connection to broker)
What I'm doing wrong ?

edit: now I get the connection, user and password has to be filled but no data when I subscribe to
output/PUBLIC/FIELD_NAME

edit: seems to work now. I don't know what was wrong

from phant.

erniberni avatar erniberni commented on July 21, 2024

After some trials with Chromium MQTT Client and also Arduino I found the MQTT broker on data.sparkfun.com very unreliable. Most times the connection breaks after a while and not all messages (changes on the channel) are submitted to the subscribed client.
The same test arrangement is running with broker.hivemq.com very stable.

from phant.

q2dg avatar q2dg commented on July 21, 2024

Latest commit is from 3 Nov 2015.
Mmm...mmmm

from phant.

erniberni avatar erniberni commented on July 21, 2024

I know, but the service is working. Any alternative?

from phant.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.