Re: domotisation d une sonnette
Publié : 10 mai 2020, 08:23
Merci pour cette solution
Peux tu me faire un schéma ?
Peux tu me faire un schéma ?
Reprenez le contrôle de votre domotique
https://easydomoticz.com/forum/
NonAs tu trouvé une solution pour faire sonner ton téléphone ?
Code : Tout sélectionner
return {
logging = { level =
--domoticz.LOG_ERROR, --select one to override system log level normal = LOG_ERROR
--domoticz.LOG_DEBUG,
--domoticz.LOG_INFO,
--domoticz.LOG_ERROR,
domoticz.LOG_FORCE
},
on = { devices = {1082}
},
execute = function(dz, item)
_G.logMarker = dz.moduleLabel -- set logmarker to scriptname
--local LOG_LEVEL = dz.LOG_INFO -- normal = LOG_INFO
--local LOG_LEVEL = dz.LOG_DEBUG
--local LOG_LEVEL = dz.LOG_ERROR
local LOG_LEVEL = dz.LOG_FORCE
dz.log('DRIIIING...', dz.LOG_FORCE)
local function Blink(deviceId)
-- blink a device based on time on and time off
dz.devices(deviceId).cancelQueuedCommands()
local blinkDurations= {2, 1, 2, 1, 2, 1}
local duration=0
local boolOn=true
for key, id in ipairs(blinkDurations) do
--print(duration)
if boolOn then
dz.devices(deviceId).switchOn().afterSec(duration)
boolOn=false
else
dz.devices(deviceId).switchOff().afterSec(duration)
boolOn=true
end
duration=duration+blinkDurations[key]
end
return
end
Blink(940)puis tu t enregistre sur CallMeBot, , tu valides dans telegram sur ton telephoneet après il ne te reste plus qu a rentrer l URL dans ton selector domoticz sur " action du sélecteur " et le tour est jouéL'utilisateur +336XXXXXXXX ne figure pas dans la liste blanche. Vérification de l'autorisation ...
Autorisation pour le téléphone +336XXXXXXXX introuvable.
Attention! Utilisateur non autorisé. Cliquez ici pour autoriser CallMeBot à vous contacter.
merci je vais le mettre en oeuvre.moyen très simple pour faire sonner ton téléphone avec TEGEGRAM