dnpwwo / Domoticz-Google-Plugin

MIT License
40 stars 10 forks source link

speak example #8

Open edwindarter opened 5 years ago

edwindarter commented 5 years ago

can you please set an example how to let my googlehome speak "main light is on" when i turn it on. in domoticz thanks

dnpwwo commented 5 years ago

From a Lua event?

Would be something like:

    commandArray = {}
    for deviceName,deviceValue in pairs(devicechanged) do
        if (deviceName=='Main Light') then
            commandArray['googlehome'] = "SendNotification main light is on"
        end
    end
Gerard-Oedzes commented 4 years ago

is this also working with dzvents? and can you gife me an exemple?

thnx!

pcfreak1 commented 4 years ago

would like to know how to do this with dzvents also

frankdpGH commented 3 years ago

Hi saw your question here : Since gtts 2.2.1 the notifications are working correctly (within 2 seconds). (install with : sudo pip3 install gtts==2.2.1) Script commands when using dzVents : domoticz.notify(subject, message [,priority][,sound][,extra],"Google_Devices",domoticz.NSS_GOOGLE_DEVICES) e.g. domoticz.notify("","Hello","","","","Google_Devices",domoticz.NSS_GOOGLE_DEVICES) or domoticz.sendCommand("SendNotification", "#Hello####Google_Devices",domoticz.NSS_GOOGLE_DEVICES)