SlideShare a Scribd company logo
IOT&HOME AUTOMATION WARSAW
PROJECT
DATE CLIENT
2017.07.24
OPENHAB INFLUX UND GRAFANA
BACNET DATASOURCE
DISCLAIMER
TECH STUFF IS SUBJECT OF CHANGE OVER TIME AND MIGHT NOT BE
100% RELEVANT NOW. CHECK BEFORE USE. VIEWS ARE MY OWN.
GARTNER HYPE CYCLE 2016
HOW ABOUT SMART HOMES?
“Adoption of newer connected home
solutions is still at the early adopter phase,
according to a recent survey by Gartner, Inc.
The survey, of nearly 10,000 online
respondents in the U.S., the U.K. and
Australia during the second half of 2016,
found that only about 10 percent of
households currently have connected home
solutions.”
–Gartner
source http://www.gartner.com/newsroom/id/3629117
WHERE WORLD IS GOING
Global Google Trends
2011-2017
source https://trends.google.com/trends/explore?
date=2011-06-23%202017-07-23&q=smart%20home
WHERE POLAND IS GOING
Local Google Trends
2011-2017
source https://trends.google.com/trends/explore?
date=2011-06-23%202017-07-23&geo=PL&q=inteligentny
%20dom
SMART HOME, IOT AND
HOME AUTOMATION
IS LIKE TEENAGERS SEX, (GLOBALLY) EVERYONE WANTS IT,
EVERYONE TALKS ABOUT IT, VERY LITTLE ACTUALLY DO IT
SO LETS TALK ABOUT IT
FOUNDED IN 2010
source openhab.org
story https://www.slideshare.net/egutierrezru/javamagazine20131112-dl
FOUNDED IN 2013
source eclipse.org
Openhab Grafana and Influxdb
HOME AUTOMATION BUS
source https://docs.oracle.com/cd/E17904_01/doc.1111/e15020/
introduction.htm#OSBCA122
Enteprise Service Bus
OPENHAB 1.X ARCHITECTURE IS
RELEVANT
AND 2.X USES SAME CONCEPT
WHAT IS DIFFERENT THEN?
BINDING INTERNALS
NEW THING CONCEPT
What is present with OH 1.x
Item Registry
Binding
Provider
Remarks
One thing (device) may have multiple channels

Things have a state

Item is linked to an channel

One bridge wires one or more things

Bridge is optional
Thing state diagram
Main improvements in 2.x
User perspective

Lower entry level

Discovery of things

Developer perspective

Cleaner separation of concerns

A bit more declarative approach (XML definitions)

(Slightly bigger framework complication)
BACNET
BUILDING AUTOMATION AND CONTROL NETWORK
“BACnet was designed to allow
communication of building automation and
control systems for applications such as
heating, ventilating, and air-conditioning
control (HVAC), lighting control, access
control, and fire detection systems and their
associated equipment. The BACnet protocol
provides mechanisms for computerised
building automation devices to exchange
information, regardless of the particular
building service they perform.”
source https://en.wikipedia.org/wiki/BACnet
Remarks
Started in 1987

ANSI standard since 1995

ISO standard since 2003

Most popular in HVAC area
OSI layers

Physical

Data link

network

Application
Shortcut Map
source BACnet specification
BACnet Application Layer
source https://sunilsavanur.wordpress.com/2012/08/12/
BACnet object types
Analog Input/Output/Value

Binary Input/Output/Value

Multi-state Input/Output/Value

Averaging

Command

File 

…… 60 standard object types
source http://www.bacnet.org/
BACnet services
File Access

Object Access

Read/Write property

Remote device management

Virtual terminal

.. etc
source http://www.bacnet.org/
BACnet IP frame

(IP header)
source http://www.bacnet.org/
BACnet frame

(Virtual Network)
source http://www.bacnet.org/
BACnet IP frame

(Network Protocol)
source http://www.bacnet.org/
BACnet APDU types
Unconfirmed PDU

Confirmed PDU

Simple-ACK PDU

Complex-ACK PDU

Segment-ACK PDU

Reject PDU

Error PDU

Abort PDU
source http://www.bacnet.org/
DEPLOYMENT
THE UNIT
Thing
THE UNIT
Thing
Bridge THE UNIT
Thing
Bridge
extra one wire sensors
THE UNIT
Measurements
Copy of dashboard data
Preview of copy of this dashboard available online:

https://snapshot.raintank.io/dashboard/snapshot/
NCCJk3J79xsWtaRXlbI8Kj6u2Wnp3fas?
refresh=30s&orgId=2
Grafana
Data visualisation tool

Supports multiple data sources

