Hi, does anyone know how to make imperihome chime when the door is opened, I know how to send speech to the android device but not to trigger a sound file? Thanks in advance.
Interesting…
Maybe tasker & autovera?
the imperihome api has POST /sound/phone/{type}, you can do notification, ringtone, or alert, which works from the api documentation screen http://ip:port/api/rest/help/, but I cannot seem to get it to work anywhere else?
To get it working just use the following lua code in a scene:
local url = require(“socket.url”)
local socket = require(“socket”)
local http = require(“socket.http”)
http.TIMEOUT = 5
–
– Execute the resulting URL
local status, statusMsg = http.request{
url = “http://xxx.xxx.xxx.xxx:8080/api/rest/sound/phone/alert?duration=2&volume=100”,
method = “POST”,
}
Just change the red text to your Imperihome IP and sound location or type.
Examples of urls are:
http://xxx.xxx.xxx.xxx:8080/api/rest/sound/phone/alert?duration=2&volume=100
http://xxx.xxx.xxx.xxx:8080/api/rest/sound/phone/ringtone?duration=2&volume=100
You can also play mp3’s from an online resource just change the url to the location of the mp3 file.
I don’t understand, I have managed to get the sound file to play from the API section but how do I add this into a scene?
Thanks