SlideShare a Scribd company logo
1 of 8
Download to read offline
OpenPicus Web Controlled Simulator & Tweet,
Nimbits and ThingSpeak messages
This project is integrating several technologies, found during the investigation of my new FlyPort :
- Web server
- Wifi connection
- Dynamic variables substitutions (in xml files)
- Ajax callbacks
- jQuery use case
- Dynamic Memory allocation (malloc/free) (see heap.s)
- Web service calls : for tweeter, thingspeak and nimbits
-
The web page here is explaining the outcome :
Architecture of the project :
The Flyport is connected to my PC for development, and power.
I use my tablet as a browser for controlling the simulator User Interface, as well as to get the results of the web services
published by the FlyPort on the right side.
I created accounts for Nimbits, Thingspeak and declare some channels inside to be able to publish.
I used for the test my own twitter, but it is advised to change by a dedicated account for the sensors you want to
monitor.
For twitter, you will get a key to let your sensor write into the stream.
For Thingspeak & Nimbits, idem, you will need a key for sending your data to the right channel.
Web page : index.htm and its Flyport processing,
File buttons.cgi and its processing.
Note : The buttons.cgi file contains :
When calling the Flyport web server, the function HTTPPrint_cgi() is called. Here we have choosen to toggle a led only.
Ajax processing of files : status.xml & data.xml
I have integrated the jQuery exemple with the file main.js(see above) included in the index.htm page
You see in the index.htm page 3 mydynvar areas that will be set by the function called readData()
This readData() is making a get of the data.xml file of the Flyport server.
While processing the data.xml content below, you see that 2 variables t & rh will be substituted by the result of the
server call of the HTTPPrint_xxx() functions.
2nd Ajax example :
In the status.xml that is called by the Javascript of the index.htm directly, the similar substitution is made in the server.
The newAjaxcommand is launching the updateStatus javascript function every 500mS.
Inside the updateStatus, the data is received and the setDisplay will display the numbers on the web page (big digits)
Here ~t~ and ~rh~ will be replaced by the values returned by the HTTPPrint_t &nd HTTPPrint_rh in the server.
Posting messages to tweeter & others
While a button is pressed, the status is set in the server, in one variable that is shared with the main loop.
A switch is used to select the right operation to make depending of the user’s choice
Then 2 libraries are integrated to the project
- Nimbits.c/.h
- Thingspeak.c/.h (included tweet and thingspeak, as well as query not demonstrated in that case)
I updated the nimbits(simplified, as it was crashing)
void wfNIMBITS(char* hostappspot, char* email, char* secret, char* namevalue, float* value);
I also integrated some dynamic memory allocation to avoid the static alloc of hundreds of bytes in each function that
will not be released. Use of malloc / free.
For that I integrated a heap.s file in the project directory
corresponds to a heap of 2000 bytes.
Reusing the sources & testing the project on your own
1. Edit the myaccounts.h file and put inside the keys you will get from Twitter, ThingSpeak and Nimbits
If you do want to remove some, just remove the call to the function in the main task code.
2. Then in the OpenPicus IDE, open the existing project file temperatura.conf
3. Click on the Wizard for the connection setup,
4. and the Web Pages button to generate the intermediate code.
5. Launch the compilation of the project.
6. Download to the Flyport
Then connect your browser to the IP address of your http Flyport defined in the configuration wizard (like 192.168.0.27)
You should see the main page as above.
Then you will check that your actions to send message is fine by connecting to each of the sites (twitter, thingspeak or
nimbits) to verify that the messages are well received and recorded.
I have noticed that the processing of one message is lasting >10 seconds, so you have to wait between clicks…
It could be improved by putting some real time programming like critical areas and semaphores, but for this project it
is fine with me.

More Related Content

What's hot

From Apache Flink® 1.3 to 1.4
From Apache Flink® 1.3 to 1.4From Apache Flink® 1.3 to 1.4
From Apache Flink® 1.3 to 1.4Till Rohrmann
 