InfluxDB

Graphite

Elasticsearch

Can draw a bar, pie charts as well as expose single
values
InfluxDB
Timeseries database

SQL-a-like query language
WHAT I DID
I GOOGLED FOR JAVA LIB IN
SPRING 2016
C library
Fork of 1st result
Legacy
Openhab Grafana and Influxdb
I LOOKED AT MVNREPOSITORY.COM
NO EXAMPLES
NO TESTS
NO SUPPORT, POOR DOCUMENTATION
WITH PROPER QUERY GOOGLE
GOT IT
With some love I made it deployable
BUT IT DIDNT WORK
BACNET4J IS/WAS THREAD
SENSITIVE
I BOUGHT BAC
SPECIFICATION
I BOUGHT BAC
SPECIFICATION
I WRAPPED BACNET4J LOGIC
Raw bacnet main() used during tests
https://gist.github.com/splatch/3216feba4bcad3cfd741644552f93870
Openhab Grafana and Influxdb
HOW IT WORKS
Items (OH 1.x syntax)
Number Air_Flow "Temperatura nawiewu [%.1f] °C" <temperature>
(Ventilation)
{ bacnet="device=2251,type=analogInput,id=0,refreshInterval=10000" }

Number Air_Recirculation "Wymiennik [%.1f]%" <fan> (Ventilation)
{ bacnet="device=2251,type=analogOutput,id=1" }

Number Air_Suply_Fan "Wentylator nawiew. [%.1f]%" <fan> (Ventilation)
{ bacnet="device=2251,type=analogOutput,id=2,refreshInterval=1000" }

Number Air_Exhaust_Fan "Wentylator wywiew. [%.1f]%" <fan>
(Ventilation)
{ bacnet="device=2251,type=analogOutput,id=3,refreshInterval=1000" }
Persistence configuration
Strategies {

	 everyMinute : "0 * * * * ?"

	 default=everyUpdate, restoreOnStartup

}

Items {

	 * : strategy = everyUpdate, everyMinute, restoreOnStartup

}
Sitemap (basic ui)
Frame label=“Rekuperator" {

Text item=Air_Flow

	 Setpoint item=Air_Setpoint step=0.2 minValue=15 maxValue=30

	 Text item=Air_Recirculation icon="bypass"

	 Selection item=Air_Season icon="sun" mappings=[

"1.0" = "Lato", "2.0" = "Zima", "3.0" = "Auto"]

	 Text item=Air_Suply_Fan

	 Text item=Air_Exhaust_Fan

	 Selection item=Air_Mode mappings=[

"1.0" = "Tryb 1", "2.0" = "Tryb 2", "3.0" = "Tryb 3", "4.0" = "Program"]

}
Basic UI on
mobile
OH2 discovery result
THE END
HOW TO FIND ME
Twitter: ldywicki
https://community.openhab.org

More Related Content

PDF
IoT databases - review and challenges - IoT, Hardware & Robotics meetup - onl...
PPTX
Kafka presentation
PDF
Introducing Change Data Capture with Debezium
PDF
Dataflow with Apache NiFi
PPTX
Extending Apache Ranger Authorization Beyond Hadoop: Review of Apache Ranger ...
PPTX
Hortonworks Data in Motion Webinar Series Part 7 Apache Kafka Nifi Better Tog...
PDF
Apache Kafka Architecture & Fundamentals Explained
ODP
Introduction to Kafka connect
IoT databases - review and challenges - IoT, Hardware & Robotics meetup - onl...
Kafka presentation
Introducing Change Data Capture with Debezium
Dataflow with Apache NiFi
Extending Apache Ranger Authorization Beyond Hadoop: Review of Apache Ranger ...
Hortonworks Data in Motion Webinar Series Part 7 Apache Kafka Nifi Better Tog...
Apache Kafka Architecture & Fundamentals Explained
Introduction to Kafka connect

What's hot (20)

