Internet of Things( IoT)

“The Internet of Things (IoT) is a system of interrelated computing devices, mechanical and digital machines, objects, animals or people that are provided with unique identifiers and the ability to transfer data over a network without requiring human-to-human or human-to-computer interaction.”- An unnecessarily technical explanation of IoT

So now, me the rails savvy blogging on IoT. This is happened to me because of WWC( Women who code Connect India 2018!!!) which happened at VMware India. An amazing panel of tech creators like Kalaivani- CEO of Mint, Swapna Bapat- Director Technical sales at Microsoft, Prarthana Bhat-Data Scientist from Flutura and Shwetha- from VMware.

In Simple about IoT:

IoT (Internet of Things) is an advanced automation and analytics system which exploits networking, sensing, big data, and artificial intelligence technology to deliver complete systems for a product or service. These systems allow greater transparency, control, and performance when applied to any industry or system.

IoT systems allow users to achieve deeper automation, analysis, and integration within a system. They improve the reach of these areas and their accuracy. IoT utilizes existing and emerging technology for sensing, networking, and robotics.

IoT exploits recent advances in software, falling hardware prices, and modern attitudes towards technology. Its new and advanced elements bring major changes in the delivery of products, goods, and services; and the social, economic, and political impact of those changes.

IoT − Key Features

The most important features of IoT include artificial intelligence, connectivity, sensors, active engagement, and small device use. A brief review of these features is given below −

  • AI − IoT essentially makes virtually anything “smart”, meaning it enhances every aspect of life with the power of data collection, artificial intelligence algorithms, and networks. This can mean something as simple as enhancing your refrigerator and cabinets to detect when milk and your favorite cereal run low, and to then place an order with your preferred grocer.
  • Connectivity − New enabling technologies for networking, and specifically IoT networking, mean networks are no longer exclusively tied to major providers. Networks can exist on a much smaller and cheaper scale while still being practical. IoT creates these small networks between its system devices.
  • Sensors − IoT loses its distinction without sensors. They act as defining instruments which transform IoT from a standard passive network of devices into an active system capable of real-world integration.
  • Active Engagement − Much of today’s interaction with connected technology happens through passive engagement. IoT introduces a new paradigm for active content, product, or service engagement.
  • Small Devices − Devices, as predicted, have become smaller, cheaper, and more powerful over time. IoT exploits purpose-built small devices to deliver its precision, scalability, and versatility.

IoT − Advantages

The advantages of IoT span across every area of lifestyle and business. Here is a list of some of the advantages that IoT has to offer −

  • Improved Customer Engagement − Current analytics suffer from blind-spots and significant flaws in accuracy; and as noted, engagement remains passive. IoT completely transforms this to achieve richer and more effective engagement with audiences.
  • Technology Optimization − The same technologies and data which improve the customer experience also improve device use, and aid in more potent improvements to technology. IoT unlocks a world of critical functional and field data.
  • Reduced Waste − IoT makes areas of improvement clear. Current analytics give us superficial insight, but IoT provides real-world information leading to more effective management of resources.
  • Enhanced Data Collection − Modern data collection suffers from its limitations and its design for passive use. IoT breaks it out of those spaces and places it exactly where humans really want to go to analyze our world. It allows an accurate picture of everything.

IoT − Disadvantages

Though IoT delivers an impressive set of benefits, it also presents a significant set of challenges. Here is a list of some its major issues −

  • Security − IoT creates an ecosystem of constantly connected devices communicating over networks. The system offers little control despite any security measures. This leaves users exposed to various kinds of attackers.
  • Privacy − The sophistication of IoT provides substantial personal data in extreme detail without the user’s active participation.
  • Complexity − Some find IoT systems complicated in terms of design, deployment, and maintenance have given their use of multiple technologies and a large set of new enabling technologies.
  • Flexibility − Many are concerned about the flexibility of an IoT system to integrate easily with another. They worry about finding themselves with several conflicting or locked systems.
  • Compliance − IoT, like any other technology in the realm of business, must comply with regulations. Its complexity makes the issue of compliance seem incredibly challenging when many consider standard software compliance a battle.