Flink Forward Berlin 2017: Till Rohrmann - From Apache Flink 1.3 to 1.4
Flink Forward Berlin 2017: Till Rohrmann - From Apache Flink 1.3 to 1.4Flink Forward Berlin 2017: Till Rohrmann - From Apache Flink 1.3 to 1.4
Flink Forward Berlin 2017: Till Rohrmann - From Apache Flink 1.3 to 1.4Flink Forward
 
IoT with OpenPicus Flyport
IoT with OpenPicus FlyportIoT with OpenPicus Flyport
IoT with OpenPicus FlyportIonela
 
02 wireshark http-sept_15_2009
02   wireshark http-sept_15_200902   wireshark http-sept_15_2009
02 wireshark http-sept_15_2009Vothe Dung
 
692015 programming assignment 1 building a multi­threaded w
692015 programming assignment 1 building a multi­threaded w692015 programming assignment 1 building a multi­threaded w
692015 programming assignment 1 building a multi­threaded wsmile790243
 
Test automation of ap is using postman
Test automation of ap is using postmanTest automation of ap is using postman
Test automation of ap is using postmanBugRaptors
 
Web_Crawler
Web_CrawlerWeb_Crawler
Web_CrawlerQualys
 

What's hot (9)

From Apache Flink® 1.3 to 1.4
From Apache Flink® 1.3 to 1.4From Apache Flink® 1.3 to 1.4
From Apache Flink® 1.3 to 1.4
 
mush With Xampp
mush With Xamppmush With Xampp
mush With Xampp
 
REST API Basics
REST API BasicsREST API Basics
REST API Basics
 
Flink Forward Berlin 2017: Till Rohrmann - From Apache Flink 1.3 to 1.4
Flink Forward Berlin 2017: Till Rohrmann - From Apache Flink 1.3 to 1.4Flink Forward Berlin 2017: Till Rohrmann - From Apache Flink 1.3 to 1.4
Flink Forward Berlin 2017: Till Rohrmann - From Apache Flink 1.3 to 1.4
 
IoT with OpenPicus Flyport
IoT with OpenPicus FlyportIoT with OpenPicus Flyport
IoT with OpenPicus Flyport
 
02 wireshark http-sept_15_2009
02   wireshark http-sept_15_200902   wireshark http-sept_15_2009
02 wireshark http-sept_15_2009
 
692015 programming assignment 1 building a multi­threaded w
692015 programming assignment 1 building a multi­threaded w692015 programming assignment 1 building a multi­threaded w
692015 programming assignment 1 building a multi­threaded w
 
Test automation of ap is using postman
Test automation of ap is using postmanTest automation of ap is using postman
Test automation of ap is using postman
 
Web_Crawler
Web_CrawlerWeb_Crawler
Web_Crawler
 

Viewers also liked

openPicus Proto Nest Datasheet
openPicus Proto Nest DatasheetopenPicus Proto Nest Datasheet
openPicus Proto Nest DatasheetIonela
 
Stm32 vl discovery recensione - 2010-11-11
Stm32 vl discovery   recensione  - 2010-11-11Stm32 vl discovery   recensione  - 2010-11-11
Stm32 vl discovery recensione - 2010-11-11Ionela
 
Flyport openPicus datasheet
Flyport openPicus datasheetFlyport openPicus datasheet
Flyport openPicus datasheetIonela
 
Flyport wifi webserver configuration page
Flyport wifi webserver configuration pageFlyport wifi webserver configuration page
Flyport wifi webserver configuration pageIonela
 
Arduino basic workshop
Arduino basic workshopArduino basic workshop
Arduino basic workshopDaniele Iori
 

Viewers also liked (6)

openPicus Proto Nest Datasheet
openPicus Proto Nest DatasheetopenPicus Proto Nest Datasheet
openPicus Proto Nest Datasheet
 
Stm32 vl discovery recensione - 2010-11-11
Stm32 vl discovery   recensione  - 2010-11-11Stm32 vl discovery   recensione  - 2010-11-11
Stm32 vl discovery recensione - 2010-11-11
 
Flyport openPicus datasheet
Flyport openPicus datasheetFlyport openPicus datasheet
Flyport openPicus datasheet
 
