Page 3 sur 3

Re: Alarme gateway

Publié : 16 nov. 2017, 18:13
par Wolfen38
On avance encore.

Donc ca démarre quand je veux et pour le temps que je veux, ca s’arrête si j'utilise mon switch xiaomi, me reste le problème du son jouer, j'ai téléchargé sur le gateway le son d'un des forumeurs, mais je n'arrive pas à l’utiliser dans domoticz, je ne le trouve pas dans la liste....

Re: Alarme gateway

Publié : 16 nov. 2017, 18:25
par landaisbenj
A la par contre je peux pas t'aider. Je n'ai pas encore essayé les sons.

Re: Alarme gateway

Publié : 16 nov. 2017, 18:27
par Wolfen38
Je suis déjà bien content du résultat, mais les sons par défaut jouent 7 sec, du coup y a beaucoup de coupure dans la sirène, c'est pas super.

Re: Alarme gateway

Publié : 16 nov. 2017, 18:44
par landaisbenj
j'avou c'est pas terrible. Relance le son toutes les 5 secondes peut etre...

Sinon tu branche le raspberry sur une petite enceinte et tu passe par le son du raspberry... ce sera encore plus simple

Re: Alarme gateway

Publié : 20 déc. 2018, 16:28
par plouf34
Wolfen38 a écrit : 16 nov. 2017, 18:27 Je suis déjà bien content du résultat, mais les sons par défaut jouent 7 sec, du coup y a beaucoup de coupure dans la sirène, c'est pas super.
Bonjour,
Je me lance dans la meme, a savoir faire sonner ma Gateway sur déclenchement.
Tu peux partager ton Lua ou Blocky?

Merci d'avance.

Re: Alarme gateway

Publié : 20 déc. 2018, 16:36
par Wolfen38
Le son de mon gateway étant mort j'ai mis une sirène sur prise connectée maintenant ça pulse

Envoyé de mon Mi A1 en utilisant Tapatalk


Re: Alarme gateway

Publié : 20 déc. 2018, 18:40
par Wolfen38
plouf34 a écrit : 20 déc. 2018, 16:28
Wolfen38 a écrit : 16 nov. 2017, 18:27 Je suis déjà bien content du résultat, mais les sons par défaut jouent 7 sec, du coup y a beaucoup de coupure dans la sirène, c'est pas super.
Bonjour,
Je me lance dans la meme, a savoir faire sonner ma Gateway sur déclenchement.
Tu peux partager ton Lua ou Blocky?

Merci d'avance.
J'ai 3 scripts.

1 : Pour activer/désactiver l'alarme

Code : Tout sélectionner

if (devicechanged['Interrupteur alarme'] == 'Double Click' and otherdevices['Virtuel alarme'] == 'Off') then
    commandArray['Virtuel alarme']='On AFTER 60'
	print("Virtuel alarme ON AFTER 60")
	commandArray['Scene:Notification alarme']='On'
	commandArray['Notification alarme']='On'
	commandArray['Interrupteur alarme']='Off'
	print("Inter alarme OFF")
	commandArray[#commandArray+1] = {['SendNotification'] = 'Alarme # Alarme activée #0###pushover'}
		
	else
	if (devicechanged['Interrupteur alarme'] == 'Double Click' and otherdevices['Virtuel alarme'] == 'On') then
		commandArray['Interrupteur alarme']='Off'
		commandArray['Virtuel alarme']='Off'
		commandArray['Scene:Notification alarme']='On'
		commandArray['Notification alarme']='Off'
		commandArray['Group:Alarme']='Off'
		commandArray['Prise Xiaomi connecté']='Off'
		commandArray[#commandArray+1] = {['SendNotification'] = 'Alarme # Alarme coupée #0###pushover'}
		end
	
end
2 : Pour faire sonner en cas d'intrusion

Code : Tout sélectionner

if (devicechanged['Sensor entrée'] == 'Open' and otherdevices['Virtuel alarme'] == 'On') then
    commandArray['Group:Alarme']='On'
	end
	
if (devicechanged['Sensor cuisine'] == 'Open' and otherdevices['Virtuel alarme'] == 'On') then
    commandArray['Group:Alarme']='On'
	end
	
if (devicechanged['Sensor salon 1'] == 'Open' and otherdevices['Virtuel alarme'] == 'On') then
    commandArray['Group:Alarme']='On'
	end
	
if (devicechanged['Sensor salon 2'] == 'Open' and otherdevices['Virtuel alarme'] == 'On') then
    commandArray['Group:Alarme']='On'
	end
3 : Pour recevoir une notif en cas d'intrusion

Code : Tout sélectionner

if (devicechanged['Sensor entrée'] == 'Open' and otherdevices['Virtuel alarme'] == 'On') then
    commandArray[#commandArray+1] = {['SendNotification'] = 'Alarme entrée # Intrusion entrée #0###pushover'}
	commandArray['Notification alarme 2']='On FOR 1'
	else
	if (devicechanged['Sensor porte cuisine'] == 'Open' and otherdevices['Virtuel alarme'] == 'On') then
    commandArray[#commandArray+1] = {['SendNotification'] = 'Alarme cuisine # Intrusion cuisine #0###pushover'}
	commandArray['Notification alarme 2']='On FOR 1'
	else
	if (devicechanged['Sensor salon 1'] == 'Open' and otherdevices['Virtuel alarme'] == 'On') then
    commandArray[#commandArray+1] = {['SendNotification'] = 'Alarme salon1 # Intrusion salon #0###pushover'}
	commandArray['Notification alarme 2']='On FOR 1'
	else
	if (devicechanged['Sensor salon 2'] == 'Open' and otherdevices['Virtuel alarme'] == 'On') then
    commandArray[#commandArray+1] = {['SendNotification'] = 'Alarme salon2 # Intrusion salon #0###pushover'}
	commandArray['Notification alarme 2']='On FOR 1'
	end
	end
	end
	
end
end