Community
cancel
Showing results for 
Search instead for 
Did you mean: 
AAmar2
New Contributor I
1,320 Views

How to subscribe to a mqtt-broker(either an internet website or locally running on intel galileo) and Suitable battery for standalone opreations.

Hi friends!

 

I have written a python code that fetches sensor data(MPU6050) which then needs to be transmitted to either my laptop(connected to local network) or any computer over internet.After some searching I came to know of couple of options like dweet.io,mqtt etc. The latter is un-doubtedly more reliable and light weight. Ok,so now my problem is,I am able to publish my sensor data(from intel galileo) to the broker-- m2m.eclipse.org,however when I run the following code on my linux laptop--

curl http://mqtt.bridge.org/topic http://mqtt.bridge.org/topic.

It says the above site doesnt exist or error 404.

I need to know if there are other internet broker(server) available wherein I can publish my sensor data,so that others(clients) can subscribe to that same data?Kindly help!

 

Also please help me in selecting a stand alone power source for my intel galileo gen2.It is a little bit urgent!

Thanks in advance!

FGT

Tags (1)
0 Kudos
5 Replies
FTinetti
Honored Contributor I
51 Views

Hi mishra007,

I think

...

I have written a python code that fetches sensor data(MPU6050) which then needs to be transmitted to either my laptop(connected to local network) or any computer over internet.

...

is different from

..

I need to know if there are other internet broker(server) available wherein I can publish my sensor data,so that others(clients) can subscribe to that same data?

because

In the first case it's necessary a small infrastructure, basically a process in your laptop to receive sensor data sent from your Intel Galileo.

In the second case/scenario you are asking about a publish/subscribe computing model, which I think it actually is similar to what you comment on (including maybe a public server):

...

After some searching I came to know of couple of options like dweet.io,mqtt etc. The latter is un-doubtedly more reliable and light weight. Ok,so now my problem is,I am able to publish my sensor data(from intel galileo) to the broker-- m2m.eclipse.org,however when I run the following code on my linux laptop--

curl http://mqtt.bridge.org/topic http://mqtt.bridge.org/topic.

It says the above site doesnt exist or error 404.

I need to know if there are other internet broker(server) available wherein I can publish my sensor data,so that others(clients) can subscribe to that same data?

...

I think you should first define what you need.

BTW: what IDE/environment are you using for development? Eclipse is mentioned above, but I don't know it, so maybe I misunderstood your post.

About:

...

Also please help me in selecting a stand alone power source for my intel galileo gen2.It is a little bit urgent!

I think it's about power consumption, which is defined by the Intel Galileo Gen 2, 7 to 12 v, and I think I've seen several posts in this forum on current, take a look (or maybe some Intel people recalls). Beyond specific V and Amps, I've seen many times the suggestion about you should make sure there is no less than V-Amps provided to the card in order to avoid eventual damage. I think any battery with Intel Galileo Gen2 minimum power specifications compliance should work, in addition to you make sure the power source is not below suggested specificataions should work. I don't know of any specific battery to suggest, since I've not seen any Intel Galileo powered from source other than a wall wart power supply.

HTH,

Fernando.

AAmar2
New Contributor I
51 Views

FGT wrote:

Hi mishra007,

I think

...

I have written a python code that fetches sensor data(MPU6050) which then needs to be transmitted to either my laptop(connected to local network) or any computer over internet.

...

is different from

..

I need to know if there are other internet broker(server) available wherein I can publish my sensor data,so that others(clients) can subscribe to that same data?

because

In the first case it's necessary a small infrastructure, basically a process in your laptop to receive sensor data sent from your Intel Galileo.

In the second case/scenario you are asking about a publish/subscribe computing model, which I think it actually is similar to what you comment on (including maybe a public server):

...

After some searching I came to know of couple of options like dweet.io,mqtt etc. The latter is un-doubtedly more reliable and light weight. Ok,so now my problem is,I am able to publish my sensor data(from intel galileo) to the broker-- m2m.eclipse.org,however when I run the following code on my linux laptop--

curl http://mqtt.bridge.org/topic http://mqtt.bridge.org/topic.

It says the above site doesnt exist or error 404.

I need to know if there are other internet broker(server) available wherein I can publish my sensor data,so that others(clients) can subscribe to that same data?

...

I think you should first define what you need.

BTW: what IDE/environment are you using for development? Eclipse is mentioned above, but I don't know it, so maybe I misunderstood your post.

About:

...

Also please help me in selecting a stand alone power source for my intel galileo gen2.It is a little bit urgent!