Flyport wifi webserver configuration page
Flyport wifi webserver configuration pageFlyport wifi webserver configuration page
Flyport wifi webserver configuration page
 
Arduino basic workshop
Arduino basic workshopArduino basic workshop
Arduino basic workshop
 
Vlsi stick daigram (JCE)
Vlsi stick daigram (JCE)Vlsi stick daigram (JCE)
Vlsi stick daigram (JCE)
 

Similar to How to Integrate Internet of Things with Webserver with

Qtp not just for gui anymore
Qtp   not just for gui anymoreQtp   not just for gui anymore
Qtp not just for gui anymorePragya Rastogi
 
Filemaker Pro in the Pre-Media environment
Filemaker Pro in the Pre-Media environmentFilemaker Pro in the Pre-Media environment
Filemaker Pro in the Pre-Media environmentTom Langton
 
The ActionScript Conference 08, Singapore - Developing ActionScript 3 Mash up...
The ActionScript Conference 08, Singapore - Developing ActionScript 3 Mash up...The ActionScript Conference 08, Singapore - Developing ActionScript 3 Mash up...
The ActionScript Conference 08, Singapore - Developing ActionScript 3 Mash up...marcocasario
 
3 Ways to Get Started with a React App in 2024.pdf
3 Ways to Get Started with a React App in 2024.pdf3 Ways to Get Started with a React App in 2024.pdf
3 Ways to Get Started with a React App in 2024.pdfBOSC Tech Labs
 
New Flash Builder 4 WSDL and HTTP Connectors
New Flash Builder 4 WSDL and HTTP ConnectorsNew Flash Builder 4 WSDL and HTTP Connectors
New Flash Builder 4 WSDL and HTTP Connectorsrtretola
 
Asp.net By Durgesh Singh
Asp.net By Durgesh SinghAsp.net By Durgesh Singh
Asp.net By Durgesh Singhimdurgesh
 
Meteor + Ionic Introduction
Meteor + Ionic IntroductionMeteor + Ionic Introduction
Meteor + Ionic IntroductionLearningTech
 
Setting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntuSetting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntukesavan N B
 
How to use_000webhost
How to use_000webhostHow to use_000webhost
How to use_000webhostIIUM
 
Web Server and how we can design app in C#
Web Server and how we can design app  in C#Web Server and how we can design app  in C#
Web Server and how we can design app in C#caohansnnuedu
 
ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1Neeraj Mathur
 
Webportal document
Webportal documentWebportal document
Webportal documentSumit Sahu
 

Similar to How to Integrate Internet of Things with Webserver with (20)

Qtp not just for gui anymore
Qtp   not just for gui anymoreQtp   not just for gui anymore
Qtp not just for gui anymore
 
CGI by rj
CGI by rjCGI by rj
CGI by rj
 
Filemaker Pro in the Pre-Media environment
Filemaker Pro in the Pre-Media environmentFilemaker Pro in the Pre-Media environment
Filemaker Pro in the Pre-Media environment
 
The ActionScript Conference 08, Singapore - Developing ActionScript 3 Mash up...
The ActionScript Conference 08, Singapore - Developing ActionScript 3 Mash up...The ActionScript Conference 08, Singapore - Developing ActionScript 3 Mash up...
The ActionScript Conference 08, Singapore - Developing ActionScript 3 Mash up...
 
3 Ways to Get Started with a React App in 2024.pdf
3 Ways to Get Started with a React App in 2024.pdf3 Ways to Get Started with a React App in 2024.pdf
3 Ways to Get Started with a React App in 2024.pdf
 
ArduinoWorkshop2.pdf
ArduinoWorkshop2.pdfArduinoWorkshop2.pdf
ArduinoWorkshop2.pdf
 
New Flash Builder 4 WSDL and HTTP Connectors
New Flash Builder 4 WSDL and HTTP ConnectorsNew Flash Builder 4 WSDL and HTTP Connectors
New Flash Builder 4 WSDL and HTTP Connectors
 
Meet with Meteor
Meet with MeteorMeet with Meteor
Meet with Meteor
 
Unit5 servlets
Unit5 servletsUnit5 servlets
Unit5 servlets
 
