SlideShare a Scribd company logo
1 of 39
Download to read offline
Home Automation with Asterisk
Alberto Sagredo Castro
www.voipnovatos.es
10/14/2015
Who i am
• Alberto Sagredo Castro

• a.k.a @albersag on twitter

• Working in VoIP since ten years ago

• Working with Asterisk for about 10
years

• Several large projects with Asterisk
and many Asterisk compiled thru
Spain and Europe

• Working for Avanzada 7 and USA
VOIP 

• Other Stuff : Mikrotik, Ubiquiti, Ham
Radio and all that contains bits on it
2
Why home automation
• It makes life easier
• Its not expensive
• It helps disabled people
• Internet of Things (IOT) is here
• Its not complex
• Eco friendly and save money
• Just play !
3
Home automation vs Asterisk
4
• Asterisk natively does not support home automation
protocols
• We need something to interact with ha (home
automation)
• What could we use? PHPARI, AGI, .call files, asterisk
dialplan, SQL …
• Any programmer here? What about chan_zwave :)
Which protocol to use
5
• home automation is plenty of protocols, open, proprietary, half open half proprietary :)
all flavours.
• smarthings
• z-wave
• knx
• insteon
• x10
• zigbee
• opensprinkler
• MQTT
Z-Wave
6
• Its a “propietary” protocol owned by Sigma Designs
• Its widely supported by enterprise and really good compatibility
• Its cheap (50 $/device)
• USA & EU frecuencies
• Feedback from device status
• Low energy
• Zwave alliance (+ 400 manufacturers)
• Mesh network between devices. Good for homes
7
Do not reinvent the wheel
8
• Ok. Asterisk does not support (yet) home automation but
i want to use Asterisk in my home automation system….
What could i do?
• I will use Asterisk to generate
calls when events happens
on my HA system and to
interact with them by phone.
• Phone is easier than using
apps and works on any
platform :)
OpenHab
9
• Its the swedish knife (a.k.a Olle :) for home automation.
• Lots of binding, plenty of protocols supported and many more
• REST API
• Items
• Sitemaps
• Scripts / Rules (Xtend scripting language)
• Transforms
• Interface to admin Habmin and App for design (Openhab Designer)
OpenHab
10
• Its Java .
• Runs on BananaPi or Raspberry Pi without any issues.
• Easy to install.
• Easy as Asterisk to configure.
• Scripting language so you would feel confortable with it
OpenHab
11
How to start
12
• We would need an USB Zwave Dongle (Aeon Labs,
Zwave.me,…)
• A Raspberry Pi or Banana Pi
• Zwave devices
• Asterisk of course
• Internet for notifications and persistent data to the cloud
How to start
13
Installing OpenHab
14
• If you use Debian install repos
curl 'https://bintray.com/user/downloadSubjectPublicKey?
username=openhab' | sudo apt-key add -
echo "deb http://dl.bintray.com/openhab/apt-repo stable main" | sudo
tee /etc/apt/sources.list.d/openhab.list
sudo apt-get update
sudo apt-get install openhab-runtime
update-rc.d openhab defaults
service openhab start
Install Java & esential bindings
15
sudo tar zxvf jdk-8-ea-b36e-linux-arm-hflt-*.tar.gz -C /opt
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/
jdk1.8.0/bin/java" 1
sudo update-alternatives for other commands if needed (e.g. javac).
java -version
Install Java & esential bindings
16
sudo apt-get install openhab-addon-binding-samsungtv
sudo apt-get install openhab-addon-binding-zwave
sudo apt-get install openhab-addon-io-myopenhab
sudo apt-get install openhab-addon-persistence-exec openhab-addon-
persistence-logging
sudo apt-get install openhab-addon-binding-opensprinkler
sudo apt-get install openhab-addon-binding-http openhab-addon-binding-ntp
sudo apt-get install openhab-addon-action-pushover
sudo apt-get install openhab-addon-binding-asterisk
Asterisk
17
Install Asterisk
Enable manager (AMI) , http and ARI
and Lets see how to integrate!
Integration. Lets fun!
18
• Lets focus in how to integrate this cool “weapons” together.
• We could use:
• ARI
• REST API
• CLI
• .call files
• AstDB
• MySQL
• etc…..
Dangerous Demo 1
19
• IVR to interact with Lights and if everything goes fine, open
my garden sprinklers in spain remotely (dont be nasty)
• WIFI SSID -> “VOIPNOVATOS”
• Asterisk -> “10.0.2.x”
• User Extension “20x”
• Password : “astricon” of course
• Call 666 and don't be evil!
Dangerous Demo 1
20
• Asterisk Dialplan
[astricon-ivr]
exten => s,1,Noop
exten => s,n,Background(welcomeivr)
exten => s,n,WaitExten(10)
exten => s,n,Hangup
exten => 1,1,Noop(Turn on light)
exten => 1,n,GotoIf($[${DB(light/astricon)} = "ON"]?lighton:lightoff)
exten => 1,n(lighton),Set(${DB(light/astricon)="OFF"})
exten => 1,n,System(curl --header "Content-Type: text/plain" --request POST --data "OFF" http://10.0.2.2:8080/rest/items/Z_Socket1/)
exten => 1,n,Playback(lightoff)
exten => 1,n,Hangup
exten => 1,n(lightoff),Set(${DB(light/astricon)="ON"})
exten => 1,n,System(curl --header "Content-Type: text/plain" --request POST --data "ON" http://10.0.2.2:8080/rest/items/Z_Socket1/)
exten => 1,n,Playback(lighton)
exten => 1,n,Hangup
exten => 2,1,Noop(Fire Alarm)
exten => 2,n,GotoIf($[${DB(alarm/astricon)} = "ON"]?fired:notfired)
exten => 2,n(fired),Set(${DB(alarm/astricon)="OFF"})
exten => 2,n,System(curl --header "Content-Type: text/plain" --request POST --data "OFF" http://10.0.2.2:8080/rest/items/FortrezZ_Siren)
exten => 2,n,Playback(thieves)
exten => 2,n,Hangup
exten => 2,n(notfired),Set(${DB(alarm/astricon)="ON"})
exten => 2,n,System(curl --header "Content-Type: text/plain" --request POST --data "ON" http://10.0.2.2:8080/rest/items/FortrezZ_Siren)
exten => 2,n,Playback(nothieves)
exten => 2,n,Hangup
exten => 3,1,Noop(Sprinkler)
exten => 3,n,GotoIf($[${DB(sprinkler/astricon)} = "ON"]?on:off)
exten => 3,n(on),Set(${DB(sprinkler/astricon)="OFF"})
exten => 3,n,System(curl --header "Content-Type: text/plain" --request POST --data "OFF" http://10.0.2.2:8080/rest/items/Sprinklers_Zone4)
exten => 3,n,Playback(closedsprinklers)
exten => 3,n,Hangup
exten => 3,n(off),Set(${DB(sprinkler/astricon)="ON"})
exten => 3,n,System(curl --header "Content-Type: text/plain" --request POST --data "ON" http://10.0.2.2:8080/rest/items/Sprinklers_Zone4)
exten => 3,n,Playback(opensprinklers)
exten => 3,n,Hangup
Dangerous Demo 2
21
• For some people it could be great to interact using voice
while in its home. Being at home or not, Asterisk could
turn on lights, turn off alarm and make emergency calls
• Use Google ASR, Its free and it works well! (Use latest agi
version as oldest has issues)
• You need internet connection! Hope astricon one would
work well!
Dangerous Demo 2
22
• Google ASR
• Asterisk Speech Recognition http://zaf.github.io/asterisk-
speech-recog/
Dangerous Demo 2
23
• Asterisk Dialplan
[astricon-asr]
exten => s,1,Noop
exten => s,n,Background(welcomeivr)
exten => s,n,agi(speech-recog-tiny.agi,en-US)
exten => s,n,Verbose(1,The text you just said is: ${utterance})
exten => s,n,Verbose(1,The probability to be right is: ${confidence})
exten => s,n,GotoIf($["${uterance}" = "fire alarm"]?firealarm)
exten => s,n,GotoIf($["${uterance}" = "turn on"]?turnonlight:out)
exten => s,n(firealarm),Goto(firealarm,1)
exten => s,n,Hangup
exten => s,n(turnonlight),Goto(turnonlight,1)
exten => s,n(out),Hangup
exten => turnonlight,1,Noop(Turn on light)
exten => turnonlight,n,GotoIf($[${DB(light/astricon)} = "ON"]?lighton:lightoff)
exten => turnonlight,n(lighton),Set(DB(light/astricon)="OFF")
exten => turnonlight,n,System(curl --header "Content-Type: text/plain" --request POST --data "OFF" http://10.0.2.19:8080/rest/items/Z_Socket1/)
exten => turnonlight,n,Playback(lightoff)
exten => turnonlight,n,Hangup
exten => turnonlight,n(lightoff),Set(DB(light/astricon)="ON")
exten => turnonlight,n,System(curl --header "Content-Type: text/plain" --request POST --data "ON" http://10.0.2.19:8080/rest/items/Z_Socket1/)
exten => turnonlight,n,Playback(lighton)
exten => turnonlight,n,Hangup
exten => firealarm,1,Noop(Fire Alarm)
exten => firealarm,n,GotoIf($[${DB(alarm/astricon)} = "ON"]?fired:notfired)
exten => firealarm,n(fired),Set(DB(alarm/astricon)="OFF")
exten => firealarm,n,System(curl --header "Content-Type: text/plain" --request POST --data "OFF" http://10.0.2.19:8080/rest/items/FortrezZ_Siren)
exten => firealarm,n,Playback(nothieves)
exten => firealarm,n,Hangup
exten => firealarm,n(notfired),Set(DB(alarm/astricon)="ON")
exten => firealarm,n,System(curl --header "Content-Type: text/plain" --request POST --data "ON" http://10.0.2.19:8080/rest/items/FortrezZ_Siren)
exten => firealarm,n,Playback(thieves)
exten => firealarm,n,Hangup
Dangerous Demo 3
24
• Smart followme
• You can use Wifi to detect you are at home or presence
detectors.
• If you are outside home, divert your calls to cell phone.
Just ring on Kitchens phone if you are cooking (Advise:
this will not work if you have kids moving around)
• Here we could use AGI to get motion status from
Openhab.
Dangerous Demo 3
25
• Asterisk Dialplan
[astricon-presence]
exten => s,1,Answer()
exten => s,n,AGI(openhab.agi, "asterisk", "password", "Fibaro_Motion_1_Motion", "atHomeMotion")
exten => s,n,AGI(openhab.agi, "asterisk", "password", "Home_Presence", "atHomeWifi")
exten => s,n,GotoIf($["${atHomeMotion}" == "ON"]?athome)
exten => s,n,GotoIf($["${atHomeWifi}" == "ON"]?athome:away)
exten => s,n,Goto(bye)
exten => s,n(athome),Playback(movementdetected)
exten => s,n,Hangup()
exten => s,n(away),Playback(movementnotdetected)
exten => s,n(bye),Hangup()
[astricon-presence2]
exten => s,1,Answer()
exten => s,n,GotoIf($["${PRESENCE}" == "ON"]?athome:away)
exten => s,n(athome),Playback(movementdetected)
exten => s,n,Hangup()
exten => s,n(away),Playback(movementnotdetected)
exten => s,n,Hangup()
Dangerous Demo 3
26
• Openhab.agi
#!/usr/bin/python
import sys,os,datetime
import httplib
import base64
def send(data):
sys.stdout.write("%s n"%data)
sys.stdout.flush()
AGIENV={}
env = ""
while(env != "n"):
env = sys.stdin.readline()
envdata = env.split(":")
if len(envdata)==2:
AGIENV[envdata[0].strip()]=envdata[1].strip()
username = AGIENV['agi_arg_1']
password = AGIENV['agi_arg_2']
item = AGIENV['agi_arg_3']
varname = AGIENV['agi_arg_4']
auth = base64.encodestring('%s:%s' % (username, password)).replace('n', '')
headers = {"Authorization" : "Basic %s" % auth}
conn = httplib.HTTPConnection("localhost", 8080)
conn.request('GET', "/rest/items/%s/state"%item, "", headers)
response = conn.getresponse()
item_state = response.read()
send("SET VARIABLE %s %s"%(varname, item_state))
sys.stdin.readline()
Dangerous Demo 3
27
• Openhab rules
rule "MotionOn"
when
Item Fibaro_Motion_1_Motion changed from OFF to ON
then
counter = counter + 1
logInfo("Rules", "Motion Rule ON")
executeCommandLine("/usr/src/openhab/configurations/rules/curlon.sh")
pushover("Motion Detected on Astricon")
end
rule "MotionOff"
when
Time cron "0 */2 * * * ?"
then
if(lastCheck == counter) {
counter = 0
lastCheck = -1;
logInfo("Rules", "Motion Rule OFF")
executeCommandLine("/usr/src/openhab/configurations/rules/curloff.sh")
} else {
lastCheck = counter
}
end
Dangerous Demo 3
28
• Openhab rules
var Timer timer = null
rule "MotionOn2"
when
Item Fibaro_Door changed
then
if(Fibaro_Door.state==ON) {
executeCommandLine("/etc/openhab/configurations/rules/curlondoor.sh")
if(timer==null) {
timer = createTimer(now.plusSeconds(10)) [|
executeCommandLine("/etc/openhab/configurations/rules/curloffdoor.sh")
]
} else {
timer.reschedule(now.plusSeconds(10))
}
} else if(Fibaro_Door.state==OFF) {
if(timer!=null) {
timer.cancel
timer = null
}
}
end
Dangerous Demo 3
29
• Wifi Detector
#!/bin/sh
macalberto="f0:27:2d:00:44:12"
athome=0
macs=$(iw dev wlan0 station dump | grep Station | cut -f 2 -s -d" ")
for mac in $macs; do
case $mac in
"$macalberto") athome=1;;
esac
done
if [ $athome -eq 1 ]; then
curl --header "Content-Type: text/plain" --request POST --data "ON" http://10.0.2.19:8080/rest/items/Home_Presence/
else
curl --header "Content-Type: text/plain" --request POST --data "OFF" http://10.0.2.19:8080/rest/items/Home_Presence/
fi
• curlon.sh
#!/bin/bash
curl -v -u asterisk:asterisk -X POST "http://10.0.2.19:8088/ari/asterisk/variable?variable=PRESENCEvalue=ON&api_key=asterisk:asterisk"
Dangerous Demo 4
30
• Create your own Alarm System controlled by phone
• We could arm alarm system by phone
• No monthly fees
• If armed and motion is detected call police or call you
before police that would be better :)
• If fired, open sprinklers at garden..
• Used ARI to gen calls on Asterisk
Dangerous Demo 4
31
• ari.conf
[general]
enabled = yes
allowed_origins=http://ari.asterisk.org
[asterisk]
type = user
read_only = no
password = asterisk
• http.conf
[general]
enabled = yes
bindaddr=0.0.0.0
• manager.conf[general]
enabled = yes
;webenabled = yes
port = 5038
bindaddr = 127.0.0.1
[asterisk]
secret = asterisk
read = system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan
write = system,call,agent,user,config,command,reporting,originate,message
Dangerous Demo 4
32
• extensions.conf
[extensiones]
exten => _2XX,1,Dial(SIP/${EXTEN},20,TtrR)
exten => _2XX,n,hangup
exten => 900,1,Answer
exten => 900,n,Playback(policecall)
exten => 900,n,Ringing()
exten => 900,n,Wait(10)
exten => 900,n,Hangup
• alarmon.sh
#!/bin/bash
curl -v -u asterisk:asterisk -X POST "http://10.0.2.19:8088/ari/asterisk/variable?variable=ALARM&value=ON&api_key=asterisk:asterisk"
curl -v -u asterisk:asterisk -X POST "http://10.0.2.19:8088/ari/channels?endpoint=SIP
%2F201&extension=900&context=extensiones&priority=1&callerId=ALARM%20DETECTED%20ASTRICON&timeout=30&api_key=asterisk:asterisk"
Dangerous Demo 4
33
• Openhab rules
rule "Alarm"
when
Item Fibaro_Door changed from OFF to ON
then
if(Fibaro_Door.state == ON && Alarm_Switch.state == ON )
{
logInfo("Rules", "Alarm Alarm Alarm")
executeCommandLine("/etc/openhab/configurations/rules/alarmon.sh")
pushover("Alarm on Astricon")
}
end
rule "Water"
when
Item Fibaro_Flood changed
then
if(Fibaro_Flood.state == 255 && Alarm_Switch.state == ON )
{
logInfo("Rules", "Alarm Alarm Alarm")
executeCommandLine("/etc/openhab/configurations/rules/alarmon.sh")
pushover("Alarm on Astricon")
}
end
Bonus Demo
34
• Asterisk Ringing Status and Called/Calling Number
• We have an openhab binding but it does not work with
new AMI
• Using JSON answer from Asterisk ARI and jq , json
parser will try to get this working.
Bonus Demo
35
• extensions.conf
[extensiones]
exten => 999,1,Set(${CALLERID(num)}=778811)
exten => 999,n,System(curl --header "Content-Type: text/plain" --request POST --data "ON" http://10.0.2.19:8080/rest/items/Asterisk_Ring)
exten => 999,n,Ringing()
exten => 999,n,Wait(10)
exten => 999,n,Answer()
exten => 999,n,Echo()
exten => 999,n,Hangup
exten => h,1,System(curl --header "Content-Type: text/plain" --request POST --data "OFF" http://10.0.2.19:8080/rest/items/Asterisk_Ring)
• call.sh
#!/bin/bash
json_clause=$(curl http://10.0.2.19:8088/ari/channels?api_key=asterisk:asterisk)
state=$(echo $json_clause | jq '.[0].state')
name=$(echo $json_clause | jq '.[0].name')
numbercalling=$(echo $json_clause | jq '.[0].caller.number')
numbercalled=$(echo $json_clause | jq '.[0].dialplan.exten')
numbercalled2=$(echo $json_clause | jq '.[0].connected.number')
curl --header 'Content-Type: text/plain' --request PUT --data "$numbercalling" http://localhost:8080/rest/items/Active_Calling/state/
curl --header 'Content-Type: text/plain' --request PUT --data "$numbercalled" http://localhost:8080/rest/items/Active_Called/state/
Bonus Demo
36
• Openhab rules
rule "Call"
when
Item Asterisk_Ring changed
then
if(Asterisk_Ring.state == ON)
{
executeCommandLine("bash /etc/openhab/configurations/rules/call.sh")
}
if(Asterisk_Ring.state == OFF)
{
executeCommandLine(" bash /etc/openhab/configurations/rules/calloff.sh")
}
end
Questions?
37
Resources
38
• www.openhab.org
• https://github.com/openhab/openhab/wiki/Samples-Rules
• https://github.com/openhab/openhab/wiki/Explanation-of-items
• https://github.com/openhab/openhab/wiki/Linux---OS-X
• http://raspberrypi.stackexchange.com/questions/4683/how-to-install-the-java-
jdk-on-raspberry-pi
• http://zaf.github.io/asterisk-speech-recog/
• http://tinsley.io/2015/03/openhab-presence-detection-with-dd-wrt/
Thanks
39
• To my wife and kids they are always with me and also
here (Disney off course :)
• All friends wishing luck these days
• To Fibaro
• To Digium for inviting me. It has been a pleasure and an
amazing christmas gift!
• To all of you for attending!

More Related Content

What's hot

Costruiamo un Rover in 60 minuti
Costruiamo un Rover in 60 minutiCostruiamo un Rover in 60 minuti
Costruiamo un Rover in 60 minutiCodemotion
 
Adafruit Huzzah Esp8266 WiFi Board
Adafruit Huzzah Esp8266 WiFi BoardAdafruit Huzzah Esp8266 WiFi Board
Adafruit Huzzah Esp8266 WiFi BoardBiagio Botticelli
 
IoT simple with the ESP8266 - presented at the July 2015 Austin IoT Hardware ...
IoT simple with the ESP8266 - presented at the July 2015 Austin IoT Hardware ...IoT simple with the ESP8266 - presented at the July 2015 Austin IoT Hardware ...
IoT simple with the ESP8266 - presented at the July 2015 Austin IoT Hardware ...David Fowler
 
Arduino i rremote 1112
Arduino i rremote 1112Arduino i rremote 1112
Arduino i rremote 1112馬 萬圳
 
Fosdem 2010 - An Introduction to Enna Media Center
Fosdem 2010 - An Introduction to Enna Media CenterFosdem 2010 - An Introduction to Enna Media Center
Fosdem 2010 - An Introduction to Enna Media CenterBenjamin Zores
 
Arduino Meetup with Sonar and 433Mhz Radios
Arduino Meetup with Sonar and 433Mhz RadiosArduino Meetup with Sonar and 433Mhz Radios
Arduino Meetup with Sonar and 433Mhz Radiosroadster43
 
Internet Of Things: Hands on: YOW! night
Internet Of Things: Hands on: YOW! nightInternet Of Things: Hands on: YOW! night
Internet Of Things: Hands on: YOW! nightAndy Gelme
 
Web Presentation Week11
Web Presentation Week11Web Presentation Week11
Web Presentation Week11guest8732a6
 
Making wearables with NodeMCU - FOSDEM 2017
Making wearables with NodeMCU - FOSDEM 2017Making wearables with NodeMCU - FOSDEM 2017
Making wearables with NodeMCU - FOSDEM 2017Etiene Dalcol
 
Esp8266 hack sonoma county 4/8/2015
Esp8266 hack sonoma county 4/8/2015Esp8266 hack sonoma county 4/8/2015
Esp8266 hack sonoma county 4/8/2015mycal1
 
Esp8266 NodeMCU
Esp8266 NodeMCUEsp8266 NodeMCU
Esp8266 NodeMCUroadster43
 
Interacting with Intel Edison
Interacting with Intel EdisonInteracting with Intel Edison
Interacting with Intel EdisonFITC
 
NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1Andy Gelme
 
Nodemcu - introduction
Nodemcu - introductionNodemcu - introduction
Nodemcu - introductionMichal Sedlak
 
Build WiFi gadgets using esp8266
Build WiFi gadgets using esp8266Build WiFi gadgets using esp8266
Build WiFi gadgets using esp8266Baoshi Zhu
 
IoT Hands-On-Lab, KINGS, 2019
IoT Hands-On-Lab, KINGS, 2019IoT Hands-On-Lab, KINGS, 2019
IoT Hands-On-Lab, KINGS, 2019Jong-Hyun Kim
 
Esp8266 - Intro for dummies
Esp8266 - Intro for dummiesEsp8266 - Intro for dummies
Esp8266 - Intro for dummiesPavlos Isaris
 

What's hot (20)

lwM2M OTA for ESP8266
lwM2M OTA for ESP8266lwM2M OTA for ESP8266
lwM2M OTA for ESP8266
 
Costruiamo un Rover in 60 minuti
Costruiamo un Rover in 60 minutiCostruiamo un Rover in 60 minuti
Costruiamo un Rover in 60 minuti
 
Adafruit Huzzah Esp8266 WiFi Board
Adafruit Huzzah Esp8266 WiFi BoardAdafruit Huzzah Esp8266 WiFi Board
Adafruit Huzzah Esp8266 WiFi Board
 
IoT simple with the ESP8266 - presented at the July 2015 Austin IoT Hardware ...
IoT simple with the ESP8266 - presented at the July 2015 Austin IoT Hardware ...IoT simple with the ESP8266 - presented at the July 2015 Austin IoT Hardware ...
IoT simple with the ESP8266 - presented at the July 2015 Austin IoT Hardware ...
 
Arduino i rremote 1112
Arduino i rremote 1112Arduino i rremote 1112
Arduino i rremote 1112
 
Fosdem 2010 - An Introduction to Enna Media Center
Fosdem 2010 - An Introduction to Enna Media CenterFosdem 2010 - An Introduction to Enna Media Center
Fosdem 2010 - An Introduction to Enna Media Center
 
Arduino Meetup with Sonar and 433Mhz Radios
Arduino Meetup with Sonar and 433Mhz RadiosArduino Meetup with Sonar and 433Mhz Radios
Arduino Meetup with Sonar and 433Mhz Radios
 
Internet Of Things: Hands on: YOW! night
Internet Of Things: Hands on: YOW! nightInternet Of Things: Hands on: YOW! night
Internet Of Things: Hands on: YOW! night
 
Web Presentation Week11
Web Presentation Week11Web Presentation Week11
Web Presentation Week11
 
Making wearables with NodeMCU - FOSDEM 2017
Making wearables with NodeMCU - FOSDEM 2017Making wearables with NodeMCU - FOSDEM 2017
Making wearables with NodeMCU - FOSDEM 2017
 
P&O Session 2
P&O Session 2P&O Session 2
P&O Session 2
 
Esp8266 hack sonoma county 4/8/2015
Esp8266 hack sonoma county 4/8/2015Esp8266 hack sonoma county 4/8/2015
Esp8266 hack sonoma county 4/8/2015
 
Esp8266 NodeMCU
Esp8266 NodeMCUEsp8266 NodeMCU
Esp8266 NodeMCU
 
Interacting with Intel Edison
Interacting with Intel EdisonInteracting with Intel Edison
Interacting with Intel Edison
 
NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1NodeMCU ESP8266 workshop 1
NodeMCU ESP8266 workshop 1
 
Esp8266 basics
Esp8266 basicsEsp8266 basics
Esp8266 basics
 
Nodemcu - introduction
Nodemcu - introductionNodemcu - introduction
Nodemcu - introduction
 
Build WiFi gadgets using esp8266
Build WiFi gadgets using esp8266Build WiFi gadgets using esp8266
Build WiFi gadgets using esp8266
 
IoT Hands-On-Lab, KINGS, 2019
IoT Hands-On-Lab, KINGS, 2019IoT Hands-On-Lab, KINGS, 2019
IoT Hands-On-Lab, KINGS, 2019
 
Esp8266 - Intro for dummies
Esp8266 - Intro for dummiesEsp8266 - Intro for dummies
Esp8266 - Intro for dummies
 

Viewers also liked

Hacking Z-Wave Home Automation Systems
Hacking Z-Wave Home Automation SystemsHacking Z-Wave Home Automation Systems
Hacking Z-Wave Home Automation SystemsSensePost
 
Home Automation Products and Suppliers in UAE
Home Automation Products and Suppliers in UAEHome Automation Products and Suppliers in UAE
Home Automation Products and Suppliers in UAEBeatriz john
 
Home automation ppt-kamal lamichhane
Home automation ppt-kamal lamichhaneHome automation ppt-kamal lamichhane
Home automation ppt-kamal lamichhaneKamal Lamichhane
 
Presentation Smart Home With Home Automation
Presentation Smart Home With Home AutomationPresentation Smart Home With Home Automation
Presentation Smart Home With Home AutomationArifur Rahman
 
Asterisk-Java Framework Presentation
Asterisk-Java Framework PresentationAsterisk-Java Framework Presentation
Asterisk-Java Framework PresentationJustin Grammens
 
Jonny_Martin-Asterisk
Jonny_Martin-AsteriskJonny_Martin-Asterisk
Jonny_Martin-Asterisktutorialsruby
 
Convegencia de Infraestructuras existentes hacia voip con Asterisk
Convegencia de Infraestructuras existentes hacia voip con AsteriskConvegencia de Infraestructuras existentes hacia voip con Asterisk
Convegencia de Infraestructuras existentes hacia voip con AsteriskAlberto Sagredo Castro
 
Home automation for humans
Home automation for humansHome automation for humans
Home automation for humansGordon Meyer
 
02 asterisk - the future of telecommunications
02   asterisk - the future of telecommunications02   asterisk - the future of telecommunications
02 asterisk - the future of telecommunicationsTran Thanh
 
Telephony Service Development on Asterisk Platform
Telephony Service Development on Asterisk PlatformTelephony Service Development on Asterisk Platform
Telephony Service Development on Asterisk PlatformHamid Fadishei
 
Implementation Lessons using WebRTC in Asterisk
Implementation Lessons using WebRTC in AsteriskImplementation Lessons using WebRTC in Asterisk
Implementation Lessons using WebRTC in AsteriskMoises Silva
 
VOIP Practica 1 - Marzo
VOIP Practica 1 - MarzoVOIP Practica 1 - Marzo
VOIP Practica 1 - MarzoJose Cordova
 
Practica 3 Modified
Practica 3 ModifiedPractica 3 Modified
Practica 3 ModifiedJose Cordova
 
Practica 1 - VOIP II
Practica 1 - VOIP IIPractica 1 - VOIP II
Practica 1 - VOIP IIJose Cordova
 

Viewers also liked (20)

RadioVozIP
RadioVozIPRadioVozIP
RadioVozIP
 
Hacking Z-Wave Home Automation Systems
Hacking Z-Wave Home Automation SystemsHacking Z-Wave Home Automation Systems
Hacking Z-Wave Home Automation Systems
 
Home Automation Products and Suppliers in UAE
Home Automation Products and Suppliers in UAEHome Automation Products and Suppliers in UAE
Home Automation Products and Suppliers in UAE
 
Presentation on home automation
Presentation on home automationPresentation on home automation
Presentation on home automation
 
Home automation ppt-kamal lamichhane
Home automation ppt-kamal lamichhaneHome automation ppt-kamal lamichhane
Home automation ppt-kamal lamichhane
 
Presentation Smart Home With Home Automation
Presentation Smart Home With Home AutomationPresentation Smart Home With Home Automation
Presentation Smart Home With Home Automation
 
Asterisk-Java Framework Presentation
Asterisk-Java Framework PresentationAsterisk-Java Framework Presentation
Asterisk-Java Framework Presentation
 
Jonny_Martin-Asterisk
Jonny_Martin-AsteriskJonny_Martin-Asterisk
Jonny_Martin-Asterisk
 
Convegencia de Infraestructuras existentes hacia voip con Asterisk
Convegencia de Infraestructuras existentes hacia voip con AsteriskConvegencia de Infraestructuras existentes hacia voip con Asterisk
Convegencia de Infraestructuras existentes hacia voip con Asterisk
 
Home automation for humans
Home automation for humansHome automation for humans
Home automation for humans
 
02 asterisk - the future of telecommunications
02   asterisk - the future of telecommunications02   asterisk - the future of telecommunications
02 asterisk - the future of telecommunications
 
Telephony Service Development on Asterisk Platform
Telephony Service Development on Asterisk PlatformTelephony Service Development on Asterisk Platform
Telephony Service Development on Asterisk Platform
 
Voz ip desde dispositivos móviles
Voz ip desde dispositivos móvilesVoz ip desde dispositivos móviles
Voz ip desde dispositivos móviles
 
Vektor
VektorVektor
Vektor
 
Implementation Lessons using WebRTC in Asterisk
Implementation Lessons using WebRTC in AsteriskImplementation Lessons using WebRTC in Asterisk
Implementation Lessons using WebRTC in Asterisk
 
A Brief History of Home Automation
A Brief History of Home AutomationA Brief History of Home Automation
A Brief History of Home Automation
 
VOIP Practica 1 - Marzo
VOIP Practica 1 - MarzoVOIP Practica 1 - Marzo
VOIP Practica 1 - Marzo
 
Practica 3 Modified
Practica 3 ModifiedPractica 3 Modified
Practica 3 Modified
 
Practica 1 - VOIP II
Practica 1 - VOIP IIPractica 1 - VOIP II
Practica 1 - VOIP II
 
Cohon Gene
Cohon GeneCohon Gene
Cohon Gene
 

Similar to Home Automation with Asterisk Using OpenHab

Exploring the Internet of Things Using Ruby
Exploring the Internet of Things Using RubyExploring the Internet of Things Using Ruby
Exploring the Internet of Things Using RubyMike Hagedorn
 
Introduction to Raspberry Pi and GPIO
Introduction to Raspberry Pi and GPIOIntroduction to Raspberry Pi and GPIO
Introduction to Raspberry Pi and GPIOKris Findlay
 
Nodebot: Arte de controlar arduino com javascript
Nodebot: Arte de controlar arduino com javascriptNodebot: Arte de controlar arduino com javascript
Nodebot: Arte de controlar arduino com javascriptDesiree Santos
 
Python于Web 2.0网站的应用 - QCon Beijing 2010
Python于Web 2.0网站的应用 - QCon Beijing 2010Python于Web 2.0网站的应用 - QCon Beijing 2010
Python于Web 2.0网站的应用 - QCon Beijing 2010Qiangning Hong
 
Getting Started with iBeacons (Designers of Things 2014)
Getting Started with iBeacons (Designers of Things 2014)Getting Started with iBeacons (Designers of Things 2014)
Getting Started with iBeacons (Designers of Things 2014)Daniel Luxemburg
 
playaround workshop 2010 - internet of the real things
playaround workshop 2010 - internet of the real thingsplayaround workshop 2010 - internet of the real things
playaround workshop 2010 - internet of the real thingsplayaround.cc
 
CI/CD on Windows-Based Environments - Noam Shochat, eToro - DevOpsDays Tel Av...
CI/CD on Windows-Based Environments - Noam Shochat, eToro - DevOpsDays Tel Av...CI/CD on Windows-Based Environments - Noam Shochat, eToro - DevOpsDays Tel Av...
CI/CD on Windows-Based Environments - Noam Shochat, eToro - DevOpsDays Tel Av...DevOpsDays Tel Aviv
 
Arduino delphi 2014_7_bonn
Arduino delphi 2014_7_bonnArduino delphi 2014_7_bonn
Arduino delphi 2014_7_bonnMax Kleiner
 
"Elixir of Life" - Dev In Santos
"Elixir of Life" - Dev In Santos"Elixir of Life" - Dev In Santos
"Elixir of Life" - Dev In SantosFabio Akita
 
2015 bioinformatics python_io_wim_vancriekinge
2015 bioinformatics python_io_wim_vancriekinge2015 bioinformatics python_io_wim_vancriekinge
2015 bioinformatics python_io_wim_vancriekingeProf. Wim Van Criekinge
 
Pwning Your Phone with Adhearsion and Asterisk
Pwning Your Phone with Adhearsion and AsteriskPwning Your Phone with Adhearsion and Asterisk
Pwning Your Phone with Adhearsion and Asteriskjicksta
 
Intro to the raspberry pi board
Intro to the raspberry pi boardIntro to the raspberry pi board
Intro to the raspberry pi boardThierry Gayet
 
Elasticsearch sur Azure : Make sense of your (BIG) data !
Elasticsearch sur Azure : Make sense of your (BIG) data !Elasticsearch sur Azure : Make sense of your (BIG) data !
Elasticsearch sur Azure : Make sense of your (BIG) data !Microsoft
 
[JAM 1.2] Design & Multitasking (Andrew Solovey)
[JAM 1.2] Design & Multitasking (Andrew Solovey)[JAM 1.2] Design & Multitasking (Andrew Solovey)
[JAM 1.2] Design & Multitasking (Andrew Solovey)Evgeny Kaziak
 
JavaScript in 2015
JavaScript in 2015JavaScript in 2015
JavaScript in 2015Igor Laborie
 
A.I. Exercise.
A.I. Exercise.A.I. Exercise.
A.I. Exercise.Mario Cho
 
EclipseCon Europe 2013 - Turning Eclipse into an Arduino programming platform...
EclipseCon Europe 2013 - Turning Eclipse into an Arduino programming platform...EclipseCon Europe 2013 - Turning Eclipse into an Arduino programming platform...
EclipseCon Europe 2013 - Turning Eclipse into an Arduino programming platform...melbats
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsSerge Stinckwich
 

Similar to Home Automation with Asterisk Using OpenHab (20)

Exploring the Internet of Things Using Ruby
Exploring the Internet of Things Using RubyExploring the Internet of Things Using Ruby
Exploring the Internet of Things Using Ruby
 
Introduction to Raspberry Pi and GPIO
Introduction to Raspberry Pi and GPIOIntroduction to Raspberry Pi and GPIO
Introduction to Raspberry Pi and GPIO
 
Nodebot: Arte de controlar arduino com javascript
Nodebot: Arte de controlar arduino com javascriptNodebot: Arte de controlar arduino com javascript
Nodebot: Arte de controlar arduino com javascript
 
Python于Web 2.0网站的应用 - QCon Beijing 2010
Python于Web 2.0网站的应用 - QCon Beijing 2010Python于Web 2.0网站的应用 - QCon Beijing 2010
Python于Web 2.0网站的应用 - QCon Beijing 2010
 
Getting Started with iBeacons (Designers of Things 2014)
Getting Started with iBeacons (Designers of Things 2014)Getting Started with iBeacons (Designers of Things 2014)
Getting Started with iBeacons (Designers of Things 2014)
 
playaround workshop 2010 - internet of the real things
playaround workshop 2010 - internet of the real thingsplayaround workshop 2010 - internet of the real things
playaround workshop 2010 - internet of the real things
 
CI/CD on Windows-Based Environments - Noam Shochat, eToro - DevOpsDays Tel Av...
CI/CD on Windows-Based Environments - Noam Shochat, eToro - DevOpsDays Tel Av...CI/CD on Windows-Based Environments - Noam Shochat, eToro - DevOpsDays Tel Av...
CI/CD on Windows-Based Environments - Noam Shochat, eToro - DevOpsDays Tel Av...
 
Arduino delphi 2014_7_bonn
Arduino delphi 2014_7_bonnArduino delphi 2014_7_bonn
Arduino delphi 2014_7_bonn
 
"Elixir of Life" - Dev In Santos
"Elixir of Life" - Dev In Santos"Elixir of Life" - Dev In Santos
"Elixir of Life" - Dev In Santos
 
2015 bioinformatics python_io_wim_vancriekinge
2015 bioinformatics python_io_wim_vancriekinge2015 bioinformatics python_io_wim_vancriekinge
2015 bioinformatics python_io_wim_vancriekinge
 
Pwning Your Phone with Adhearsion and Asterisk
Pwning Your Phone with Adhearsion and AsteriskPwning Your Phone with Adhearsion and Asterisk
Pwning Your Phone with Adhearsion and Asterisk
 
Intro to the raspberry pi board
Intro to the raspberry pi boardIntro to the raspberry pi board
Intro to the raspberry pi board
 
Elasticsearch sur Azure : Make sense of your (BIG) data !
Elasticsearch sur Azure : Make sense of your (BIG) data !Elasticsearch sur Azure : Make sense of your (BIG) data !
Elasticsearch sur Azure : Make sense of your (BIG) data !
 
[JAM 1.2] Design & Multitasking (Andrew Solovey)
[JAM 1.2] Design & Multitasking (Andrew Solovey)[JAM 1.2] Design & Multitasking (Andrew Solovey)
[JAM 1.2] Design & Multitasking (Andrew Solovey)
 
JavaScript in 2015
JavaScript in 2015JavaScript in 2015
JavaScript in 2015
 
A.I. Exercise.
A.I. Exercise.A.I. Exercise.
A.I. Exercise.
 
An introduction to Ruby
An introduction to RubyAn introduction to Ruby
An introduction to Ruby
 
EclipseCon Europe 2013 - Turning Eclipse into an Arduino programming platform...
EclipseCon Europe 2013 - Turning Eclipse into an Arduino programming platform...EclipseCon Europe 2013 - Turning Eclipse into an Arduino programming platform...
EclipseCon Europe 2013 - Turning Eclipse into an Arduino programming platform...
 
Network programming
Network programmingNetwork programming
Network programming
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systems
 

Recently uploaded

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Recently uploaded (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 

Home Automation with Asterisk Using OpenHab

  • 1. Home Automation with Asterisk Alberto Sagredo Castro www.voipnovatos.es 10/14/2015
  • 2. Who i am • Alberto Sagredo Castro • a.k.a @albersag on twitter • Working in VoIP since ten years ago • Working with Asterisk for about 10 years • Several large projects with Asterisk and many Asterisk compiled thru Spain and Europe • Working for Avanzada 7 and USA VOIP • Other Stuff : Mikrotik, Ubiquiti, Ham Radio and all that contains bits on it 2
  • 3. Why home automation • It makes life easier • Its not expensive • It helps disabled people • Internet of Things (IOT) is here • Its not complex • Eco friendly and save money • Just play ! 3
  • 4. Home automation vs Asterisk 4 • Asterisk natively does not support home automation protocols • We need something to interact with ha (home automation) • What could we use? PHPARI, AGI, .call files, asterisk dialplan, SQL … • Any programmer here? What about chan_zwave :)
  • 5. Which protocol to use 5 • home automation is plenty of protocols, open, proprietary, half open half proprietary :) all flavours. • smarthings • z-wave • knx • insteon • x10 • zigbee • opensprinkler • MQTT
  • 6. Z-Wave 6 • Its a “propietary” protocol owned by Sigma Designs • Its widely supported by enterprise and really good compatibility • Its cheap (50 $/device) • USA & EU frecuencies • Feedback from device status • Low energy • Zwave alliance (+ 400 manufacturers) • Mesh network between devices. Good for homes
  • 7. 7
  • 8. Do not reinvent the wheel 8 • Ok. Asterisk does not support (yet) home automation but i want to use Asterisk in my home automation system…. What could i do? • I will use Asterisk to generate calls when events happens on my HA system and to interact with them by phone. • Phone is easier than using apps and works on any platform :)
  • 9. OpenHab 9 • Its the swedish knife (a.k.a Olle :) for home automation. • Lots of binding, plenty of protocols supported and many more • REST API • Items • Sitemaps • Scripts / Rules (Xtend scripting language) • Transforms • Interface to admin Habmin and App for design (Openhab Designer)
  • 10. OpenHab 10 • Its Java . • Runs on BananaPi or Raspberry Pi without any issues. • Easy to install. • Easy as Asterisk to configure. • Scripting language so you would feel confortable with it
  • 12. How to start 12 • We would need an USB Zwave Dongle (Aeon Labs, Zwave.me,…) • A Raspberry Pi or Banana Pi • Zwave devices • Asterisk of course • Internet for notifications and persistent data to the cloud
  • 14. Installing OpenHab 14 • If you use Debian install repos curl 'https://bintray.com/user/downloadSubjectPublicKey? username=openhab' | sudo apt-key add - echo "deb http://dl.bintray.com/openhab/apt-repo stable main" | sudo tee /etc/apt/sources.list.d/openhab.list sudo apt-get update sudo apt-get install openhab-runtime update-rc.d openhab defaults service openhab start
  • 15. Install Java & esential bindings 15 sudo tar zxvf jdk-8-ea-b36e-linux-arm-hflt-*.tar.gz -C /opt sudo update-alternatives --install "/usr/bin/java" "java" "/opt/ jdk1.8.0/bin/java" 1 sudo update-alternatives for other commands if needed (e.g. javac). java -version
  • 16. Install Java & esential bindings 16 sudo apt-get install openhab-addon-binding-samsungtv sudo apt-get install openhab-addon-binding-zwave sudo apt-get install openhab-addon-io-myopenhab sudo apt-get install openhab-addon-persistence-exec openhab-addon- persistence-logging sudo apt-get install openhab-addon-binding-opensprinkler sudo apt-get install openhab-addon-binding-http openhab-addon-binding-ntp sudo apt-get install openhab-addon-action-pushover sudo apt-get install openhab-addon-binding-asterisk
  • 17. Asterisk 17 Install Asterisk Enable manager (AMI) , http and ARI and Lets see how to integrate!
  • 18. Integration. Lets fun! 18 • Lets focus in how to integrate this cool “weapons” together. • We could use: • ARI • REST API • CLI • .call files • AstDB • MySQL • etc…..
  • 19. Dangerous Demo 1 19 • IVR to interact with Lights and if everything goes fine, open my garden sprinklers in spain remotely (dont be nasty) • WIFI SSID -> “VOIPNOVATOS” • Asterisk -> “10.0.2.x” • User Extension “20x” • Password : “astricon” of course • Call 666 and don't be evil!
  • 20. Dangerous Demo 1 20 • Asterisk Dialplan [astricon-ivr] exten => s,1,Noop exten => s,n,Background(welcomeivr) exten => s,n,WaitExten(10) exten => s,n,Hangup exten => 1,1,Noop(Turn on light) exten => 1,n,GotoIf($[${DB(light/astricon)} = "ON"]?lighton:lightoff) exten => 1,n(lighton),Set(${DB(light/astricon)="OFF"}) exten => 1,n,System(curl --header "Content-Type: text/plain" --request POST --data "OFF" http://10.0.2.2:8080/rest/items/Z_Socket1/) exten => 1,n,Playback(lightoff) exten => 1,n,Hangup exten => 1,n(lightoff),Set(${DB(light/astricon)="ON"}) exten => 1,n,System(curl --header "Content-Type: text/plain" --request POST --data "ON" http://10.0.2.2:8080/rest/items/Z_Socket1/) exten => 1,n,Playback(lighton) exten => 1,n,Hangup exten => 2,1,Noop(Fire Alarm) exten => 2,n,GotoIf($[${DB(alarm/astricon)} = "ON"]?fired:notfired) exten => 2,n(fired),Set(${DB(alarm/astricon)="OFF"}) exten => 2,n,System(curl --header "Content-Type: text/plain" --request POST --data "OFF" http://10.0.2.2:8080/rest/items/FortrezZ_Siren) exten => 2,n,Playback(thieves) exten => 2,n,Hangup exten => 2,n(notfired),Set(${DB(alarm/astricon)="ON"}) exten => 2,n,System(curl --header "Content-Type: text/plain" --request POST --data "ON" http://10.0.2.2:8080/rest/items/FortrezZ_Siren) exten => 2,n,Playback(nothieves) exten => 2,n,Hangup exten => 3,1,Noop(Sprinkler) exten => 3,n,GotoIf($[${DB(sprinkler/astricon)} = "ON"]?on:off) exten => 3,n(on),Set(${DB(sprinkler/astricon)="OFF"}) exten => 3,n,System(curl --header "Content-Type: text/plain" --request POST --data "OFF" http://10.0.2.2:8080/rest/items/Sprinklers_Zone4) exten => 3,n,Playback(closedsprinklers) exten => 3,n,Hangup exten => 3,n(off),Set(${DB(sprinkler/astricon)="ON"}) exten => 3,n,System(curl --header "Content-Type: text/plain" --request POST --data "ON" http://10.0.2.2:8080/rest/items/Sprinklers_Zone4) exten => 3,n,Playback(opensprinklers) exten => 3,n,Hangup
  • 21. Dangerous Demo 2 21 • For some people it could be great to interact using voice while in its home. Being at home or not, Asterisk could turn on lights, turn off alarm and make emergency calls • Use Google ASR, Its free and it works well! (Use latest agi version as oldest has issues) • You need internet connection! Hope astricon one would work well!
  • 22. Dangerous Demo 2 22 • Google ASR • Asterisk Speech Recognition http://zaf.github.io/asterisk- speech-recog/
  • 23. Dangerous Demo 2 23 • Asterisk Dialplan [astricon-asr] exten => s,1,Noop exten => s,n,Background(welcomeivr) exten => s,n,agi(speech-recog-tiny.agi,en-US) exten => s,n,Verbose(1,The text you just said is: ${utterance}) exten => s,n,Verbose(1,The probability to be right is: ${confidence}) exten => s,n,GotoIf($["${uterance}" = "fire alarm"]?firealarm) exten => s,n,GotoIf($["${uterance}" = "turn on"]?turnonlight:out) exten => s,n(firealarm),Goto(firealarm,1) exten => s,n,Hangup exten => s,n(turnonlight),Goto(turnonlight,1) exten => s,n(out),Hangup exten => turnonlight,1,Noop(Turn on light) exten => turnonlight,n,GotoIf($[${DB(light/astricon)} = "ON"]?lighton:lightoff) exten => turnonlight,n(lighton),Set(DB(light/astricon)="OFF") exten => turnonlight,n,System(curl --header "Content-Type: text/plain" --request POST --data "OFF" http://10.0.2.19:8080/rest/items/Z_Socket1/) exten => turnonlight,n,Playback(lightoff) exten => turnonlight,n,Hangup exten => turnonlight,n(lightoff),Set(DB(light/astricon)="ON") exten => turnonlight,n,System(curl --header "Content-Type: text/plain" --request POST --data "ON" http://10.0.2.19:8080/rest/items/Z_Socket1/) exten => turnonlight,n,Playback(lighton) exten => turnonlight,n,Hangup exten => firealarm,1,Noop(Fire Alarm) exten => firealarm,n,GotoIf($[${DB(alarm/astricon)} = "ON"]?fired:notfired) exten => firealarm,n(fired),Set(DB(alarm/astricon)="OFF") exten => firealarm,n,System(curl --header "Content-Type: text/plain" --request POST --data "OFF" http://10.0.2.19:8080/rest/items/FortrezZ_Siren) exten => firealarm,n,Playback(nothieves) exten => firealarm,n,Hangup exten => firealarm,n(notfired),Set(DB(alarm/astricon)="ON") exten => firealarm,n,System(curl --header "Content-Type: text/plain" --request POST --data "ON" http://10.0.2.19:8080/rest/items/FortrezZ_Siren) exten => firealarm,n,Playback(thieves) exten => firealarm,n,Hangup
  • 24. Dangerous Demo 3 24 • Smart followme • You can use Wifi to detect you are at home or presence detectors. • If you are outside home, divert your calls to cell phone. Just ring on Kitchens phone if you are cooking (Advise: this will not work if you have kids moving around) • Here we could use AGI to get motion status from Openhab.
  • 25. Dangerous Demo 3 25 • Asterisk Dialplan [astricon-presence] exten => s,1,Answer() exten => s,n,AGI(openhab.agi, "asterisk", "password", "Fibaro_Motion_1_Motion", "atHomeMotion") exten => s,n,AGI(openhab.agi, "asterisk", "password", "Home_Presence", "atHomeWifi") exten => s,n,GotoIf($["${atHomeMotion}" == "ON"]?athome) exten => s,n,GotoIf($["${atHomeWifi}" == "ON"]?athome:away) exten => s,n,Goto(bye) exten => s,n(athome),Playback(movementdetected) exten => s,n,Hangup() exten => s,n(away),Playback(movementnotdetected) exten => s,n(bye),Hangup() [astricon-presence2] exten => s,1,Answer() exten => s,n,GotoIf($["${PRESENCE}" == "ON"]?athome:away) exten => s,n(athome),Playback(movementdetected) exten => s,n,Hangup() exten => s,n(away),Playback(movementnotdetected) exten => s,n,Hangup()
  • 26. Dangerous Demo 3 26 • Openhab.agi #!/usr/bin/python import sys,os,datetime import httplib import base64 def send(data): sys.stdout.write("%s n"%data) sys.stdout.flush() AGIENV={} env = "" while(env != "n"): env = sys.stdin.readline() envdata = env.split(":") if len(envdata)==2: AGIENV[envdata[0].strip()]=envdata[1].strip() username = AGIENV['agi_arg_1'] password = AGIENV['agi_arg_2'] item = AGIENV['agi_arg_3'] varname = AGIENV['agi_arg_4'] auth = base64.encodestring('%s:%s' % (username, password)).replace('n', '') headers = {"Authorization" : "Basic %s" % auth} conn = httplib.HTTPConnection("localhost", 8080) conn.request('GET', "/rest/items/%s/state"%item, "", headers) response = conn.getresponse() item_state = response.read() send("SET VARIABLE %s %s"%(varname, item_state)) sys.stdin.readline()
  • 27. Dangerous Demo 3 27 • Openhab rules rule "MotionOn" when Item Fibaro_Motion_1_Motion changed from OFF to ON then counter = counter + 1 logInfo("Rules", "Motion Rule ON") executeCommandLine("/usr/src/openhab/configurations/rules/curlon.sh") pushover("Motion Detected on Astricon") end rule "MotionOff" when Time cron "0 */2 * * * ?" then if(lastCheck == counter) { counter = 0 lastCheck = -1; logInfo("Rules", "Motion Rule OFF") executeCommandLine("/usr/src/openhab/configurations/rules/curloff.sh") } else { lastCheck = counter } end
  • 28. Dangerous Demo 3 28 • Openhab rules var Timer timer = null rule "MotionOn2" when Item Fibaro_Door changed then if(Fibaro_Door.state==ON) { executeCommandLine("/etc/openhab/configurations/rules/curlondoor.sh") if(timer==null) { timer = createTimer(now.plusSeconds(10)) [| executeCommandLine("/etc/openhab/configurations/rules/curloffdoor.sh") ] } else { timer.reschedule(now.plusSeconds(10)) } } else if(Fibaro_Door.state==OFF) { if(timer!=null) { timer.cancel timer = null } } end
  • 29. Dangerous Demo 3 29 • Wifi Detector #!/bin/sh macalberto="f0:27:2d:00:44:12" athome=0 macs=$(iw dev wlan0 station dump | grep Station | cut -f 2 -s -d" ") for mac in $macs; do case $mac in "$macalberto") athome=1;; esac done if [ $athome -eq 1 ]; then curl --header "Content-Type: text/plain" --request POST --data "ON" http://10.0.2.19:8080/rest/items/Home_Presence/ else curl --header "Content-Type: text/plain" --request POST --data "OFF" http://10.0.2.19:8080/rest/items/Home_Presence/ fi • curlon.sh #!/bin/bash curl -v -u asterisk:asterisk -X POST "http://10.0.2.19:8088/ari/asterisk/variable?variable=PRESENCEvalue=ON&api_key=asterisk:asterisk"
  • 30. Dangerous Demo 4 30 • Create your own Alarm System controlled by phone • We could arm alarm system by phone • No monthly fees • If armed and motion is detected call police or call you before police that would be better :) • If fired, open sprinklers at garden.. • Used ARI to gen calls on Asterisk
  • 31. Dangerous Demo 4 31 • ari.conf [general] enabled = yes allowed_origins=http://ari.asterisk.org [asterisk] type = user read_only = no password = asterisk • http.conf [general] enabled = yes bindaddr=0.0.0.0 • manager.conf[general] enabled = yes ;webenabled = yes port = 5038 bindaddr = 127.0.0.1 [asterisk] secret = asterisk read = system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan write = system,call,agent,user,config,command,reporting,originate,message
  • 32. Dangerous Demo 4 32 • extensions.conf [extensiones] exten => _2XX,1,Dial(SIP/${EXTEN},20,TtrR) exten => _2XX,n,hangup exten => 900,1,Answer exten => 900,n,Playback(policecall) exten => 900,n,Ringing() exten => 900,n,Wait(10) exten => 900,n,Hangup • alarmon.sh #!/bin/bash curl -v -u asterisk:asterisk -X POST "http://10.0.2.19:8088/ari/asterisk/variable?variable=ALARM&value=ON&api_key=asterisk:asterisk" curl -v -u asterisk:asterisk -X POST "http://10.0.2.19:8088/ari/channels?endpoint=SIP %2F201&extension=900&context=extensiones&priority=1&callerId=ALARM%20DETECTED%20ASTRICON&timeout=30&api_key=asterisk:asterisk"
  • 33. Dangerous Demo 4 33 • Openhab rules rule "Alarm" when Item Fibaro_Door changed from OFF to ON then if(Fibaro_Door.state == ON && Alarm_Switch.state == ON ) { logInfo("Rules", "Alarm Alarm Alarm") executeCommandLine("/etc/openhab/configurations/rules/alarmon.sh") pushover("Alarm on Astricon") } end rule "Water" when Item Fibaro_Flood changed then if(Fibaro_Flood.state == 255 && Alarm_Switch.state == ON ) { logInfo("Rules", "Alarm Alarm Alarm") executeCommandLine("/etc/openhab/configurations/rules/alarmon.sh") pushover("Alarm on Astricon") } end
  • 34. Bonus Demo 34 • Asterisk Ringing Status and Called/Calling Number • We have an openhab binding but it does not work with new AMI • Using JSON answer from Asterisk ARI and jq , json parser will try to get this working.
  • 35. Bonus Demo 35 • extensions.conf [extensiones] exten => 999,1,Set(${CALLERID(num)}=778811) exten => 999,n,System(curl --header "Content-Type: text/plain" --request POST --data "ON" http://10.0.2.19:8080/rest/items/Asterisk_Ring) exten => 999,n,Ringing() exten => 999,n,Wait(10) exten => 999,n,Answer() exten => 999,n,Echo() exten => 999,n,Hangup exten => h,1,System(curl --header "Content-Type: text/plain" --request POST --data "OFF" http://10.0.2.19:8080/rest/items/Asterisk_Ring) • call.sh #!/bin/bash json_clause=$(curl http://10.0.2.19:8088/ari/channels?api_key=asterisk:asterisk) state=$(echo $json_clause | jq '.[0].state') name=$(echo $json_clause | jq '.[0].name') numbercalling=$(echo $json_clause | jq '.[0].caller.number') numbercalled=$(echo $json_clause | jq '.[0].dialplan.exten') numbercalled2=$(echo $json_clause | jq '.[0].connected.number') curl --header 'Content-Type: text/plain' --request PUT --data "$numbercalling" http://localhost:8080/rest/items/Active_Calling/state/ curl --header 'Content-Type: text/plain' --request PUT --data "$numbercalled" http://localhost:8080/rest/items/Active_Called/state/
  • 36. Bonus Demo 36 • Openhab rules rule "Call" when Item Asterisk_Ring changed then if(Asterisk_Ring.state == ON) { executeCommandLine("bash /etc/openhab/configurations/rules/call.sh") } if(Asterisk_Ring.state == OFF) { executeCommandLine(" bash /etc/openhab/configurations/rules/calloff.sh") } end
  • 38. Resources 38 • www.openhab.org • https://github.com/openhab/openhab/wiki/Samples-Rules • https://github.com/openhab/openhab/wiki/Explanation-of-items • https://github.com/openhab/openhab/wiki/Linux---OS-X • http://raspberrypi.stackexchange.com/questions/4683/how-to-install-the-java- jdk-on-raspberry-pi • http://zaf.github.io/asterisk-speech-recog/ • http://tinsley.io/2015/03/openhab-presence-detection-with-dd-wrt/
  • 39. Thanks 39 • To my wife and kids they are always with me and also here (Disney off course :) • All friends wishing luck these days • To Fibaro • To Digium for inviting me. It has been a pleasure and an amazing christmas gift! • To all of you for attending!