I think it's about power consumption, which is defined by the Intel Galileo Gen 2, 7 to 12 v, and I think I've seen several posts in this forum on current, take a look (or maybe some Intel people recalls). Beyond specific V and Amps, I've seen many times the suggestion about you should make sure there is no less than V-Amps provided to the card in order to avoid eventual damage. I think any battery with Intel Galileo Gen2 minimum power specifications compliance should work, in addition to you make sure the power source is not below suggested specificataions should work. I don't know of any specific battery to suggest, since I've not seen any Intel Galileo powered from source other than a wall wart power supply.

HTH,

Fernando.

Hi FGT

Thanks for replying.I resolved the publish/subscribe issue by myself by changing certain lines of python code.Now it is working flawlessly.Instead of using "curl" in bash terminal ,I have written a simple python script to subscribe to my topic on broker.hivemq.com(which is a public server).It is this subscribe script that I run(on my laptop) to pull all of my sensor data from public server.

However my other problem remains and that is,selection of battery.I also need a cable in order to connect my intel galileo to this battery.What options do I have?

Also,I do not use any particular IDE as such.I mean I write my python codes directly in vim(intel galileo terminal). and in fact run the code using :!(python name_of_my_code) from within vim itself.Vim is very powerful editor.In fact all the bash commands can be run from within vim by using exclamation mark! I have attached my subscribe code below.PFA

PS-Can you direct me to those threads wherein they were discussing battery or stand alone operations of intel galileo gen 2?And thanks for your replies fernando!

PSS- Will this battery work?Kindly confirm.This has same specs as you've mentioned above-

 

http://www.dx.com/p/12-6v-6800mah-rechargeable-portable-emergency-power-li-ion-battery-91000?tc=INR&... .WMjQvUfhVhE http://www.dx.com/p/12-6v-6800mah-rechargeable-portable-emergency-power-li-ion-battery-91000?tc=INR&...
FTinetti
Honored Contributor I
51 Views

Hi mishra007,

It's good to know you managed to connect and use a publish/subscribe environment. Thanks for sending your example code and details about your development environment, it may encourage others.

About power, I'm far from being an expert... I've just read a looooot of threads about questions and suggestions. Once again, I'm sure I'm pretty sure Intel people know better (a looooot better) and I'd wait until they suggest something. I've found the following relevant threads:

Some of them are not exactly about batteries or Gen2, but i think they have valuable information (e.g. "it will need some electrical circuit to keep it from draining the battery too much").

Also take into account that some power consumption will be due to circuit/s you have to provide power through your Intel Galileo Gen2.

Since you have solved the publish/subscribe part of this thread, I suggest you open another thread specifically on the battery power supply option/s for your Intel Galileo Gen2 (and other electronic/s powered from your Intel Galileo Gen2...).

HTH,

Fernando.

AAmar2
New Contributor I
51 Views

FGT wrote:

Hi mishra007,

It's good to know you managed to connect and use a publish/subscribe environment. Thanks for sending your example code and details about your development environment, it may encourage others.

About power, I'm far from being an expert... I've just read a looooot of threads about questions and suggestions. Once again, I'm sure I'm pretty sure Intel people know better (a looooot better) and I'd wait until they suggest something. I've found the following relevant threads:

/message/266497# 266497 For intel galileo gen 2 battery problem

/message/345790# 345790 Re: Power Supply for Galileo Gen 2

/message/312144# 312144 Galileo Gen 2 power consumption / adapter

/message/257845# 257845 Regarding powering the two Galileo boards

/message/239492# 239492 Portable power for Galileo

/message/222343# 222343 Connection order; USB, Ethernet and Power?

/message/425313# 425313 Re: Galileo Gen 2 power connection options

/message/367095# 367095 Power Supply

Some of them are not exactly about batteries or Gen2, but i think they have valuable information (e.g. "it will need some electrical circuit to keep it from draining the battery too much").

Also take into account that some power consumption will be due to circuit/s you have to provide power through your Intel Galileo Gen2.

Since you have solved the publish/subscribe part of this thread, I suggest you open another thread specifically on the battery power supply option/s for your Intel Galileo Gen2 (and other electronic/s powered from your Intel Galileo Gen2...).

HTH,

Fernando.

Sure thing,I will open up another thread regarding battery.And thanks a lot again fernando!

FTinetti
Honored Contributor I
51 Views

mishra007 wrote:

...

Sure thing,I will open up another thread regarding battery.And thanks a lot again fernando!

You're welcome!

Fernando.

Reply