OneTeam Media Server
OneTeam Media ServerOneTeam Media Server
OneTeam Media Server
 
Synopsis
SynopsisSynopsis
Synopsis
 
Asp.net By Durgesh Singh
Asp.net By Durgesh SinghAsp.net By Durgesh Singh
Asp.net By Durgesh Singh
 
Meteor + Ionic Introduction
Meteor + Ionic IntroductionMeteor + Ionic Introduction
Meteor + Ionic Introduction
 
Setting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntuSetting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntu
 
How to use_000webhost
How to use_000webhostHow to use_000webhost
How to use_000webhost
 
Web Server and how we can design app in C#
Web Server and how we can design app  in C#Web Server and how we can design app  in C#
Web Server and how we can design app in C#
 
Lecture2
Lecture2Lecture2
Lecture2
 
ASP.Net Presentation Part1
ASP.Net Presentation Part1ASP.Net Presentation Part1
ASP.Net Presentation Part1
 
As pnet
As pnetAs pnet
As pnet
 
Webportal document
Webportal documentWebportal document
Webportal document
 

More from Ionela

Windows phone 7 è l’ultima occasione di microsoft 2010-10-18
Windows phone 7 è l’ultima occasione di microsoft   2010-10-18Windows phone 7 è l’ultima occasione di microsoft   2010-10-18
Windows phone 7 è l’ultima occasione di microsoft 2010-10-18Ionela
 
Videocamera cam ball un mare di caratteristiche nella piccola videocamera a ...
Videocamera cam ball  un mare di caratteristiche nella piccola videocamera a ...Videocamera cam ball  un mare di caratteristiche nella piccola videocamera a ...
Videocamera cam ball un mare di caratteristiche nella piccola videocamera a ...Ionela
 
Utente premium 2010-10-17
Utente premium   2010-10-17Utente premium   2010-10-17
Utente premium 2010-10-17Ionela
 
Unity sostituisce gnome su ubuntu 11.04 2010-11-01
Unity sostituisce gnome su ubuntu 11.04   2010-11-01Unity sostituisce gnome su ubuntu 11.04   2010-11-01
Unity sostituisce gnome su ubuntu 11.04 2010-11-01Ionela
 
Una retina artificiale per ridare la vista 2010-11-10
Una retina artificiale per ridare la vista   2010-11-10Una retina artificiale per ridare la vista   2010-11-10
Una retina artificiale per ridare la vista 2010-11-10Ionela
 
Un orologio elettronico completo basato su i2 c rtcc mcp79410 2010-10-29
Un orologio elettronico completo basato su i2 c rtcc mcp79410   2010-10-29Un orologio elettronico completo basato su i2 c rtcc mcp79410   2010-10-29
Un orologio elettronico completo basato su i2 c rtcc mcp79410 2010-10-29Ionela
 
Ultimo lancio discovery delle perdite rinviano l’ultimo lancio dello shuttle...
Ultimo lancio discovery  delle perdite rinviano l’ultimo lancio dello shuttle...Ultimo lancio discovery  delle perdite rinviano l’ultimo lancio dello shuttle...
Ultimo lancio discovery delle perdite rinviano l’ultimo lancio dello shuttle...Ionela
 
Ubuntu passa a wayland 2010-11-08
Ubuntu passa a wayland   2010-11-08Ubuntu passa a wayland   2010-11-08
Ubuntu passa a wayland 2010-11-08Ionela
 
Touchatag un'applicazione di internet delle cose 2010-11-10
Touchatag  un'applicazione di internet delle cose   2010-11-10Touchatag  un'applicazione di internet delle cose   2010-11-10
Touchatag un'applicazione di internet delle cose 2010-11-10Ionela
 
Tianhe 1, il supercomputer cinese - 2010-11-05
Tianhe 1, il supercomputer cinese - 2010-11-05Tianhe 1, il supercomputer cinese - 2010-11-05
Tianhe 1, il supercomputer cinese - 2010-11-05Ionela
 
