Go to advanced search

by awaisumar
Sun May 19, 2019 3:57 pm
Forum: Beginners
Topic: how to require username and password on remote shutdown of PI?
Replies: 5
Views: 176

how to require username and password on remote shutdown of PI?

I am running a web server and have an HTML button which upon clicking shutdown pi. web server implemented using Flask. now my question is how can I add some security and need username and password once i click on shutdown button. I am using sudo but if i do not use then i cant shutdown the pi at all...
by awaisumar
Thu Mar 28, 2019 6:50 am
Forum: Beginners
Topic: can't plot real time(MQTT) data using Matplotlib
Replies: 5
Views: 187

Re: can't plot real time(MQTT) data using Matplotlib

i tried with Queues too by using python Queue module but i am getting same error name as Main thread is not in Main Loop here is what i added in my code def on_message(client, userdata, message): dict_s=message.payload.decode('utf-8') json_data=json.loads(dict_s) Rssi =int(json_data['RSSI']) Lqi =in...
by awaisumar
Wed Mar 27, 2019 6:55 pm
Forum: Beginners
Topic: can't plot real time(MQTT) data using Matplotlib
Replies: 5
Views: 187

Re: can't plot real time(MQTT) data using Matplotlib

yes Andrayo the blockage is because of the the client.loop_start() you are right.the problem is ,as soon as it goes to callback function it stops the other code to run and simply stalls there. i am using list data structure and want o plot data in real time would this way will still make it real tim...
by awaisumar
Wed Mar 27, 2019 12:47 pm
Forum: Beginners
Topic: can't plot real time(MQTT) data using Matplotlib
Replies: 5
Views: 187

can't plot real time(MQTT) data using Matplotlib

i am having problem to plot the data in real time using. communication protocol is MQTT, plotting library is Matplotlib. and client library i am using is Paho eclipse python for pub/and sub. here is the part of my code: style.use('fivethirtyeight') fig=plt.figure() ax1=fig.add_subplot(1,1,1,) xs=[] ...
by awaisumar
Tue Mar 12, 2019 2:53 am
Forum: Advanced users
Topic: Getting MQTT data on webinterface
Replies: 5
Views: 364

Re: Getting MQTT data on webinterface

thanks andryoo for you reply. but what about websockets? what if i do port forwarding to port 9001 and then in my pahp javascript client i can use my public ip address and then can simply connect to the broker ? secondly what about if i use cloud broker? my sole purpose is to read the data remotely ...
by awaisumar
Tue Mar 12, 2019 1:07 am
Forum: Advanced users
Topic: Getting MQTT data on webinterface
Replies: 5
Views: 364

Re: Getting MQTT data on webinterface

this is what i was following. and there are many many links on the google with same suggestions.

https://stackoverflow.com/questions/289 ... e-internet
by awaisumar
Tue Mar 12, 2019 12:27 am
Forum: Advanced users
Topic: Getting MQTT data on webinterface
Replies: 5
Views: 364

Getting MQTT data on webinterface

I am new to to PI and MQTT but somehow managed to install everything properly and i can also publish and subscribe using Mosquitto broker. i have also used the Javascript client to use the websockets and see the messages in browser console or on web interface locally. my question is how can i connec...
by awaisumar
Mon Mar 11, 2019 8:30 pm
Forum: Advanced users
Topic: Mqtt Web Interface
Replies: 6
Views: 10653

Re: Mqtt Web Interface

@DougieLawson isn't it to observe reciving data only on local PC or in same network?
could you please tell me how can i have a web page like address ? e,g http or ws?because this Wegpage is stored on local host but i want to access this page from anywhere over internet
by awaisumar
Fri Mar 08, 2019 10:06 pm
Forum: General discussion
Topic: Difference Between Paho and Mosquitto?
Replies: 5
Views: 209

Re: Difference Between Paho and Mosquitto?

Thanks for your reply here is some interesting output from command line in PI i have gotten.i don't really know if i do have mosquitto or not in my PI. but all i did to install paho python client using PIP on windows and PI. and on the broker i used ip address of my PI making it publisher and i am ...
by awaisumar
Fri Mar 08, 2019 9:16 pm
Forum: General discussion
Topic: Difference Between Paho and Mosquitto?
Replies: 5
Views: 209

Re: Difference Between Paho and Mosquitto?

Thanks for your reply here is some interesting output from command line in PI i have gotten.i don't really know if i do have mosquitto or not in my PI. but all i did to install paho python client using PIP on windows and PI. and on the broker i used ip address of my PI making it publisher and i am a...
by awaisumar
Fri Mar 08, 2019 7:03 pm
Forum: General discussion
Topic: Difference Between Paho and Mosquitto?
Replies: 5
Views: 209

Difference Between Paho and Mosquitto?

Hello, i have googled it and could not find any answer that what is the difference between Paho and Mosquitto. i know Mosquitto is a Broker but is Paho also a broker or it just provide a way to implement Clients? because i have just ran this command sudo pip install paho-mqtt and in Pub/Sub code i m...
by awaisumar
Wed Feb 27, 2019 11:09 pm
Forum: Automation, sensing and robotics
Topic: Where does MQTT exactly fits between sensor and broker(Mosquitto).?
Replies: 4
Views: 252

Re: Where does MQTT exactly fits between sensor and broker(Mosquitto).?

Hello Andyroo, thanks for your reply i have edited the post so i hope it would be easier to understand now. i have read on internet that MQTT is used to make Communication between things using the broker in the middle.so in my case i have sensor-->PI-->DB (this is the flow of data). broker is runnin...
by awaisumar
Wed Feb 27, 2019 10:16 pm
Forum: Automation, sensing and robotics
Topic: Where does MQTT exactly fits between sensor and broker(Mosquitto).?
Replies: 4
Views: 252

Where does MQTT exactly fits between sensor and broker(Mosquitto).?

Hello All fellows, i am trying to make a home based test project to take the data from Sensor(Temp) and Wirelessly receiving it using Panstamp wirless node on PI and then uploading it on some Database or show it on monitor. the protocol used for wireless communication is "SWAP"(simple wireless abstr...

Go to advanced search