Some of the questions to the panel where like:

  1. Will IoT actually work over the internet or will it have its own dedicated wide area network?
  2. What could be the challenges faced in adopting intelligent analytics within IoT since the last stage of implementation of any technology would be extracting insights from data for analysis.
  3. What measures to be taken regarding the compatibility and longevity factors since IoT is growing in many diff directions requiring the deployment of extra hardware n software n connecting devices.?
  4. What happens to privacy in the future? Most importantly in customer devices?
  5. What’s one policy change that would accelerate the benefits of the Internet of Things?
  6. Do we have anything else to sense beyond sensors?
  7. How IoT going to help the physically challenged children?
  8. Can Blockchain be used to overcome security in IoT?
  9. What difference can governments make to ensuring IoT will be safe and secure and is there a serious potential threat to governments and states?
  10. What effects will all this data collection, and the injection of intelligence into devices, have on privacy and personal autonomy?
  11. How do we persuade manufacturers to build standard communication protocols into everyday objects?
  12. Who will maintain the IoT infrastructure? – Challenge with IoT
  13. What areas are ripe for innovations and development of products and services in the IoT space?
  14. What will happen in terms of jobs losses and skills as IoT makes devices and robots more intelligent?
    • Earlier we used to think that computer will replace Humans, but to use them we need humans, same way with IoT. To build, use, add new things human intervention is needed for sure.

 

Here about WWC and the panel members:

WWC Connect India 2018 is a one of its kind Conference hosted by VMware in collaboration with WomenWhoCode. Women Who Code (WWC) is changing the face of tech, creating a more inclusive and diverse industry, and helping women to connect with professional opportunities that propel them into positions of power.

Kalaivani Chittaranjan
CEO of Mint.
Kalaivani is a tech enthusiast and a social entrepreneur. She is passionate about building technologies that can build inclusive and impactful progress to people. Vani has over 20 years of corporate and professional experience in Business Strategy, Finance, Audit, Technology and Business Management.
Her rich experience and strategic thinking had found her a place in the Boards of various companies –YpayCash (Mobile Wallet), Access Matrix Technologies (a JV with Wolters Kluwer, Netherlands), Veda Semantics (Semantic Technology), KrypC (Block Chain technology).Her current expedition is IoT based knowledge solutions that connect remote and rural areas with learning and educational content. The solution has been recognized as Top 10 IoT and smart cities solution and has won many other accolades for different projects.

Swapna Bapat
Director Technical Sales at Microsoft
Swapna brings 19 yrs. of IT experience ranging from Product Development, Network Architectures and Sales. She has successfully designed products, and driven sales with Service Providers and Enterprise customers across the US, EMEA, and APAC, in companies like ALU, Ciena, and Cisco. In her last role, Swapna was the Director of Technical Sales for Brocade India. She has been selected as one of the 50 most Empowered women in Technology by Insight Success Magazine 2016 for her innovations in SDN solutions. She has a provisional patent on Brocade products with Hyper-V, and a patent awarded on IPVPNs. She currently leads the Technical Sales team for Microsoft India where she is responsible for ensuring Microsoft’s customers are able to run their businesses to their highest potential with the power of Microsoft’s Technology Solutions.

Prarthana Bhat
Data Scientist, Flutura
An IOT intelligence company based out of Bangalore. She works on building AI solutions for equipment and process operations in Energy, Manufacturing and Engineering Industries. She utilizes her expertise in Machine Learning and Deep Learning algorithm to enhance the quality of manufactured goods thus enabling the transformation from Standard Operating Procedure to Dynamic Operating Procedure. She holds bachelor’s degree in Computer Science and Engineering from Mangalore Institute of Technology and Engineering. She is a Competition Expert at Kaggle, winner in Crowdanalytix and Analytics Vidhya. Her interest includes AI, Deep Learning, and Image Processing.

Some links on IoT:

https://www.leverege.com/blogpost/what-is-iot-simple-explanation

https://www.tutorialspoint.com/internet_of_things/internet_of_things_overview.htm

https://www.recode.net/2015/1/15/11557782/a-beginners-guide-to-understanding-the-internet-of-things

Demo videos of small projects on IoT and how it is done.

http://nevonprojects.com/iot-home-automation-using-raspberry-pi/

http://nevonprojects.com/iot-solar-power-monitoring-system/

http://nevonprojects.com/iot-theft-detection-using-raspberry-pi/

Major challenges faced in IoT

https://iot.ieee.org/newsletter/march-2017/three-major-challenges-facing-iot.html

Advertisements

Closing cycles

Copied from Paulo Coelho

One always has to know when a stage comes to an end. If we insist on staying longer than the necessary time, we lose the happiness and the meaning of the other stages we have to go through.
Closing cycles, shutting doors, ending chapters – whatever name we give it, what matters is to leave in the past the moments of life that have finished.

Did you lose your job? Has a loving relationship come to an end? Did you leave your parents’ house? Gone to live abroad? Has a long-lasting friendship ended all of a sudden?
You can spend a long time wondering why this has happened.
Things pass, and the best we can do is to let them really go away.

That is why it is so important (however painful it may be!) to destroy souvenirs, move, give lots of things away to orphanages, sell or donate the books you have at home.