Thread o processo quale usare - 2010-11-02
Thread o processo  quale usare  - 2010-11-02Thread o processo  quale usare  - 2010-11-02
Thread o processo quale usare - 2010-11-02Ionela
 
Termometro digitale usando pic16 f84a schema elettrico - 2010-11-03
Termometro digitale usando pic16 f84a   schema elettrico - 2010-11-03Termometro digitale usando pic16 f84a   schema elettrico - 2010-11-03
Termometro digitale usando pic16 f84a schema elettrico - 2010-11-03Ionela
 
Telescopio webb il sistema di engineering del telescopio webb della nasa si ...
Telescopio webb  il sistema di engineering del telescopio webb della nasa si ...Telescopio webb  il sistema di engineering del telescopio webb della nasa si ...
Telescopio webb il sistema di engineering del telescopio webb della nasa si ...Ionela
 
Tecnologia light peak intel potrebbe adottarla da inizio 2011, apple a segui...
Tecnologia light peak  intel potrebbe adottarla da inizio 2011, apple a segui...Tecnologia light peak  intel potrebbe adottarla da inizio 2011, apple a segui...
Tecnologia light peak intel potrebbe adottarla da inizio 2011, apple a segui...Ionela
 
Tastiere capacitive 2010-11-10
Tastiere capacitive   2010-11-10Tastiere capacitive   2010-11-10
Tastiere capacitive 2010-11-10Ionela
 
Supporto wi max toshiba introduce il supporto wimax nei notebook portégé r70...
Supporto wi max  toshiba introduce il supporto wimax nei notebook portégé r70...Supporto wi max  toshiba introduce il supporto wimax nei notebook portégé r70...
Supporto wi max toshiba introduce il supporto wimax nei notebook portégé r70...Ionela
 
Starter kit cpld cool runner ii della xilinx - 2010-11-09
Starter kit cpld cool runner ii della xilinx - 2010-11-09Starter kit cpld cool runner ii della xilinx - 2010-11-09
Starter kit cpld cool runner ii della xilinx - 2010-11-09Ionela
 
Ssd now v100 kingston lancia i suoi nuovi dischi allo stato solido - 2010-11-10
Ssd now v100  kingston lancia i suoi nuovi dischi allo stato solido - 2010-11-10Ssd now v100  kingston lancia i suoi nuovi dischi allo stato solido - 2010-11-10
Ssd now v100 kingston lancia i suoi nuovi dischi allo stato solido - 2010-11-10Ionela
 
Sono ook. tu sei ook 2010-10-19
Sono ook. tu sei ook    2010-10-19Sono ook. tu sei ook    2010-10-19
Sono ook. tu sei ook 2010-10-19Ionela
 
Sistema med seg dalle stelle alla mammografia - 2010-10-24
Sistema med seg  dalle stelle alla mammografia - 2010-10-24Sistema med seg  dalle stelle alla mammografia - 2010-10-24
Sistema med seg dalle stelle alla mammografia - 2010-10-24Ionela
 

More from Ionela (20)

Windows phone 7 è l’ultima occasione di microsoft 2010-10-18
Windows phone 7 è l’ultima occasione di microsoft   2010-10-18Windows phone 7 è l’ultima occasione di microsoft   2010-10-18
Windows phone 7 è l’ultima occasione di microsoft 2010-10-18
 
Videocamera cam ball un mare di caratteristiche nella piccola videocamera a ...
Videocamera cam ball  un mare di caratteristiche nella piccola videocamera a ...Videocamera cam ball  un mare di caratteristiche nella piccola videocamera a ...
Videocamera cam ball un mare di caratteristiche nella piccola videocamera a ...
 
Utente premium 2010-10-17
Utente premium   2010-10-17Utente premium   2010-10-17
Utente premium 2010-10-17
 
Unity sostituisce gnome su ubuntu 11.04 2010-11-01
Unity sostituisce gnome su ubuntu 11.04   2010-11-01Unity sostituisce gnome su ubuntu 11.04   2010-11-01
Unity sostituisce gnome su ubuntu 11.04 2010-11-01
 
Una retina artificiale per ridare la vista 2010-11-10
Una retina artificiale per ridare la vista   2010-11-10Una retina artificiale per ridare la vista   2010-11-10
Una retina artificiale per ridare la vista 2010-11-10
 
