This document provides instructions for building an IoT cloud platform and sample IoT devices using IoTivity. It describes:
- The cloud architecture including a resource directory, account service, and message queue.
- How to build and run IoTivity projects including installing dependencies and building sample device and controller projects.
- How to run the resource server (device) and client (controller) projects, including signing up, signing in, publishing resources, and controlling devices remotely.
- Sample code is provided to show how devices can be registered and resources can be controlled via the cloud platform using IoTivity.
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at Netflix
This document discusses Netflix's API ecosystem built using Scala, Scalatra, and Swagger. It summarizes Netflix's use of these technologies to build APIs that power their consumer electronics partner portal and enable certification of Netflix ready devices. It describes how the APIs provide a single source of truth for all device data at Netflix and correlate streaming quality metrics. It then discusses aspects of the architecture including the manager layer containing business logic, HTTP layer for handling requests/responses, and use of Scala, Scalatra, Swagger, and deployment process including immutable infrastructure.
QA Fest 2019. Saar Rachamim. Developing Tools, While Testing
Our daily work is comprised of testing a product and improve its quality. However, here and there, we can come to a state where we find a need to build a tool, that can make our work easierbetter.
I will share from my experience when I found myself in a situation where building a tool was needed.
We will start with a web application that allows you to know when a food delivery you ordered arrives to the office, and then we will focus on a tool that test the performance of an app from the UI side. We will do a live demo for both of them.
DTrace is a comprehensive dynamic tracing framework created by Sun Microsystems for troubleshooting kernel and application problems on production systems in real time. It provides probes in the operating system and applications to monitor events, collects and aggregates data, and provides tools to analyze the data. DTrace can be used on Unix-like systems like Solaris, Linux, macOS, and in Node.js applications through a DTrace provider. It allows gathering insights about the system and application behavior without restarting or slowing the system.
This document provides examples and documentation on Azure Durable Functions patterns and concepts. It includes examples of orchestrator and activity functions, orchestration triggers, and common patterns like function chaining, fan-out/fan-in, and asynchronous HTTP responses. It also covers durable function concepts such as the control queue, work item queue, and history table.
The document provides an overview of a NodeJS CRUD and deployment course. The course outline includes: setting up a NodeJS environment on SmartOS with MySQL and Git in 3 minutes; tools for cloud development like SSH, SCP, and Git; building a simple web server with authorization using Passport and CRUD functionality with MySQL; and advanced topics like load balancing for cloud services. The course also provides a Micloud server for hands-on labs and sample projects.
The document discusses the process and code for building a client socket application in Java. It covers establishing a connection to a server, obtaining socket information, sending and receiving data, and closing the connection. An example client code is provided that connects to a sample server, receives data as bytes, and prints the response. The client creates a socket, gets input/output streams, reads server data into a byte array, and closes the connection when finished.
This document contains code for a file sharing application that allows users to upload files to Amazon S3 storage and send download links to recipients via email. It includes code for connecting to MongoDB and S3 databases, handling file uploads with Multer, generating signed URLs with AWS, sending emails with Nodemailer, and building APIs with Express. The React code handles form inputs, file previews, and confirming upload status.
Dpilot is a cloud based file transfer application that allows its user to upload data on cloud server and the receiver on the other hand can downlaod the data from the server. The Downlaod information is send to the receiver via mail service.
Other Features include:-
Secure Login system
Easy data Access
Lightening Fast Uploads and Downloads
Connect with your Facebook Or Gmail Account for easy access
This document provides a tutorial on using ZooKeeper to implement basic distributed synchronization primitives like barriers and producer-consumer queues. It includes code examples for Barrier and Queue classes that extend a base SyncPrimitive class. The Barrier class allows processes to synchronize barrier entry and exit. The Queue class implements a distributed queue where producers can add elements and consumers can remove the oldest element. Both use ZooKeeper to coordinate access through ephemeral nodes and watches.
SPIFFE Meetup Tokyo #2 - Attestation Internals in SPIRE - Shingo Omura
In SPIRE, attestation is the essential process because it certifies a node or workload, i.e. it asserts the identities of them. This talk describes how SPIRE implement this process and make it flexible. Moreover, it explains the detail of how spire-server and spire-agent (running at a node) interacts in the attestation process.
Browser-based Secure Remote Access for the Internet of Things
Secure remote access to the built-in web server of a device is one of the fundamental building blocks for the Internet of Things. my-devices.net enables easy and secure remote access, even if the device is located behind a NAT router or a firewall and does not have a public IP address.
This document discusses dependency injection and inversion of control patterns. It explains that dependency injection frameworks like Angular and Ember use an inversion of control container to manage dependencies and instantiate classes with their dependencies already satisfied. The container owns and manages all class registrations and dependencies. When a class is looked up from the container, it is instantiated with all its dependencies injected. This decouples classes from their concrete dependencies and makes applications more modular and testable.
1) SCORE is a smart contract platform on ICON that allows developers to write, deploy and interact with smart contracts using Python.
2) T-Bears is a SCORE development suite that provides tools to develop, test, deploy and interact with SCORE contracts. It includes a CLI, sample templates and supports local emulation of contract execution.
3) SCORE contracts are deployed to and run on the ICON blockchain. They can store data on-chain, be invoked by transactions to update state, and trigger events.
Every wondered how to make your code physically interact with things in the real world? Got a home automation project in mind? In this presentation we will cover:
o) How to get started with Raspberry Pi and C#
o) The numerous sensors and actuators you can control
o) How to navigate basic electronics
o) Different interfaces and how to program them
o) Demonstrations of devices at work
o) Azure IoT Hub to control your code from the cloud and receive live inputs from your device in a Blazor application
The document provides instructions for setting up a TI-RTOS project for the CC1352R wireless microcontroller. It describes creating a CCS project targeting the CC1352R, configuring compiler and linker settings, generating a system configuration file, and adding TI-RTOS and driver library files. The goal is to build a basic "hello world" project to demonstrate real-time operating system functionality on the CC1352R wireless microcontroller.
This document summarizes an advanced Sigfox workshop covering topics like downlink callbacks, event monitoring, geolocation callbacks, and using AT commands with the Xkit shield. It provides useful resources and contact information for Aurelien Lequertier and Nicolas Lesconnec. The workshop includes demonstrations of configuring downlink callbacks, monitoring for breaks in message sequences, geolocation callbacks, using IFTTT for advanced callbacks, and sending AT commands to the Xkit shield.
Tick Stack - Listen your infrastructure and please sleep
Our application and our infrastructure speak, time series are one of their languages, during this talk I will share my experience about InfluxDB and time series to monitor and know the status of our cloud infrastructure. We will show best practice and tricks to grab information from an application in order to understand the mains difference between logs and time series.
Andrew Betts Web Developer, The Financial Times at Fastly Altitude 2016
Running custom code at the Edge using a standard language is one of the biggest advantages of working with Fastly’s CDN. Andrew gives you a tour of all the problems the Financial Times and Nikkei solve in VCL and how their solutions work.
This program implements Hamming code in C for error detection and correction. It takes in 4-bit data as input, encodes it using a generator matrix to add parity bits, prints the encoded data. It then decodes the received encoded data by calculating the syndrome using a parity check matrix, detects and corrects any errors by flipping the erroneous bit.
This document provides an overview of big data and the Cosmos big data platform from Telefonica. It discusses what big data is, how much data exists, and common tools for working with big data like Hadoop and MapReduce. It then describes the Cosmos platform, how to create clusters and access data using REST APIs or command line tools. Examples are given for querying data using Hive and writing MapReduce applications.
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at NetflixManish Pandit
This document discusses Netflix's API ecosystem built using Scala, Scalatra, and Swagger. It summarizes Netflix's use of these technologies to build APIs that power their consumer electronics partner portal and enable certification of Netflix ready devices. It describes how the APIs provide a single source of truth for all device data at Netflix and correlate streaming quality metrics. It then discusses aspects of the architecture including the manager layer containing business logic, HTTP layer for handling requests/responses, and use of Scala, Scalatra, Swagger, and deployment process including immutable infrastructure.
QA Fest 2019. Saar Rachamim. Developing Tools, While TestingQAFest
Our daily work is comprised of testing a product and improve its quality. However, here and there, we can come to a state where we find a need to build a tool, that can make our work easierbetter.
I will share from my experience when I found myself in a situation where building a tool was needed.
We will start with a web application that allows you to know when a food delivery you ordered arrives to the office, and then we will focus on a tool that test the performance of an app from the UI side. We will do a live demo for both of them.
DTrace is a comprehensive dynamic tracing framework created by Sun Microsystems for troubleshooting kernel and application problems on production systems in real time. It provides probes in the operating system and applications to monitor events, collects and aggregates data, and provides tools to analyze the data. DTrace can be used on Unix-like systems like Solaris, Linux, macOS, and in Node.js applications through a DTrace provider. It allows gathering insights about the system and application behavior without restarting or slowing the system.
This document provides examples and documentation on Azure Durable Functions patterns and concepts. It includes examples of orchestrator and activity functions, orchestration triggers, and common patterns like function chaining, fan-out/fan-in, and asynchronous HTTP responses. It also covers durable function concepts such as the control queue, work item queue, and history table.
The document provides an overview of a NodeJS CRUD and deployment course. The course outline includes: setting up a NodeJS environment on SmartOS with MySQL and Git in 3 minutes; tools for cloud development like SSH, SCP, and Git; building a simple web server with authorization using Passport and CRUD functionality with MySQL; and advanced topics like load balancing for cloud services. The course also provides a Micloud server for hands-on labs and sample projects.
The document discusses the process and code for building a client socket application in Java. It covers establishing a connection to a server, obtaining socket information, sending and receiving data, and closing the connection. An example client code is provided that connects to a sample server, receives data as bytes, and prints the response. The client creates a socket, gets input/output streams, reads server data into a byte array, and closes the connection when finished.
This document contains code for a file sharing application that allows users to upload files to Amazon S3 storage and send download links to recipients via email. It includes code for connecting to MongoDB and S3 databases, handling file uploads with Multer, generating signed URLs with AWS, sending emails with Nodemailer, and building APIs with Express. The React code handles form inputs, file previews, and confirming upload status.
Dpilot is a cloud based file transfer application that allows its user to upload data on cloud server and the receiver on the other hand can downlaod the data from the server. The Downlaod information is send to the receiver via mail service.
Other Features include:-
Secure Login system
Easy data Access
Lightening Fast Uploads and Downloads
Connect with your Facebook Or Gmail Account for easy access
Programming with ZooKeeper - A basic tutorialJeff Smith
This document provides a tutorial on using ZooKeeper to implement basic distributed synchronization primitives like barriers and producer-consumer queues. It includes code examples for Barrier and Queue classes that extend a base SyncPrimitive class. The Barrier class allows processes to synchronize barrier entry and exit. The Queue class implements a distributed queue where producers can add elements and consumers can remove the oldest element. Both use ZooKeeper to coordinate access through ephemeral nodes and watches.
SPIFFE Meetup Tokyo #2 - Attestation Internals in SPIRE - Shingo OmuraPreferred Networks
In SPIRE, attestation is the essential process because it certifies a node or workload, i.e. it asserts the identities of them. This talk describes how SPIRE implement this process and make it flexible. Moreover, it explains the detail of how spire-server and spire-agent (running at a node) interacts in the attestation process.
Browser-based Secure Remote Access for the Internet of ThingsGünter Obiltschnig
Secure remote access to the built-in web server of a device is one of the fundamental building blocks for the Internet of Things. my-devices.net enables easy and secure remote access, even if the device is located behind a NAT router or a firewall and does not have a public IP address.
This document discusses dependency injection and inversion of control patterns. It explains that dependency injection frameworks like Angular and Ember use an inversion of control container to manage dependencies and instantiate classes with their dependencies already satisfied. The container owns and manages all class registrations and dependencies. When a class is looked up from the container, it is instantiated with all its dependencies injected. This decouples classes from their concrete dependencies and makes applications more modular and testable.
1) SCORE is a smart contract platform on ICON that allows developers to write, deploy and interact with smart contracts using Python.
2) T-Bears is a SCORE development suite that provides tools to develop, test, deploy and interact with SCORE contracts. It includes a CLI, sample templates and supports local emulation of contract execution.
3) SCORE contracts are deployed to and run on the ICON blockchain. They can store data on-chain, be invoked by transactions to update state, and trigger events.
Every wondered how to make your code physically interact with things in the real world? Got a home automation project in mind? In this presentation we will cover:
o) How to get started with Raspberry Pi and C#
o) The numerous sensors and actuators you can control
o) How to navigate basic electronics
o) Different interfaces and how to program them
o) Demonstrations of devices at work
o) Azure IoT Hub to control your code from the cloud and receive live inputs from your device in a Blazor application
The document provides instructions for setting up a TI-RTOS project for the CC1352R wireless microcontroller. It describes creating a CCS project targeting the CC1352R, configuring compiler and linker settings, generating a system configuration file, and adding TI-RTOS and driver library files. The goal is to build a basic "hello world" project to demonstrate real-time operating system functionality on the CC1352R wireless microcontroller.
This document summarizes an advanced Sigfox workshop covering topics like downlink callbacks, event monitoring, geolocation callbacks, and using AT commands with the Xkit shield. It provides useful resources and contact information for Aurelien Lequertier and Nicolas Lesconnec. The workshop includes demonstrations of configuring downlink callbacks, monitoring for breaks in message sequences, geolocation callbacks, using IFTTT for advanced callbacks, and sending AT commands to the Xkit shield.
Tick Stack - Listen your infrastructure and please sleepGianluca Arbezzano
Our application and our infrastructure speak, time series are one of their languages, during this talk I will share my experience about InfluxDB and time series to monitor and know the status of our cloud infrastructure. We will show best practice and tricks to grab information from an application in order to understand the mains difference between logs and time series.
Andrew Betts Web Developer, The Financial Times at Fastly Altitude 2016
Running custom code at the Edge using a standard language is one of the biggest advantages of working with Fastly’s CDN. Andrew gives you a tour of all the problems the Financial Times and Nikkei solve in VCL and how their solutions work.
This document discusses tools for working with time series data, including InfluxDB for storing time series data, Telegraf for collecting metrics, and Kapacitor for processing and alerting on metrics. It provides an overview of how to install and use InfluxDB, describes its HTTP and UDP APIs, query language, and advantages over alternatives. Continuous queries, input and output plugins for Telegraf, and alerting capabilities of Kapacitor are also summarized. The document encourages representing log lines and other time-indexed data as compact time series for scalability.
Python from zero to hero (Twitter Explorer)Yuriy Senko
This document outlines steps to build a Twitter explorer application using Python and Flask. It begins with setting up the virtual environment and cloning the GitHub repository. It then walks through steps to add basic functionality like configuration, templates, a database with SQLAlchemy ORM, user authentication with Flask plugins, and finally integrating the Twitter API. Each step includes changes to files, dependencies in requirements.txt, and commands to test and view progress. The goal is to create a full-stack web application to explore tweets from the Twitter API.
10 Excellent Ways to Secure Spring Boot Applications - Okta Webinar 2020Matt Raible
Spring Boot is an efficient way to build Java applications with the Spring Framework. If you’re developing apps that handle sensitive data, you should make sure they’re secure.
This session will cover HTTPS, dependency checking, CSRF, using a CSP to prevent XSS, OIDC, password hashing, and much more!
You’ll learn how to add these features to a real application, using the Java language you know and love.
* Blog post: https://developer.okta.com/blog/2018/07/30/10-ways-to-secure-spring-boot
* Cheat sheet: https://snyk.io/blog/spring-boot-security-best-practices/
* OIDC demo: http://bit.ly/spring-oidc-demo
A talk looking at building a smart savings account - some hardware hacking, Raspberry Pi development, Bluetooth LE, electronics, bit banging - all using Swift.
FIWARE (https://www.fiware.org) is a collection of well-integrated Open Source tools (e.g. OpenStack, Hadoop, Docker, ...) that provides a set of RESTful APIs that allows for easy development of cloud-based applications. Haven't you yet heard about it? Sit down and enjoy the ride! The talk will present FIWARE main APIs and discuss a small example of FIWARE-based application for context-aware data management.
Federico Michele Facca - FIWARE Primer - Learn FIWARE in 60 MinutesCodemotion
FIWARE (https://www.fiware.org) is a collection of well-integrated Open Source tools (e.g. OpenStack, Hadoop, Docker, ...) that provides a set of RESTful APIs that allows for easy development of cloud-based applications. Haven't you yet heard about it? Sit down and enjoy the ride! The talk will present FIWARE main APIs and discuss a small example of FIWARE-based application for context-aware data management.
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides & morewesley chun
This is a ~90-minute technical introduction to G Suite/Google Apps developer tools, platforms, and APIs. Code samples are in Python+JS. Motivation: encourage developers to write apps integrating with G Suite APIs so they can monetize, taking advantage of the many schools & enterprises that are G Suite users. Delivered sessions at ISTE (Jun 2019), Google Cloud NEXT (Jul 2018), Google Cloud Summit - S��o Paulo (Nov 2017), DevFest DC (May 2017), DevFest NYC (Nov 2016), and GDG LA DevFest (Dec 2016).
Thrift and PasteScript are frameworks for building distributed applications and services. Thrift allows defining data types and interfaces using a simple definition language that can generate code in multiple languages. It uses a compact binary protocol for efficient RPC-style communication between clients and servers. PasteScript builds on WSGI and provides tools like paster for deploying and managing Python web applications, along with reloading and logging capabilities. It integrates with Thrift via server runners and application factories.
In an interconnected world, companies need to be able to integrate their MQTT broker into existing enterprise applications and services. One way to do so is to use an MQTT broker that can be extended by custom functionality. HiveMQ has a powerful integration SDK for doing this. The HiveMQ extension SDK provides an open API that enables developers to create custom extensions that suit their specific infrastructures. The extension framework can be used to enrich HiveMQ with custom business logic or to integrate virtually any system into HiveMQ. In this webinar, our experts will clarify the motivational drivers for building custom extensions and give an introduction to the HiveMQ extension SDK. Using an example, they will also live-demonstrate how to develop, debug, and test a custom HiveMQ extension.
About the Speakers.
Anja Helmbrecht-Schaar is Senior Consultant at HiveMQ.
Georg Held is Engineering Manager at HiveMQ
To watch the webinar recording:
https://www.hivemq.com/webinars/build-your-own-hivemq-extension/
The document discusses various strategies for deploying and maintaining Pyramid web applications. It covers deployment options using Nginx, Apache with mod_wsgi, and Paste. It also discusses using buildout, supervisor, scripting, exception logging, backups, staging environments, caching, monitoring, and replication. The case study at the end describes how the open source KARL project deploys their Pyramid application using Nginx, HAProxy, Paste, Supervisor, buildout, and a custom package index on GitHub.
This document discusses connecting Internet of Things (IoT) devices to the FIWARE ecosystem. It outlines two main scenarios: 1) IoT consumers who access data through a single API and protocol, and 2) IoT providers who can connect any "thing" or IoT system to FIWARE Lab. It then provides steps to connect IoT devices to FIWARE Lab using the IDAS/SBC Ultralight 2.0 protocol, including registering a device, sending measurements, and sending commands. Other connection options like MQTT and OMA LWM2M/CoAP are also mentioned.
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
Similar to Build resource server & client for OCF Cloud (2018.8.30) (20)
COMPSAC 2024 D&I Panel: Charting a Course for Equity: Strategies for Overcomi...Hironori Washizaki
Hironori Washizaki, "Charting a Course for Equity: Strategies for Overcoming Challenges and Promoting Inclusion in the Metaverse", IEEE COMPSAC 2024 D&I Panel, 2024.
Lots of bloggers are using Google AdSense now. It’s getting really popular. With AdSense, bloggers can make money by showing ads on their websites. Read this important article written by the experienced designers of the best website designing company in Delhi –
Cultural Shifts: Embracing DevOps for Organizational TransformationMindfire Solution
Mindfire Solutions specializes in DevOps services, facilitating digital transformation through streamlined software development and operational efficiency. Their expertise enhances collaboration, accelerates delivery cycles, and ensures scalability using cloud-native technologies. Mindfire Solutions empowers businesses to innovate rapidly and maintain competitive advantage in dynamic market landscapes.
A Comparative Analysis of Functional and Non-Functional Testing.pdfkalichargn70th171
A robust software testing strategy encompassing functional and non-functional testing is fundamental for development teams. These twin pillars are essential for ensuring the success of your applications. But why are they so critical?
Functional testing rigorously examines the application's processes against predefined requirements, ensuring they align seamlessly. Conversely, non-functional testing evaluates performance and reliability under load, enhancing the end-user experience.
Seamless PostgreSQL to Snowflake Data Transfer in 8 Simple StepsEstuary Flow
Unlock the full potential of your data by effortlessly migrating from PostgreSQL to Snowflake, the leading cloud data warehouse. This comprehensive guide presents an easy-to-follow 8-step process using Estuary Flow, an open-source data operations platform designed to simplify data pipelines.
Discover how to seamlessly transfer your PostgreSQL data to Snowflake, leveraging Estuary Flow's intuitive interface and powerful real-time replication capabilities. Harness the power of both platforms to create a robust data ecosystem that drives business intelligence, analytics, and data-driven decision-making.
Key Takeaways:
1. Effortless Migration: Learn how to migrate your PostgreSQL data to Snowflake in 8 simple steps, even with limited technical expertise.
2. Real-Time Insights: Achieve near-instantaneous data syncing for up-to-the-minute analytics and reporting.
3. Cost-Effective Solution: Lower your total cost of ownership (TCO) with Estuary Flow's efficient and scalable architecture.
4. Seamless Integration: Combine the strengths of PostgreSQL's transactional power with Snowflake's cloud-native scalability and data warehousing features.
Don't miss out on this opportunity to unlock the full potential of your data. Read & Download this comprehensive guide now and embark on a seamless data journey from PostgreSQL to Snowflake with Estuary Flow!
Try it Free: https://dashboard.estuary.dev/register
Discover the Power of ONEMONITAR: The Ultimate Mobile Spy App for Android Dev...onemonitarsoftware
Unlock the full potential of mobile monitoring with ONEMONITAR. Our advanced and discreet app offers a comprehensive suite of features, including hidden call recording, real-time GPS tracking, message monitoring, and much more.
Perfect for parents, employers, and anyone needing a reliable solution, ONEMONITAR ensures you stay informed and in control. Explore the key features of ONEMONITAR and see why it’s the trusted choice for Android device monitoring.
Share this infographic to spread the word about the ultimate mobile spy app!
React Native vs Flutter - SSTech SystemSSTech System
Your project needs and long-term objectives will ultimately choose which of React Native and Flutter to use. For applications using JavaScript and current web technologies in particular, React Native is a mature and trustworthy choice. For projects that value performance and customizability across many platforms, Flutter, on the other hand, provides outstanding performance and a unified UI development experience.
Responsibilities of Fleet Managers and How TrackoBit Can Assist.pdfTrackobit
What do fleet managers do? What are their duties, responsibilities, and challenges? And what makes a fleet manager effective and successful? This blog answers all these questions.
Software development... for all? (keynote at ICSOFT'2024)miso_uam
Our world runs on software. It governs all major aspects of our life. It is an enabler for research and innovation, and is critical for business competitivity. Traditional software engineering techniques have achieved high effectiveness, but still may fall short on delivering software at the accelerated pace and with the increasing quality that future scenarios will require.
To attack this issue, some software paradigms raise the automation of software development via higher levels of abstraction through domain-specific languages (e.g., in model-driven engineering) and empowering non-professional developers with the possibility to build their own software (e.g., in low-code development approaches). In a software-demanding world, this is an attractive possibility, and perhaps -- paraphrasing Andy Warhol -- "in the future, everyone will be a developer for 15 minutes". However, to make this possible, methods are required to tweak languages to their context of use (crucial given the diversity of backgrounds and purposes), and the assistance to developers throughout the development process (especially critical for non-professionals).
In this keynote talk at ICSOFT'2024 I presented enabling techniques for this vision, supporting the creation of families of domain-specific languages, their adaptation to the usage context; and the augmentation of low-code environments with assistants and recommender systems to guide developers (professional or not) in the development process.
2. Cloud Architecture
OCF Cloud :
Resource Directory is used for storing and finding
resources.
Account is used for storing User & Device info.
Message Queue is based on Kafka and used for
message queue.
Cloud Interface process uses Device Server
System module to handle devices.
(*You should put Interface server address, credential
to run sample.)
Resource Server (Controlee) : Things Device
eg> TV, Refrigerator, Air Conditioner, Air Purifier,
Dishwasher...
Resource Client (Controller) : Remote Control App
3. Build and run IoTivity projects
Install build env
$ sudo apt-get install build-essential git scons libtool autoconf valgrind doxygen wget unzip chrpath
Install development support for external libraries:
$ sudo apt-get install libboost-dev libboost-program-options-dev libboost-thread-dev uuid-dev
libexpat1-dev libglib2.0-dev libsqlite3-dev libcurl4-gnutls-dev
How to build IoTivity projects
$ git clone https://gerrit.iotivity.org/gerrit/p/iotivity.git -b 1.3.1 iotivity-v1.3.1
$ cd iotivity-v1.3.1
$ git clone https://github.com/01org/tinycbor.git extlibs/tinycbor/tinycbor -b v0.4.1
$ git clone https://github.com/ARMmbed/mbedtls.git extlibs/mbedtls/mbedtls -b mbedtls-2.4.2
$ scons cloud/ WITH_TCP=yes RELEASE=yes TARGET_TRANSPORT=IP WITH_CLOUD=yes
WITH_MQ=PUB,SUB SECURED=0 -j 2
Two more Extlib needed.
-j N, --jobs=N Allow N jobs at once.
5. Run Resource Server ( Controlee Device : TV, Aircon, Dishwasher . . . )
Run Resource Server
$ cd /out/linux/x86_64/release/cloud/samples/client/
$ ./aircon_controlee
Put "[host-ipaddress:port] [authprovider] [authcode]" for sign-up and sign-in and publish resources
Put "[host-ipaddress:port] [uid] [accessToken] 1" for sign-in and publish resources
6. Interface server address (host-ipaddress)
You should put Interface server address, credential to run sample.
Refer the Interface server address and port number below.
35.227.183.218:5683 ⇐ For OCF Korea Hackathon( ~ 2018. 9. 31), Non secured, Based on v1.3.1
35.221.81.241:5683 ⇐ For Public Test Purpose( ~ 2019. 08. 27), Secured, Based on v1.3.1
7. Device Sign-up using OAuth 2 Auth Code
Device Sign-up using OAuth 2 Auth Code
To register device, you need 'Auth Code' provided by OAuth 2 provider like Facebook, Google or Github.
IoTivity Cloud project includes 'GitHub' account plugin. To get a 'Auth Code' from 'GitHub' you can make
request to below URL.
https://github.com/login?return_to=/login/oauth/authorize?client_id=378c7c6a465fa4d37816&redirect_uri=htt
p://35.227.183.170:8081/oauth_callback
Once you signed-in, you'll be redirected to other web page include 'Auth Code' in the redirected URL.
http://www.example.com/oauth_callback/?code=3a03a37366c3678aa634
The 'code' part in the URI is the 'Auth Code' from 'GitHub'.
We'll use this code to register and sign-in device.
9. Run Resource Server ( Controlee Device : TV, Aircon, Dishwasher . . . )
Run Resource Server - Sign Up (To get the UID & AccessToken for the first time.)
$ ./aircon_controlee 35.227.183.218:5683 github 3a03a37366c3678aa634
Auth response received code: 4
accesstoken: de42093f01fd35645bd6038139213c56a6fca3e6
certificate: [..CertInfo..]
expiresin: -1
redirecturi: coap+tcp://127.0.0.1:5683
refreshtoken: (null)
sid: 2a6085d1-815d-4277-baba-4e4e4df91308
tokentype: bearer
uid: 0cf89f61-d999-48cf-857f-73918a37531c
PUT 1/0 to turn on/off air conditioner for observe testing, q to terminate
Publish resource response received, code: 4
10. Run Resource Server ( Controlee Device : TV, Aircon, Dishwasher . . . )
Run Resource Server - Sign In (After obtaining the UID & AccessToken)
$ ./aircon_controlee 35.227.183.218:5683 0cf89f61-d999-48cf-857f-73918a37531c
de42093f01fd35645bd6038139213c56a6fca3e6
Auth response received code: 4
expiresin: -1
Registering resources to platform...
Publishing resources to cloud result: 0 Waiting Publish default resource response from cloud
result: 0 Waiting Publish user resource response from cloud
Publish resource response received, code: 4
PUT 1/0 to turn on/off air conditioner for observe testing, q to terminate
Publish resource response received, code: 4
11. Run as a Service (optional)
example service file below
$ vi aircon.service
[Unit]
Description=OCF Airconditioner
Requires=network-online.target
[Service]
Type=simple
RestartSec=3s
User=pi
Group=pi
ExecStart=/home/pi/aircon/airconditioner_controlee 35.227.183.218:5683 0cf89f61-d999-48cf-857f-73918a37531c
de42093f01fd35645bd6038139213c56a6fca3e6
WorkingDirectory=/home/pi/aircon
Restart=always
[Install]
WantedBy=multi-user.target
12. Run as a Service (optional)
Start service
$ systemctl enable aircon.service && systemctl start aircon.service
Restart service
$ systemctl restart aircon.service
Stop service
$ systemctl stop aircon.service && systemctl disable aircon.service
Service log
$ journalctl -u aircon.service -f
13. Run Resource Client ( Controller Device : Remote Controller App )
Run Resource Client - Sign Up (To get the UID & AccessToken for the first time.)
$ ./aircon_controller 35.227.183.218:5683 github 9d31d32e18c3e38bd559
Login/out response received code: 4
accesstoken: a0572063607baae269e5fdc336367d295f1efbdc
certificate: [..CertInfo..]
redirecturi: coap+tcp://127.0.0.1:5683
refreshtoken: (null)
sid: 2a6085d1-815d-4277-baba-4e4e4df91308
tokentype: bearer
uid: 0cf89f61-d999-48cf-857f-73918a37531c
Login/out response received code: 4
expiresin: -1
Finding airconditioner result: 0
Device found: /di/1a78ae17-3dc0-48f8-a51e-b19574de198b/oic/d
DI: 1a78ae17-3dc0-48f8-a51e-b19574de198b
PUT 1/0 to turn on/off air conditioner, q to terminate
14. Run Resource Client ( Controller Device : Remote Controller App )
Run Resource Client - Sign In (After obtaining the UID & AccessToken)
$ ./aircon_controller 35.227.183.218:5683 0cf89f61-d999-48cf-857f-73918a37531c
a0572063607baae269e5fdc336367d295f1efbdc
15. aircon_controlee.cpp (1)
int main(int argc, char *argv[])
{
if (argc != 4)
{
cout << "Put "[host-ipaddress:port] [authprovider] [authcode]" for sign-up and sign-in and publish resources"
<< endl;
cout << "Put "[host-ipaddress:port] [uid] [accessToken]" for sign-in and publish resources" <<
endl;
return 0;
}
. . .