dzvents and ifttt [Solved]
Moderator: leecollings
-
- Posts: 82
- Joined: Saturday 13 December 2014 21:20
- Target OS: Linux
- Domoticz version:
- Contact:
dzvents and ifttt
couldnt find it back in the docs:
via LUA you can do a command array which executes a webhook in ifttt via "triggerifttt"
Does something similar exists fir dvents?
via LUA you can do a command array which executes a webhook in ifttt via "triggerifttt"
Does something similar exists fir dvents?
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: dzvents and ifttt
(as adviced by Danny) IFTTT not implemented yet in native dzVents domoticz.notify but can be triggered using domoticz.sendCommand if you defined and activated IFTTT in settings -> notifications
Code: Select all
return {
on = { devices = { "domoticz Triggerdevice" } },
execute = function(domoticz, device)
eventName = "IFTTT triggername"
value1 = "test1"
value2 = "test2"
value3 = "test3"
domoticz.sendCommand("TriggerIFTTT", eventName .. "#" .. value1 .. "#" .. value2 .. "#" .. value3 )
end
}
Last edited by waaren on Tuesday 27 February 2018 21:17, edited 1 time in total.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 82
- Joined: Saturday 13 December 2014 21:20
- Target OS: Linux
- Domoticz version:
- Contact:
Re: dzvents and ifttt
Cool, thxwaaren wrote:IFTTT not implemented yet in native dzVents domoticz.notify but can be triggered using domoticz.sendCommand if you defined and activated IFTTT in settings -> notifications
Code: Select all
return { on = { devices = { "domoticz Triggerdevice" } }, execute = function(domoticz, device) eventName = "IFTTT triggername" value1 = "test1" value2 = "test2" value3 = "test3" domoticz.sendCommand("TriggerIFTTT", eventName .. "#" .. value1 .. "#" .. value2 .. "#" .. value3 ) end }
Verzonden vanaf mijn iPad met Tapatalk
- DewGew
- Posts: 581
- Joined: Thursday 21 April 2016 12:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: V4.10618
- Location: Sweden
- Contact:
Re: dzvents and ifttt
I do like this:
I added this code to my 'global_data.lua'
Now I can call send ifttt notification from all my dzVents script with:
I added this code to my 'global_data.lua'
Code: Select all
return {
helpers = {
-- Send IFTTT Notification
iftttNotify = function(domoticz, subject, body)
eventName = 'Domoticz'
prefix = 'Domoticz:'
domoticz.sendCommand("TriggerIFTTT", eventName .. "#" .. prefix .. "#" .. subject .. "#" .. body )
end
}
}
Code: Select all
domoticz.helpers.iftttNotify(domoticz, 'subject text here', 'body text here')
Raspberry Pi 3 | domoticz | Aeon Labs Z-Stick GEN5 | RFlink gateway
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
NanoPi NEO-air | REGO6XX interface | Machinon theme | Homebridge | Domoticz Google Assistant | ideAlarm
-
- Posts: 822
- Joined: Wednesday 12 November 2014 15:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest b
- Contact:
Re: dzvents and ifttt
To use the notification in IFTTT, what service / applet do i have to install in IFTTT.
Is it possible to let my google home speak with this for example?
Is it possible to let my google home speak with this for example?
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Jablotron connection, Ikea
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: dzvents and ifttt
triggerIFTTT is a native dzVents command in dzVents >= 2.4.18
It will call an IFTTT maker event (webhook)
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 822
- Joined: Wednesday 12 November 2014 15:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest b
- Contact:
Re: dzvents and ifttt
ok, thats great!
And the other script, what is the purpose of sending a notification to ifttt, which service/applet is reacting on this notification?
And the other script, what is the purpose of sending a notification to ifttt, which service/applet is reacting on this notification?
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Jablotron connection, Ikea
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: dzvents and ifttt
the triggerIFTTT takes care of the If This part
the Then That part can be any IFTTT action service (there are thousands). I use mail, pushover, Hue, SmartLife to name a few.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 822
- Joined: Wednesday 12 November 2014 15:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest b
- Contact:
Re: dzvents and ifttt
Clear, i also use IFTTT to manage my domoticz devices via my rpi google home...
But to make things work you have to make an applet with a If (service) and a then (service).
In my case i use google home for the IF and often WEBHOOKS for the THEN.
How do i call the THEN service (with the IFTTT domoticz routine, i dont see a ID, the applets have an Applet version ID 100306821. i dont see such an ID for the for THEN services....
I tried..
do you have a working example ?
can i call for example the webhook service with the domoticz call?
url https://x:[email protected]:1880/t
method post
content/type application/json
body {"command": "switchlight", "idx": 1002, "switchcmd": "On"}
But to make things work you have to make an applet with a If (service) and a then (service).
In my case i use google home for the IF and often WEBHOOKS for the THEN.
How do i call the THEN service (with the IFTTT domoticz routine, i dont see a ID, the applets have an Applet version ID 100306821. i dont see such an ID for the for THEN services....
I tried..
do you have a working example ?
Code: Select all
return {
on = {
devices = {
'testifttt'
}
},
execute = function(domoticz, device)
domoticz.log('Device ' .. device.name .. ' was changed', domoticz.LOG_INFO)
eventName = "Play a Sonos favorite with Google Assistant"
value1 = "Natural"
value2 = "Studeerkamer"
value3 = "this room only"
domoticz.sendCommand("TriggerIFTTT", eventName .. "#" .. value1 .. "#" .. value2 .. "#" .. value3 )
end
}
url https://x:[email protected]:1880/t
method post
content/type application/json
body {"command": "switchlight", "idx": 1002, "switchcmd": "On"}
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Jablotron connection, Ikea
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: dzvents and ifttt
The domoticz IFTTT (dzVents triggerIFTTT) does the IF part. The THAT part is on the 'other' site. The name of the maker event is the trigger for IFTTT
from the wiki:
triggerIFTTT(makerName [,sValue1, sValue2, sValue3]): Function. 2.4.18 Have Domoticz 'call' an IFTTT maker event. makerName is required, 0-3 sValue's are optional. Supports command options.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 822
- Joined: Wednesday 12 November 2014 15:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest b
- Contact:
Re: dzvents and ifttt [Solved]
finally got it working....
made a test_event with webhooks as IF and webhooks as THEN.
called the name of the applet and my light goes on....
Would be great if you can have more IF's and then response and then ACTION. In this way i can trigger my device from google home and by IFTTT domoticz with the same reaction via google home... and do the same action
but for now ok! thanks waaren!
made a test_event with webhooks as IF and webhooks as THEN.
called the name of the applet and my light goes on....
Would be great if you can have more IF's and then response and then ACTION. In this way i can trigger my device from google home and by IFTTT domoticz with the same reaction via google home... and do the same action
but for now ok! thanks waaren!
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Jablotron connection, Ikea
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: dzvents and ifttt
Great !
You might want to have a look at thisWould be great if you can have more IF's and then response and then ACTION. In this way i can trigger my device from google home and by IFTTT domoticz with the same reaction via google home... and do the same action
Adding multiple devices to IFTTT
A PHP script is available that makes it easier to have all of your devices on IFTTT while only requiring you to create two IFTTT applets.
You can read more about it and download here: https://github.com/dswinton/domo-ifttt
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 822
- Joined: Wednesday 12 November 2014 15:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest b
- Contact:
Re: dzvents and ifttt
true!
I had that installed in previous/older installations!
i switched from http get commands to post with json bodies, and node-red and mqtt
Dont think i can combine it... domo-ifttt uses devices-names and select id's with it...
I think that is hard to do with node-red and mqtt
I had that installed in previous/older installations!
i switched from http get commands to post with json bodies, and node-red and mqtt
Dont think i can combine it... domo-ifttt uses devices-names and select id's with it...
I think that is hard to do with node-red and mqtt
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Jablotron connection, Ikea
Who is online
Users browsing this forum: No registered users and 1 guest