Un orologio elettronico completo basato su i2 c rtcc mcp79410 2010-10-29
Un orologio elettronico completo basato su i2 c rtcc mcp79410   2010-10-29Un orologio elettronico completo basato su i2 c rtcc mcp79410   2010-10-29
Un orologio elettronico completo basato su i2 c rtcc mcp79410 2010-10-29
 
Ultimo lancio discovery delle perdite rinviano l’ultimo lancio dello shuttle...
Ultimo lancio discovery  delle perdite rinviano l’ultimo lancio dello shuttle...Ultimo lancio discovery  delle perdite rinviano l’ultimo lancio dello shuttle...
Ultimo lancio discovery delle perdite rinviano l’ultimo lancio dello shuttle...
 
Ubuntu passa a wayland 2010-11-08
Ubuntu passa a wayland   2010-11-08Ubuntu passa a wayland   2010-11-08
Ubuntu passa a wayland 2010-11-08
 
Touchatag un'applicazione di internet delle cose 2010-11-10
Touchatag  un'applicazione di internet delle cose   2010-11-10Touchatag  un'applicazione di internet delle cose   2010-11-10
Touchatag un'applicazione di internet delle cose 2010-11-10
 
Tianhe 1, il supercomputer cinese - 2010-11-05
Tianhe 1, il supercomputer cinese - 2010-11-05Tianhe 1, il supercomputer cinese - 2010-11-05
Tianhe 1, il supercomputer cinese - 2010-11-05
 
Thread o processo quale usare - 2010-11-02
Thread o processo  quale usare  - 2010-11-02Thread o processo  quale usare  - 2010-11-02
Thread o processo quale usare - 2010-11-02
 
Termometro digitale usando pic16 f84a schema elettrico - 2010-11-03
Termometro digitale usando pic16 f84a   schema elettrico - 2010-11-03Termometro digitale usando pic16 f84a   schema elettrico - 2010-11-03
Termometro digitale usando pic16 f84a schema elettrico - 2010-11-03
 
Telescopio webb il sistema di engineering del telescopio webb della nasa si ...
Telescopio webb  il sistema di engineering del telescopio webb della nasa si ...Telescopio webb  il sistema di engineering del telescopio webb della nasa si ...
Telescopio webb il sistema di engineering del telescopio webb della nasa si ...
 
Tecnologia light peak intel potrebbe adottarla da inizio 2011, apple a segui...
Tecnologia light peak  intel potrebbe adottarla da inizio 2011, apple a segui...Tecnologia light peak  intel potrebbe adottarla da inizio 2011, apple a segui...
Tecnologia light peak intel potrebbe adottarla da inizio 2011, apple a segui...
 
Tastiere capacitive 2010-11-10
Tastiere capacitive   2010-11-10Tastiere capacitive   2010-11-10
Tastiere capacitive 2010-11-10
 
Supporto wi max toshiba introduce il supporto wimax nei notebook portégé r70...
Supporto wi max  toshiba introduce il supporto wimax nei notebook portégé r70...Supporto wi max  toshiba introduce il supporto wimax nei notebook portégé r70...
Supporto wi max toshiba introduce il supporto wimax nei notebook portégé r70...
 
Starter kit cpld cool runner ii della xilinx - 2010-11-09
Starter kit cpld cool runner ii della xilinx - 2010-11-09Starter kit cpld cool runner ii della xilinx - 2010-11-09
Starter kit cpld cool runner ii della xilinx - 2010-11-09
 
Ssd now v100 kingston lancia i suoi nuovi dischi allo stato solido - 2010-11-10
Ssd now v100  kingston lancia i suoi nuovi dischi allo stato solido - 2010-11-10Ssd now v100  kingston lancia i suoi nuovi dischi allo stato solido - 2010-11-10
Ssd now v100 kingston lancia i suoi nuovi dischi allo stato solido - 2010-11-10
 
Sono ook. tu sei ook 2010-10-19
Sono ook. tu sei ook    2010-10-19Sono ook. tu sei ook    2010-10-19
Sono ook. tu sei ook 2010-10-19
 