Everything in this visible world is a manifestation of the invisible world, of what is going on in our hearts – and getting rid of certain memories also means making some room for other memories to take their place.
Let things go. Release them. Detach yourself from them.
Stop turning on your emotional television to watch the same program over and over again, the one that shows how much you suffered from a certain loss: that is only poisoning you, nothing else.
Before a new chapter is begun, the old one has to be finished: tell yourself that what has passed will never come back.
Remember that there was a time when you could live without that thing or that person – nothing is irreplaceable, a habit is not a need.
This may sound so obvious, it may even be difficult, but it is very important.

Closing cycles. Not because of pride, incapacity or arrogance, but simply because that no longer fits your life.
Stop being who you were, and change into who you are…

Awesome print @console

Pretty print your Ruby objects with style — in full color and with proper indentation

Git source: https://github.com/awesome-print/awesome_print# Installing as Ruby gem
$ gem install awesome_print

# Cloning the repository
$ git clone git://github.com/awesome-print/awesome_print.git

rails console ex: ap User(console)
<%= ap @user.name %> (HTML)

To list database tables/objects using the Rails console
$irb: ActiveRecord::Base.connection.tables

Cron job

 

The format for cronjobs is:

+—————- minute (0 – 59)
| +————- hour (0 – 23)
| | +———- day of month (1 – 31)
| | | +——- month (1 – 12)
| | | | +—- day of week (0 – 6) (Sunday=0 or 7)
| | | | |
* * * * * command to be executed

 

To have a cron executed on Sunday you can use either of these:

5 8 * * 0
5 8 * * 7
5 8 * * Sun
Where 5 8 stands for the time of the day when this will happen: 8:05.

You can always use crontab.guru as a editor to check your cron expressions.

Running a .rb file from IRB

You can “run” a file in irb by just requiring or loading it.

$ irb
>> load './filename.rb'

To change your current working directory within irb, you can use FileUtils:

>> require 'fileutils'
>> FileUtils.pwd # prints working directory
>> FileUtils.cd '/path/to/somewhere' # changes the directory

RESTful Architecture

RESTful interface means clean URLs, less code, CRUD interface.

CRUD means Create-READ-UPDATE-DESTROY.

HTTP verbs: GET, POST. In REST, they add 2 new verbs, i.e, PUT, DELETE.

GET : Retrieve data from database.

POST : Create new record in database.

PUT : Updating any existing record in database

DELETE : Destroying any record in database.

7 Default Actions          REST Verbs

index                                   GET

show                                    GET

new                                      GET

create                                  POST

edit                                       GET

update                                 PUT

destroy                                DELETE

Simple queries

$ client = Client.find(10)   $ SELECT * FROM clients WHERE (clients.id = 10) LIMIT 1

# => #<Client id: 10, first_name: “Ryan”>

 

# Find the clients with primary keys 1 and 10.

$ client = Client.find([1, 10])  $ SELECT * FROM clients WHERE (clients.id IN (1,10))

 

The take method retrieves a record without any implicit ordering

$ client = Client.take    $ SELECT * FROM clients LIMIT 1

# => #<Client id: 1, first_name: “Lifo”>

$ client = Client.take(2)

# => [

#   #<Client id: 1, first_name: “Lifo”>,

#   #<Client id: 220, first_name: “Sara”>

# ]

 

Client = Client.first  $SELECT * FROM clients ORDER BY clients.id ASC LIMIT 1

client = Client.first(3)

# => [

#   #<Client id: 1, first_name: “Lifo”>,

#   #<Client id: 2, first_name: “Fifo”>,

#   #<Client id: 3, first_name: “Filo”>

# ]

 

Client.where(first_name: ‘Lifo’).take

Same as:

Client.find_by first_name: ‘Lifo’

# => #<Client id: 1, first_name: “Lifo”>

 

 

 

 

link: http://edgeguides.rubyonrails.org/active_record_querying.html

PostgreSQL Basic commands

login: $ psql -d database_name -U user_Name

List all the tables: $ \dt

Describe a table:$ \d table_name

connect to new db : $ \c DB_NAME

size of db:\l+ db_name   or

select pg_size_pretty(pg_database_size(‘DB_NAME’));

Quit: $ \q

Running ‘rake assets:precompile’ in dev mode makes Rails include code twice

# Put this at the end of your config/routes.rb
if Rails.env.development?
  app = ActionDispatch::Static.new(
    lambda{ |env| [404, { 'X-Cascade' => 'pass'}, []] },
    Rails.application.config.paths['public'].first,
    Rails.application.config.static_cache_control
  )

  mount app, :at => '/', :as => :public
end
More details @ https://github.com/rails/rails/issues/10091