PDF
Slides: NoSQL Data Modeling Using JSON Documents – A Practical Approach
PPTX
Large Scale Graph Analytics with JanusGraph
PPTX
Kafka Tutorial - Introduction to Apache Kafka (Part 1)
PPSX
Apache Flink, AWS Kinesis, Analytics
PPTX
Kafka Tutorial - DevOps, Admin and Ops
PPTX
Apache Kafka at LinkedIn
PPTX
InfluxDb
PDF
From Zero to Hero with Kafka Connect
PDF
An Introduction to Apache Kafka
PPSX
Elastic-Engineering
PDF
Apache Kafka Introduction
PDF
Spring Cloud: Why? How? What?
PDF
Producer Performance Tuning for Apache Kafka
PDF
Introduction to apache spark
PDF
Apache Kafka - Martin Podval
PDF
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB) - Friends, Enemies or ...
PDF
Emerging Trends in Data Engineering
PDF
Beautiful Monitoring With Grafana and InfluxDB
PPTX
Event-driven microservices
PPTX
Slides: NoSQL Data Modeling Using JSON Documents – A Practical Approach
Large Scale Graph Analytics with JanusGraph
Kafka Tutorial - Introduction to Apache Kafka (Part 1)
Apache Flink, AWS Kinesis, Analytics
Kafka Tutorial - DevOps, Admin and Ops
Apache Kafka at LinkedIn
InfluxDb
From Zero to Hero with Kafka Connect
An Introduction to Apache Kafka
Elastic-Engineering
Apache Kafka Introduction
Spring Cloud: Why? How? What?
Producer Performance Tuning for Apache Kafka
Introduction to apache spark
Apache Kafka - Martin Podval
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB) - Friends, Enemies or ...
Emerging Trends in Data Engineering
Beautiful Monitoring With Grafana and InfluxDB
Event-driven microservices
Ad

Similar to Openhab Grafana and Influxdb (20)

PDF
Data Ingestion in Big Data and IoT platforms
PDF
Internet of Things and Big Data
PDF
Open Data Hub - Patrick Ohnewein - Update about the Open Data Hub Project
PDF
Phoenix Data Conference - Big Data Analytics for IoT 11/4/17
PDF
Green Internet of Things 1st Edition Bandana Mahapatra
PDF
Streaming Visualization
PDF
Green Internet of Things 1st Edition Bandana Mahapatra
PDF
IPv6 Deployment - A New Milestone for BdREN
PPTX
W3C DAP APIs Overview for HTML5 KIG
PPT
Io t technologies_ppt-2
PDF
IoT Architecture - Are Traditional Architectures Good Enough or do we Need Ne...
PDF
Streaming Visualization
PDF
Netsoft19 Keynote: Fluid Network Planes
PDF
IEEE SusTech IoT Keynote Presentation 10/10/16
PDF
Big Data to SMART Data : Process Scenario
PDF
Cloud Apps - Running Fully Distributed on Mobile Devices - Dominik Rüttimann
PDF
Pivotal - Advanced Analytics for Telecommunications
PPTX
IoT Sensor Sensibility - Hull Digital - C4Di - Feb 2016
PDF
20160229 open belgium the city of ghent as linked open data
PDF
Open City, Smart City - Ann Bernaert
Data Ingestion in Big Data and IoT platforms
Internet of Things and Big Data
Open Data Hub - Patrick Ohnewein - Update about the Open Data Hub Project
Phoenix Data Conference - Big Data Analytics for IoT 11/4/17
Green Internet of Things 1st Edition Bandana Mahapatra
Streaming Visualization
Green Internet of Things 1st Edition Bandana Mahapatra
IPv6 Deployment - A New Milestone for BdREN
W3C DAP APIs Overview for HTML5 KIG
Io t technologies_ppt-2
IoT Architecture - Are Traditional Architectures Good Enough or do we Need Ne...
Streaming Visualization
Netsoft19 Keynote: Fluid Network Planes
IEEE SusTech IoT Keynote Presentation 10/10/16
Big Data to SMART Data : Process Scenario
Cloud Apps - Running Fully Distributed on Mobile Devices - Dominik Rüttimann
Pivotal - Advanced Analytics for Telecommunications
IoT Sensor Sensibility - Hull Digital - C4Di - Feb 2016
20160229 open belgium the city of ghent as linked open data
Open City, Smart City - Ann Bernaert
Ad

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Tartificialntelligence_presentation.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Machine learning based COVID-19 study performance prediction
PDF
Getting Started with Data Integration: FME Form 101
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Mushroom cultivation and it's methods.pdf
PPTX
Machine Learning_overview_presentation.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
cloud_computing_Infrastucture_as_cloud_p
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Programs and apps: productivity, graphics, security and other tools
Network Security Unit 5.pdf for BCA BBA.
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Per capita expenditure prediction using model stacking based on satellite ima...
MIND Revenue Release Quarter 2 2025 Press Release
Tartificialntelligence_presentation.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Machine learning based COVID-19 study performance prediction
Getting Started with Data Integration: FME Form 101
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Mushroom cultivation and it's methods.pdf
Machine Learning_overview_presentation.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Assigned Numbers - 2025 - Bluetooth® Document
cloud_computing_Infrastucture_as_cloud_p
SOPHOS-XG Firewall Administrator PPT.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf

Openhab Grafana and Influxdb