Sistema med seg dalle stelle alla mammografia - 2010-10-24
Sistema med seg  dalle stelle alla mammografia - 2010-10-24Sistema med seg  dalle stelle alla mammografia - 2010-10-24
Sistema med seg dalle stelle alla mammografia - 2010-10-24
 

Recently uploaded

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Recently uploaded (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

How to Integrate Internet of Things with Webserver with

  • 1. OpenPicus Web Controlled Simulator & Tweet, Nimbits and ThingSpeak messages This project is integrating several technologies, found during the investigation of my new FlyPort : - Web server - Wifi connection - Dynamic variables substitutions (in xml files) - Ajax callbacks - jQuery use case - Dynamic Memory allocation (malloc/free) (see heap.s) - Web service calls : for tweeter, thingspeak and nimbits - The web page here is explaining the outcome :
  • 2. Architecture of the project : The Flyport is connected to my PC for development, and power. I use my tablet as a browser for controlling the simulator User Interface, as well as to get the results of the web services published by the FlyPort on the right side. I created accounts for Nimbits, Thingspeak and declare some channels inside to be able to publish. I used for the test my own twitter, but it is advised to change by a dedicated account for the sensors you want to monitor. For twitter, you will get a key to let your sensor write into the stream. For Thingspeak & Nimbits, idem, you will need a key for sending your data to the right channel.
  • 3. Web page : index.htm and its Flyport processing,
  • 4. File buttons.cgi and its processing. Note : The buttons.cgi file contains : When calling the Flyport web server, the function HTTPPrint_cgi() is called. Here we have choosen to toggle a led only. Ajax processing of files : status.xml & data.xml I have integrated the jQuery exemple with the file main.js(see above) included in the index.htm page You see in the index.htm page 3 mydynvar areas that will be set by the function called readData() This readData() is making a get of the data.xml file of the Flyport server. While processing the data.xml content below, you see that 2 variables t & rh will be substituted by the result of the server call of the HTTPPrint_xxx() functions.
  • 5. 2nd Ajax example : In the status.xml that is called by the Javascript of the index.htm directly, the similar substitution is made in the server. The newAjaxcommand is launching the updateStatus javascript function every 500mS. Inside the updateStatus, the data is received and the setDisplay will display the numbers on the web page (big digits) Here ~t~ and ~rh~ will be replaced by the values returned by the HTTPPrint_t &nd HTTPPrint_rh in the server.
  • 6.
  • 7. Posting messages to tweeter & others While a button is pressed, the status is set in the server, in one variable that is shared with the main loop. A switch is used to select the right operation to make depending of the user’s choice Then 2 libraries are integrated to the project - Nimbits.c/.h - Thingspeak.c/.h (included tweet and thingspeak, as well as query not demonstrated in that case) I updated the nimbits(simplified, as it was crashing) void wfNIMBITS(char* hostappspot, char* email, char* secret, char* namevalue, float* value); I also integrated some dynamic memory allocation to avoid the static alloc of hundreds of bytes in each function that will not be released. Use of malloc / free. For that I integrated a heap.s file in the project directory
  • 8. corresponds to a heap of 2000 bytes. Reusing the sources & testing the project on your own 1. Edit the myaccounts.h file and put inside the keys you will get from Twitter, ThingSpeak and Nimbits If you do want to remove some, just remove the call to the function in the main task code. 2. Then in the OpenPicus IDE, open the existing project file temperatura.conf 3. Click on the Wizard for the connection setup, 4. and the Web Pages button to generate the intermediate code. 5. Launch the compilation of the project. 6. Download to the Flyport Then connect your browser to the IP address of your http Flyport defined in the configuration wizard (like 192.168.0.27) You should see the main page as above. Then you will check that your actions to send message is fine by connecting to each of the sites (twitter, thingspeak or nimbits) to verify that the messages are well received and recorded. I have noticed that the processing of one message is lasting >10 seconds, so you have to wait between clicks… It could be improved by putting some real time programming like critical areas and semaphores, but for this project it is fine with me.