Aller au contenu

Détection de présence avec la Freebox


Lazer

Messages recommandés

Tu as essayer de forcer le changement de valeur de la variable globale pour voir si ça revient ensuite ?

 

Sinon pour débugger le script LUA, il faudrait mettre des fibaro:debug() partout pour voir ce qui se passe ligne par ligne

Lien vers le commentaire
Partager sur d’autres sites

Bonsoir,

 

Bon j'ai essayé de placer des fibaro:debug() à droite à gauche, mais au préalable j'ai re Réglé l'heure de la hc2 ( decallage de 5 min ) donc Ohh K'Zouuuu ....

 --[[
%% autostart
%% properties
%% globals
FbxV6_LAN_Alex
PresenceAlex
--]]
fibaro:debug('1 - ligne 9')
function Check()

	local delay = 1800
	local timestamp = os.time()
	local FbxV6_LAN_Alex = tonumber(fibaro:getGlobalValue("FbxV6_LAN_Alex"))
	local PresenceAlex = fibaro:getGlobalValue("PresenceAlex")
  
	if FbxV6_LAN_Alex < timestamp - delay then
		if PresenceAlex == "1" then
			fibaro:debug(os.date('%d/%m/%Y').." : Absence détectée")
			fibaro:setGlobal("PresenceAlex", "0")
	end
    fibaro:debug(os.date('%d/%m/%Y').." : 2 - ligne 21")
	else
		if PresenceAlex == "0" then
			fibaro:debug(os.date('%d/%m/%Y').." : Présence détectée")
			fibaro:setGlobal("PresenceAlex", "1")
		end
    fibaro:debug(os.date('%d/%m/%Y').." : 3 - ligne 27")
	end
end

local trigger = fibaro:getSourceTrigger()

if trigger["type"] == "autostart" then
	fibaro:debug(os.date('%d/%m/%Y').." : Autostart infinite loop...")
	while true do
		Check()
		fibaro:sleep(60*1000) -- 1 minutes
	end
  fibaro:debug('4 - ligne 38')
elseif trigger["type"] == "global" then
	fibaro:debug("Global variable change : "..trigger['name'])
	Check()
elseif trigger["type"] == "other" then
	fibaro:debug(os.date('%d/%m/%Y').." : Started manually")
	Check()
elseif trigger["type"] == "property" then
	fibaro:debug(os.date('%d/%m/%Y').." : Property changed : ".. trigger['deviceID'].." => "..trigger['propertyName'])
else
	fibaro:debug(os.date('%d/%m/%Y').." : Unknown trigger : "..trigger["type"])
end
fibaro:debug('5 - ligne 50')

 

voila le résultat du débug :

 


[DEBUG] 13:22:49: 1 - ligne 9
[DEBUG] 13:22:49: 06/07/2017 : Autostart infinite loop...
[DEBUG] 13:22:49: 06/07/2017 : 2 - ligne 21
[DEBUG] 13:23:50: 06/07/2017 : 2 - ligne 21
[DEBUG] 13:24:50: 06/07/2017 : 2 - ligne 21

>>>>>>>> Idem du reply 2 - ligne 21 ......

[DEBUG] 15:02:09: 06/07/2017 : 2 - ligne 21
[DEBUG] 15:03:09: 06/07/2017 : 2 - ligne 21
[DEBUG] 15:04:09: 06/07/2017 : 2 - ligne 21
[DEBUG] 15:05:07: 1 - ligne 9
[DEBUG] 15:05:07: Global variable change : FbxV6_LAN_Alex
[DEBUG] 15:05:07: 06/07/2017 : 2 - ligne 21
[DEBUG] 15:05:07: 5 - ligne 50
[DEBUG] 15:05:08: 1 - ligne 9
[DEBUG] 15:05:08: Global variable change : FbxV6_LAN_Saki
[DEBUG] 15:05:08: 06/07/2017 : 2 - ligne 21
[DEBUG] 15:05:08: 5 - ligne 50
[DEBUG] 15:05:09: 06/07/2017 : 2 - ligne 21
[DEBUG] 15:06:09: 06/07/2017 : 2 - ligne 21
[DEBUG] 15:07:09: 06/07/2017 : 2 - ligne 21
[DEBUG] 15:08:09: 06/07/2017 : 2 - ligne 21

>>>>>>>> Idem du reply 2 - ligne 21 ......

[DEBUG] 20:29:13: 06/07/2017 : 2 - ligne 21
[DEBUG] 20:30:13: 06/07/2017 : 2 - ligne 21
[DEBUG] 20:31:13: 06/07/2017 : 2 - ligne 21

Bon j'ai coupé les moments chiants comme dans une mauvaise série ......

 

Pour info personne à la maison à 15h05 , ma femme est rentrée vers 16h00 ( enfin ..... j'espère loool :P )

et moi je suis parti au taf vers 13h30 et retour vers 17h30 .....

 

Que " Global variable change : FbxV6_LAN_Alex  " arrive seul c'est déjà bizzzzzare mais  moins  que de voir : " Global variable change : FbxV6_LAN_Saki "

Pourquoi la scène pioche cette variable ?

 

 

Lien vers le commentaire
Partager sur d’autres sites

vous recrutez dans ta boite ? Parce que c'est juste l'horaire idéal ça :D
 

Je me demande si le problème ne vient pas de ton VD Freebox, tu rafraichis tous les combien ? Comme si il détectait le changement de variable 1h30 après que tu sois parti.

Lien vers le commentaire
Partager sur d’autres sites

lol  je connais bien le patron il a des pb de domotique avec sa freebox depuis qu'il a changé de mobile ......

 

Dans le VD freebox j'ai :

 

if not FreeboxObject then FreeboxObject = {
  _userId = 2,-- User ID used for notifications
  _polling = 17280,-- Polling time (value in seconds)

loool heuuu c'est énorme lol j'ai vue que c'est 300 par défaut ..... à réduire plus bas  ? 

 

du coup je vais réinstaller ta version O complet ...

Lien vers le commentaire
Partager sur d’autres sites

@Nicode menuiserie plus précisément dans l'agencement de magasin  .... genre centre optique / Auditif / médical et sous-traitance d'usinage CNC .

 

Bon J'ai tout Ré-installé ( polling à 30sec ) mais ma variable PresenceAlex ne bouge pas ... surement la modif de la scène qui merde.

 

 

 

Lien vers le commentaire
Partager sur d’autres sites

préjugé  :P !!!!  y'a de +en+ d'informatique sur les machines avec les centres d'usinage ... bon c'est clair c'est pas du lua ... j'suis quand même beaucoup plus à l'aise avec Autocad :D

 

La seule modif dans la scène originale c'est que j'utilise un seul Tél contre 2 dans la celle de @Lazer et j'ai adopter la même correction que @fredoold validé par le chef lui même

 

Le 24/02/2017 à 20:43, Lazer a dit :

@Nico pour la version Syno il faudra que tu t'y colles, aucun intérêt pour moi et puis je n'ai pas de routeur Syno pour tester.

 

@fredoold avec le "=" tu n'as quasiment aucune chance que ça fonctionne, ça serait un gros coup de chance que la boucle de la scène passe à la seconde près sur le timestamp de dernière détection du smartphone.

 

J'aurais donc plutôt écris cela ainsi :


	if FbxV6_LAN_iPhone < timestamp - delay then

 

 

vais  chercher un plan B avec du bluetooth ou tasker ..?... 

Lien vers le commentaire
Partager sur d’autres sites

 

Merci Lazer,

 

voici donc la Scéne avec les debug placé  à tout va

--[[
%% autostart
%% properties
%% globals
FbxV6_LAN_Alex
PresenceAlex
--]]
fibaro:debug(os.date('%d/%m/%Y').." : Etape 1 - ligne 21")
function Check()

	local delay = 1800
	local timestamp = os.time()
	local FbxV6_LAN_Alex = tonumber(fibaro:getGlobalValue("FbxV6_LAN_Alex"))
	local PresenceAlex = fibaro:getGlobalValue("PresenceAlex")
  fibaro:debug(os.date('%d/%m/%Y').." : 2 - ligne 15")  
	if FbxV6_LAN_Alex < timestamp - delay then
		if PresenceAlex == "1" then
			fibaro:debug(os.date('%d/%m/%Y').." : Absence détectée")
			fibaro:setGlobal("PresenceAlex", "0")
	end
    fibaro:debug(os.date('%d/%m/%Y').." : 3 - ligne 21")
	else
		if PresenceAlex == "0" then
			fibaro:debug(os.date('%d/%m/%Y').." : Présence détectée")
			fibaro:setGlobal("PresenceAlex", "1")
      fibaro:debug(os.date('%d/%m/%Y').." : 4 - ligne 26")
		end
	end
end
fibaro:debug(os.date('%d/%m/%Y').." : 5 - ligne 30")
local trigger = fibaro:getSourceTrigger()
fibaro:debug(os.date('%d/%m/%Y').." : 6 - ligne 31")
if trigger["type"] == "autostart" then
	fibaro:debug(os.date('%d/%m/%Y').." : Autostart infinite loop...")
	while true do
		Check()
		fibaro:sleep(60*1000) -- 1 minutes
    fibaro:debug(os.date('%d/%m/%Y').." : 7 - ligne 38")
	end
  fibaro:debug('4 - ligne 38')
elseif trigger["type"] == "global" then
	fibaro:debug("Global variable change : "..trigger['name'])
	Check()
  fibaro:debug(os.date('%d/%m/%Y').." : 8 - ligne 45")
elseif trigger["type"] == "other" then
	fibaro:debug(os.date('%d/%m/%Y').." : Started manually")
	Check()
  fibaro:debug(os.date('%d/%m/%Y').." : 9 - ligne 48")
  
elseif trigger["type"] == "property" then
	fibaro:debug(os.date('%d/%m/%Y').." : Property changed : ".. trigger['deviceID'].." => "..trigger['propertyName'])
else
  fibaro:debug(os.date('%d/%m/%Y').." : 10 - ligne 53")
	fibaro:debug(os.date('%d/%m/%Y').." : Unknown trigger : "..trigger["type"])
end
fibaro:debug(os.date('%d/%m/%Y').." : 11 - ligne 56")

 

Voici les étapes avec réalisées :

 

  • 9H42 - Désactivation du wifi sur le Tel
  • 9H44 - Disparition du tel sur freebox OS
  • 9h50 - Activation du Wifi sur le Tél
  • 9H50 - Apparition instantanée du tel sur freebox OS

 

Voici le Débug :

 

[DEBUG] 09:41:50: 08/07/2017 : Etape 1 - ligne 21
[DEBUG] 09:41:50: 08/07/2017 : 5 - ligne 30
[DEBUG] 09:41:50: 08/07/2017 : 6 - ligne 31
[DEBUG] 09:41:50: 08/07/2017 : Autostart infinite loop...
[DEBUG] 09:41:50: 08/07/2017 : 2 - ligne 15
[DEBUG] 09:42:17: 08/07/2017 : Etape 1 - ligne 21
[DEBUG] 09:42:17: 08/07/2017 : 5 - ligne 30
[DEBUG] 09:42:17: 08/07/2017 : 6 - ligne 31
[DEBUG] 09:42:17: Global variable change : FbxV6_LAN_Alex
[DEBUG] 09:42:17: 08/07/2017 : 2 - ligne 15
[DEBUG] 09:42:17: 08/07/2017 : 8 - ligne 45
[DEBUG] 09:42:17: 08/07/2017 : 11 - ligne 56
[DEBUG] 09:42:50: 08/07/2017 : 7 - ligne 38
[DEBUG] 09:42:50: 08/07/2017 : 2 - ligne 15
[DEBUG] 09:43:02: 08/07/2017 : Etape 1 - ligne 21
[DEBUG] 09:43:02: 08/07/2017 : 5 - ligne 30
[DEBUG] 09:43:02: 08/07/2017 : 6 - ligne 31
[DEBUG] 09:43:02: Global variable change : FbxV6_LAN_Alex
[DEBUG] 09:43:02: 08/07/2017 : 2 - ligne 15
[DEBUG] 09:43:02: 08/07/2017 : 8 - ligne 45
[DEBUG] 09:43:02: 08/07/2017 : 11 - ligne 56
[DEBUG] 09:43:50: 08/07/2017 : 7 - ligne 38
[DEBUG] 09:43:51: 08/07/2017 : 2 - ligne 15
[DEBUG] 09:44:51: 08/07/2017 : 7 - ligne 38
[DEBUG] 09:44:51: 08/07/2017 : 2 - ligne 15
[DEBUG] 09:45:51: 08/07/2017 : 7 - ligne 38
[DEBUG] 09:45:51: 08/07/2017 : 2 - ligne 15
[DEBUG] 09:46:51: 08/07/2017 : 7 - ligne 38
[DEBUG] 09:46:51: 08/07/2017 : 2 - ligne 15
[DEBUG] 09:47:51: 08/07/2017 : 7 - ligne 38
[DEBUG] 09:47:51: 08/07/2017 : 2 - ligne 15
[DEBUG] 09:48:51: 08/07/2017 : 7 - ligne 38
[DEBUG] 09:48:51: 08/07/2017 : 2 - ligne 15
[DEBUG] 09:49:51: 08/07/2017 : 7 - ligne 38
[DEBUG] 09:49:51: 08/07/2017 : 2 - ligne 15
[DEBUG] 09:50:51: 08/07/2017 : 7 - ligne 38
[DEBUG] 09:50:51: 08/07/2017 : 2 - ligne 15
[DEBUG] 09:51:16: 08/07/2017 : Etape 1 - ligne 21
[DEBUG] 09:51:16: 08/07/2017 : 5 - ligne 30
[DEBUG] 09:51:16: 08/07/2017 : 6 - ligne 31
[DEBUG] 09:51:16: Global variable change : FbxV6_LAN_Alex
[DEBUG] 09:51:16: 08/07/2017 : 2 - ligne 15
[DEBUG] 09:51:16: 08/07/2017 : 8 - ligne 45
[DEBUG] 09:51:16: 08/07/2017 : 11 - ligne 56
[DEBUG] 09:51:51: 08/07/2017 : 7 - ligne 38
[DEBUG] 09:51:51: 08/07/2017 : 2 - ligne 15
[DEBUG] 09:52:01: 08/07/2017 : Etape 1 - ligne 21
[DEBUG] 09:52:01: 08/07/2017 : 5 - ligne 30
[DEBUG] 09:52:01: 08/07/2017 : 6 - ligne 31
[DEBUG] 09:52:01: Global variable change : FbxV6_LAN_Alex
[DEBUG] 09:52:01: 08/07/2017 : 2 - ligne 15
[DEBUG] 09:52:01: 08/07/2017 : 8 - ligne 45
[DEBUG] 09:52:01: 08/07/2017 : 11 - ligne 56
[DEBUG] 09:52:51: 08/07/2017 : 7 - ligne 38
[DEBUG] 09:52:51: 08/07/2017 : 2 - ligne 15
[DEBUG] 09:53:31: 08/07/2017 : Etape 1 - ligne 21
[DEBUG] 09:53:31: 08/07/2017 : 5 - ligne 30
[DEBUG] 09:53:31: 08/07/2017 : 6 - ligne 31
[DEBUG] 09:53:31: Global variable change : FbxV6_LAN_Alex
[DEBUG] 09:53:31: 08/07/2017 : 2 - ligne 15
[DEBUG] 09:53:31: 08/07/2017 : 8 - ligne 45
[DEBUG] 09:53:31: 08/07/2017 : 11 - ligne 56
[DEBUG] 09:53:51: 08/07/2017 : 7 - ligne 38
[DEBUG] 09:53:51: 08/07/2017 : 2 - ligne 15
[DEBUG] 09:54:51: 08/07/2017 : 7 - ligne 38
[DEBUG] 09:54:51: 08/07/2017 : 2 - ligne 15
[DEBUG] 09:55:01: 08/07/2017 : Etape 1 - ligne 21
[DEBUG] 09:55:01: 08/07/2017 : 5 - ligne 30
[DEBUG] 09:55:01: 08/07/2017 : 6 - ligne 31
[DEBUG] 09:55:01: Global variable change : FbxV6_LAN_Alex
[DEBUG] 09:55:01: 08/07/2017 : 2 - ligne 15
[DEBUG] 09:55:01: 08/07/2017 : 8 - ligne 45
[DEBUG] 09:55:01: 08/07/2017 : 11 - ligne 56

 

 

Et celui du VD Freebox :

 

[DEBUG] 09:41:29: Alex-S8 found.
[DEBUG] 09:41:31: Get Wi-Fi Stations List with success
[DEBUG] 09:41:31: last activity at 1499487342
[DEBUG] 09:41:31: Device 30:07:4D:50:AA:65 not found!
[DEBUG] 09:41:32: Get LAN Host 30:07:4D:4F:A2:32 with success
[DEBUG] 09:41:32: primary_name : Alex-S8 , last_activity : 08/07/2017 09:40:09
[DEBUG] 09:41:33: Get LAN Host 30:07:4D:50:AA:65 with success
[DEBUG] 09:41:33: primary_name : Galaxy-S8 , last_activity : 08/07/2017 06:10:11
[DEBUG] 09:41:34: Session - Closing the current session successfully.
[DEBUG] 09:41:34: Benchmark [Main process]: elapsed time: 1.400 cpu secs
[DEBUG] 09:41:34: Benchmark [Total loop process]: elapsed time: 1.390 cpu secs
[DEBUG] 09:41:34: Total memory in use by Lua: 359.14 Kbytes
[DEBUG] 09:42:04: difftime is 30 seconds
[DEBUG] 09:42:04: Start main process #1501, please wait...
[DEBUG] 09:42:04: 2.0 - Track authorization progress for track Id: 2
[DEBUG] 09:42:06: 2.1 - The app should monitor the status until it is different from pending.
[DEBUG] 09:42:06: status: granted: the app_token is valid and can be used to open a session
[DEBUG] 09:42:06: challenge: DRv/tfFmVlSf/xeRu8omSKxy0J1ozChD
[DEBUG] 09:42:06: 3.0 - Try to opening a session.
[DEBUG] 09:42:06: difftime is 0 seconds
[DEBUG] 09:42:06: 3.1 - Compute password: hmac-sha1 of the challenge and the app_token.
[DEBUG] 09:42:07: 3.2 - Opening Session
[DEBUG] 09:42:07: 3.3 - Session is opened
[DEBUG] 09:42:09: Get System config with success
[DEBUG] 09:42:10: Get Wi-Fi Status with success
[DEBUG] 09:42:11: Get Every Calls with success
[DEBUG] 09:42:12: Get Connection status with success
[DEBUG] 09:42:13: Get Disk 1 info with success
[DEBUG] 09:42:15: Get Wi-Fi Stations List with success
[DEBUG] 09:42:15: Alex-S8 found.
[DEBUG] 09:42:16: Get Wi-Fi Stations List with success
[DEBUG] 09:42:16: last activity at 1499487342
[DEBUG] 09:42:16: Device 30:07:4D:50:AA:65 not found!
[DEBUG] 09:42:17: Get LAN Host 30:07:4D:4F:A2:32 with success
[DEBUG] 09:42:17: primary_name : Alex-S8 , last_activity : 08/07/2017 09:42:12
[DEBUG] 09:42:18: Get LAN Host 30:07:4D:50:AA:65 with success
[DEBUG] 09:42:18: primary_name : Galaxy-S8 , last_activity : 08/07/2017 06:10:11
[DEBUG] 09:42:19: Session - Closing the current session successfully.
[DEBUG] 09:42:19: Benchmark [Main process]: elapsed time: 1.270 cpu secs
[DEBUG] 09:42:19: Benchmark [Total loop process]: elapsed time: 1.280 cpu secs
[DEBUG] 09:42:19: Total memory in use by Lua: 359.14 Kbytes
[DEBUG] 09:42:49: difftime is 30 seconds
[DEBUG] 09:42:49: Start main process #1502, please wait...
[DEBUG] 09:42:49: 2.0 - Track authorization progress for track Id: 2
[DEBUG] 09:42:51: 2.1 - The app should monitor the status until it is different from pending.
[DEBUG] 09:42:51: status: granted: the app_token is valid and can be used to open a session
[DEBUG] 09:42:51: challenge: /YJ7ms//h4dmdPV1dKauMKZHDvo3i4Z/
[DEBUG] 09:42:51: 3.0 - Try to opening a session.
[DEBUG] 09:42:51: difftime is 0 seconds
[DEBUG] 09:42:51: 3.1 - Compute password: hmac-sha1 of the challenge and the app_token.
[DEBUG] 09:42:52: 3.2 - Opening Session
[DEBUG] 09:42:53: 3.3 - Session is opened
[DEBUG] 09:42:54: Get System config with success
[DEBUG] 09:42:55: Get Wi-Fi Status with success
[DEBUG] 09:42:56: Get Every Calls with success
[DEBUG] 09:42:57: Get Connection status with success
[DEBUG] 09:42:58: Get Disk 1 info with success
[DEBUG] 09:42:59: Get Wi-Fi Stations List with success
[DEBUG] 09:42:59: last activity at 1499499735
[DEBUG] 09:42:59: 30:07:4D:4F:A2:32 seems sleep.
[DEBUG] 09:43:01: Get Wi-Fi Stations List with success
[DEBUG] 09:43:01: last activity at 1499487342
[DEBUG] 09:43:01: Device 30:07:4D:50:AA:65 not found!
[DEBUG] 09:43:02: Get LAN Host 30:07:4D:4F:A2:32 with success
[DEBUG] 09:43:02: primary_name : Alex-S8 , last_activity : 08/07/2017 09:42:51
[DEBUG] 09:43:03: Get LAN Host 30:07:4D:50:AA:65 with success
[DEBUG] 09:43:03: primary_name : Galaxy-S8 , last_activity : 08/07/2017 06:10:11
[DEBUG] 09:43:04: Session - Closing the current session successfully.
[DEBUG] 09:43:04: Benchmark [Main process]: elapsed time: 1.300 cpu secs
[DEBUG] 09:43:04: Benchmark [Total loop process]: elapsed time: 1.300 cpu secs
[DEBUG] 09:43:04: Total memory in use by Lua: 359.09 Kbytes
[DEBUG] 09:43:35: difftime is 31 seconds
[DEBUG] 09:43:35: Start main process #1503, please wait...
[DEBUG] 09:43:35: 2.0 - Track authorization progress for track Id: 2
[DEBUG] 09:43:36: 2.1 - The app should monitor the status until it is different from pending.
[DEBUG] 09:43:36: status: granted: the app_token is valid and can be used to open a session
[DEBUG] 09:43:36: challenge: 3w+nxJT0lrfTebz0YyODM15wX0Oy+J+S
[DEBUG] 09:43:36: 3.0 - Try to opening a session.
[DEBUG] 09:43:36: difftime is 0 seconds
[DEBUG] 09:43:36: 3.1 - Compute password: hmac-sha1 of the challenge and the app_token.
[DEBUG] 09:43:37: 3.2 - Opening Session
[DEBUG] 09:43:38: 3.3 - Session is opened
[DEBUG] 09:43:39: Get System config with success
[DEBUG] 09:43:40: Get Wi-Fi Status with success
[DEBUG] 09:43:41: Get Every Calls with success
[DEBUG] 09:43:42: Get Connection status with success
[DEBUG] 09:43:43: Get Disk 1 info with success
[DEBUG] 09:43:45: Get Wi-Fi Stations List with success
[DEBUG] 09:43:45: last activity at 1499499735
[DEBUG] 09:43:45: 30:07:4D:4F:A2:32 seems sleep.
[DEBUG] 09:43:46: Get Wi-Fi Stations List with success
[DEBUG] 09:43:46: last activity at 1499487342
[DEBUG] 09:43:46: Device 30:07:4D:50:AA:65 not found!
[DEBUG] 09:43:47: Get LAN Host 30:07:4D:4F:A2:32 with success
[DEBUG] 09:43:47: primary_name : Alex-S8 , last_activity : 08/07/2017 09:42:51
[DEBUG] 09:43:48: Get LAN Host 30:07:4D:50:AA:65 with success
[DEBUG] 09:43:48: primary_name : Galaxy-S8 , last_activity : 08/07/2017 06:10:11
[DEBUG] 09:43:49: Session - Closing the current session successfully.
[DEBUG] 09:43:49: Benchmark [Main process]: elapsed time: 1.300 cpu secs
[DEBUG] 09:43:49: Benchmark [Total loop process]: elapsed time: 1.290 cpu secs
[DEBUG] 09:43:49: Total memory in use by Lua: 359.14 Kbytes
[DEBUG] 09:44:19: difftime is 30 seconds
[DEBUG] 09:44:19: Start main process #1504, please wait...
[DEBUG] 09:44:19: 2.0 - Track authorization progress for track Id: 2
[DEBUG] 09:44:21: 2.1 - The app should monitor the status until it is different from pending.
[DEBUG] 09:44:21: status: granted: the app_token is valid and can be used to open a session
[DEBUG] 09:44:21: challenge: ROp5v6CZ5/Or96uzHZ786K1cFkY5ATuM
[DEBUG] 09:44:21: 3.0 - Try to opening a session.
[DEBUG] 09:44:21: difftime is 0 seconds
[DEBUG] 09:44:21: 3.1 - Compute password: hmac-sha1 of the challenge and the app_token.
[DEBUG] 09:44:22: 3.2 - Opening Session
[DEBUG] 09:44:22: 3.3 - Session is opened
[DEBUG] 09:44:23: Get System config with success
[DEBUG] 09:44:25: Get Wi-Fi Status with success
[DEBUG] 09:44:26: Get Every Calls with success
[DEBUG] 09:44:27: Get Connection status with success
[DEBUG] 09:44:28: Get Disk 1 info with success
[DEBUG] 09:44:29: Get Wi-Fi Stations List with success
[DEBUG] 09:44:29: last activity at 1499499735
[DEBUG] 09:44:29: 30:07:4D:4F:A2:32 seems sleep.
[DEBUG] 09:44:31: Get Wi-Fi Stations List with success
[DEBUG] 09:44:31: last activity at 1499487342
[DEBUG] 09:44:31: Device 30:07:4D:50:AA:65 not found!
[DEBUG] 09:44:32: Get LAN Host 30:07:4D:4F:A2:32 with success
[DEBUG] 09:44:32: primary_name : Alex-S8 , last_activity : 08/07/2017 09:42:51
[DEBUG] 09:44:33: Get LAN Host 30:07:4D:50:AA:65 with success
[DEBUG] 09:44:33: primary_name : Galaxy-S8 , last_activity : 08/07/2017 06:10:11
[DEBUG] 09:44:34: Session - Closing the current session successfully.
[DEBUG] 09:44:34: Benchmark [Main process]: elapsed time: 1.170 cpu secs
[DEBUG] 09:44:34: Benchmark [Total loop process]: elapsed time: 1.170 cpu secs
[DEBUG] 09:44:34: Total memory in use by Lua: 359.09 Kbytes
[DEBUG] 09:45:04: difftime is 30 seconds
[DEBUG] 09:45:04: Start main process #1505, please wait...
[DEBUG] 09:45:04: 2.0 - Track authorization progress for track Id: 2
[DEBUG] 09:45:05: 2.1 - The app should monitor the status until it is different from pending.
[DEBUG] 09:45:05: status: granted: the app_token is valid and can be used to open a session
[DEBUG] 09:45:05: challenge: n29wUConm4rnfDxxiZIt0bWpidBWxtaI
[DEBUG] 09:45:06: 3.0 - Try to opening a session.
[DEBUG] 09:45:06: difftime is 1 seconds
[DEBUG] 09:45:06: 3.1 - Compute password: hmac-sha1 of the challenge and the app_token.
[DEBUG] 09:45:07: 3.2 - Opening Session
[DEBUG] 09:45:07: 3.3 - Session is opened
[DEBUG] 09:45:08: Get System config with success
[DEBUG] 09:45:09: Get Wi-Fi Status with success
[DEBUG] 09:45:10: Get Every Calls with success
[DEBUG] 09:45:12: Get Connection status with success
[DEBUG] 09:45:13: Get Disk 1 info with success
[DEBUG] 09:45:14: Get Wi-Fi Stations List with success
[DEBUG] 09:45:14: last activity at 1499499735
[DEBUG] 09:45:14: 30:07:4D:4F:A2:32 seems sleep.
[DEBUG] 09:45:15: Get Wi-Fi Stations List with success
[DEBUG] 09:45:15: last activity at 1499487342
[DEBUG] 09:45:15: Device 30:07:4D:50:AA:65 not found!
[DEBUG] 09:45:16: Get LAN Host 30:07:4D:4F:A2:32 with success
[DEBUG] 09:45:16: primary_name : Alex-S8 , last_activity : 08/07/2017 09:42:51
[DEBUG] 09:45:17: Get LAN Host 30:07:4D:50:AA:65 with success
[DEBUG] 09:45:17: primary_name : Galaxy-S8 , last_activity : 08/07/2017 06:10:11
[DEBUG] 09:45:19: Session - Closing the current session successfully.
[DEBUG] 09:45:19: Benchmark [Main process]: elapsed time: 1.170 cpu secs
[DEBUG] 09:45:19: Benchmark [Total loop process]: elapsed time: 1.170 cpu secs
[DEBUG] 09:45:19: Total memory in use by Lua: 359.09 Kbytes
[DEBUG] 09:45:49: difftime is 30 seconds
[DEBUG] 09:45:49: Start main process #1506, please wait...
[DEBUG] 09:45:49: 2.0 - Track authorization progress for track Id: 2
[DEBUG] 09:45:50: 2.1 - The app should monitor the status until it is different from pending.
[DEBUG] 09:45:50: status: granted: the app_token is valid and can be used to open a session
[DEBUG] 09:45:50: challenge: 8c11L8bDUmbxt/tBzS8jf1s0AZiRoeV8
[DEBUG] 09:45:50: 3.0 - Try to opening a session.
[DEBUG] 09:45:50: difftime is 0 seconds
[DEBUG] 09:45:50: 3.1 - Compute password: hmac-sha1 of the challenge and the app_token.
[DEBUG] 09:45:52: 3.2 - Opening Session
[DEBUG] 09:45:52: 3.3 - Session is opened
[DEBUG] 09:45:53: Get System config with success
[DEBUG] 09:45:55: Get Wi-Fi Status with success
[DEBUG] 09:45:56: Get Every Calls with success
[DEBUG] 09:45:57: Get Connection status with success
[DEBUG] 09:45:58: Get Disk 1 info with success
[DEBUG] 09:45:59: Get Wi-Fi Stations List with success
[DEBUG] 09:45:59: last activity at 1499499735
[DEBUG] 09:45:59: 30:07:4D:4F:A2:32 seems sleep.
[DEBUG] 09:46:00: Get Wi-Fi Stations List with success
[DEBUG] 09:46:00: last activity at 1499487342
[DEBUG] 09:46:00: Device 30:07:4D:50:AA:65 not found!
[DEBUG] 09:46:02: Get LAN Host 30:07:4D:4F:A2:32 with success
[DEBUG] 09:46:02: primary_name : Alex-S8 , last_activity : 08/07/2017 09:42:51
[DEBUG] 09:46:03: Get LAN Host 30:07:4D:50:AA:65 with success
[DEBUG] 09:46:03: primary_name : Galaxy-S8 , last_activity : 08/07/2017 06:10:11
[DEBUG] 09:46:04: Session - Closing the current session successfully.
[DEBUG] 09:46:04: Benchmark [Main process]: elapsed time: 1.310 cpu secs
[DEBUG] 09:46:04: Benchmark [Total loop process]: elapsed time: 1.310 cpu secs
[DEBUG] 09:46:04: Total memory in use by Lua: 359.09 Kbytes
[DEBUG] 09:46:34: difftime is 30 seconds
[DEBUG] 09:46:34: Start main process #1507, please wait...
[DEBUG] 09:46:34: 2.0 - Track authorization progress for track Id: 2
[DEBUG] 09:46:35: 2.1 - The app should monitor the status until it is different from pending.
[DEBUG] 09:46:35: status: granted: the app_token is valid and can be used to open a session
[DEBUG] 09:46:35: challenge: ChPXxxrTOFBt7Xh7b7woFms+iaEicFl6
[DEBUG] 09:46:35: 3.0 - Try to opening a session.
[DEBUG] 09:46:35: difftime is 0 seconds
[DEBUG] 09:46:35: 3.1 - Compute password: hmac-sha1 of the challenge and the app_token.
[DEBUG] 09:46:37: 3.2 - Opening Session
[DEBUG] 09:46:37: 3.3 - Session is opened
[DEBUG] 09:46:38: Get System config with success
[DEBUG] 09:46:39: Get Wi-Fi Status with success
[DEBUG] 09:46:40: Get Every Calls with success
[DEBUG] 09:46:41: Get Connection status with success
[DEBUG] 09:46:43: Get Disk 1 info with success
[DEBUG] 09:46:44: Get Wi-Fi Stations List with success
[DEBUG] 09:46:44: last activity at 1499499735
[DEBUG] 09:46:44: 30:07:4D:4F:A2:32 seems sleep.
[DEBUG] 09:46:45: Get Wi-Fi Stations List with success
[DEBUG] 09:46:45: last activity at 1499487342
[DEBUG] 09:46:45: Device 30:07:4D:50:AA:65 not found!
[DEBUG] 09:46:46: Get LAN Host 30:07:4D:4F:A2:32 with success
[DEBUG] 09:46:46: primary_name : Alex-S8 , last_activity : 08/07/2017 09:42:51
[DEBUG] 09:46:47: Get LAN Host 30:07:4D:50:AA:65 with success
[DEBUG] 09:46:47: primary_name : Galaxy-S8 , last_activity : 08/07/2017 06:10:11
[DEBUG] 09:46:49: Session - Closing the current session successfully.
[DEBUG] 09:46:49: Benchmark [Main process]: elapsed time: 1.210 cpu secs
[DEBUG] 09:46:49: Benchmark [Total loop process]: elapsed time: 1.200 cpu secs
[DEBUG] 09:46:49: Total memory in use by Lua: 359.14 Kbytes
[DEBUG] 09:47:19: difftime is 30 seconds
[DEBUG] 09:47:19: Start main process #1508, please wait...
[DEBUG] 09:47:19: 2.0 - Track authorization progress for track Id: 2
[DEBUG] 09:47:20: 2.1 - The app should monitor the status until it is different from pending.
[DEBUG] 09:47:20: status: granted: the app_token is valid and can be used to open a session
[DEBUG] 09:47:20: challenge: gP0ESS0VUW4ksSSUW8AYt8oNLdOVYlD/
[DEBUG] 09:47:20: 3.0 - Try to opening a session.
[DEBUG] 09:47:20: difftime is 0 seconds
[DEBUG] 09:47:20: 3.1 - Compute password: hmac-sha1 of the challenge and the app_token.
[DEBUG] 09:47:21: 3.2 - Opening Session
[DEBUG] 09:47:22: 3.3 - Session is opened
[DEBUG] 09:47:23: Get System config with success
[DEBUG] 09:47:24: Get Wi-Fi Status with success
[DEBUG] 09:47:25: Get Every Calls with success
[DEBUG] 09:47:26: Get Connection status with success
[DEBUG] 09:47:27: Get Disk 1 info with success
[DEBUG] 09:47:29: Get Wi-Fi Stations List with success
[DEBUG] 09:47:29: last activity at 1499499735
[DEBUG] 09:47:29: 30:07:4D:4F:A2:32 seems sleep.
[DEBUG] 09:47:30: Get Wi-Fi Stations List with success
[DEBUG] 09:47:30: last activity at 1499487342
[DEBUG] 09:47:30: Device 30:07:4D:50:AA:65 not found!
[DEBUG] 09:47:31: Get LAN Host 30:07:4D:4F:A2:32 with success
[DEBUG] 09:47:31: primary_name : Alex-S8 , last_activity : 08/07/2017 09:42:51
[DEBUG] 09:47:32: Get LAN Host 30:07:4D:50:AA:65 with success
[DEBUG] 09:47:32: primary_name : Galaxy-S8 , last_activity : 08/07/2017 06:10:11
[DEBUG] 09:47:33: Session - Closing the current session successfully.
[DEBUG] 09:47:33: Benchmark [Main process]: elapsed time: 1.250 cpu secs
[DEBUG] 09:47:33: Benchmark [Total loop process]: elapsed time: 1.250 cpu secs
[DEBUG] 09:47:33: Total memory in use by Lua: 359.09 Kbytes
[DEBUG] 09:48:03: difftime is 30 seconds
[DEBUG] 09:48:03: Start main process #1509, please wait...
[DEBUG] 09:48:03: 2.0 - Track authorization progress for track Id: 2
[DEBUG] 09:48:05: 2.1 - The app should monitor the status until it is different from pending.
[DEBUG] 09:48:05: status: granted: the app_token is valid and can be used to open a session
[DEBUG] 09:48:05: challenge: v5Lf93XMOqUueyDoPU4caW1KeCojHRkj
[DEBUG] 09:48:05: 3.0 - Try to opening a session.
[DEBUG] 09:48:05: difftime is 0 seconds
[DEBUG] 09:48:05: 3.1 - Compute password: hmac-sha1 of the challenge and the app_token.
[DEBUG] 09:48:06: 3.2 - Opening Session
[DEBUG] 09:48:07: 3.3 - Session is opened
[DEBUG] 09:48:08: Get System config with success
[DEBUG] 09:48:09: Get Wi-Fi Status with success
[DEBUG] 09:48:10: Get Every Calls with success
[DEBUG] 09:48:11: Get Connection status with success
[DEBUG] 09:48:13: Get Disk 1 info with success
[DEBUG] 09:48:14: Get Wi-Fi Stations List with success
[DEBUG] 09:48:14: last activity at 1499499735
[DEBUG] 09:48:14: 30:07:4D:4F:A2:32 seems sleep.
[DEBUG] 09:48:15: Get Wi-Fi Stations List with success
[DEBUG] 09:48:15: last activity at 1499487342
[DEBUG] 09:48:15: Device 30:07:4D:50:AA:65 not found!
[DEBUG] 09:48:16: Get LAN Host 30:07:4D:4F:A2:32 with success
[DEBUG] 09:48:16: primary_name : Alex-S8 , last_activity : 08/07/2017 09:42:51
[DEBUG] 09:48:17: Get LAN Host 30:07:4D:50:AA:65 with success
[DEBUG] 09:48:17: primary_name : Galaxy-S8 , last_activity : 08/07/2017 06:10:11
[DEBUG] 09:48:18: Session - Closing the current session successfully.
[DEBUG] 09:48:18: Benchmark [Main process]: elapsed time: 1.190 cpu secs
[DEBUG] 09:48:18: Benchmark [Total loop process]: elapsed time: 1.190 cpu secs
[DEBUG] 09:48:18: Total memory in use by Lua: 359.06 Kbytes
[DEBUG] 09:48:49: difftime is 31 seconds
[DEBUG] 09:48:49: Start main process #1510, please wait...
[DEBUG] 09:48:49: 2.0 - Track authorization progress for track Id: 2
[DEBUG] 09:48:50: 2.1 - The app should monitor the status until it is different from pending.
[DEBUG] 09:48:50: status: granted: the app_token is valid and can be used to open a session
[DEBUG] 09:48:50: challenge: AbvP+gfyzhrVCTU4SMH+b+cQHq//v1oo
[DEBUG] 09:48:50: 3.0 - Try to opening a session.
[DEBUG] 09:48:50: difftime is 0 seconds
[DEBUG] 09:48:50: 3.1 - Compute password: hmac-sha1 of the challenge and the app_token.
[DEBUG] 09:48:51: 3.2 - Opening Session
[DEBUG] 09:48:52: 3.3 - Session is opened
[DEBUG] 09:48:53: Get System config with success
[DEBUG] 09:48:54: Get Wi-Fi Status with success
[DEBUG] 09:48:55: Get Every Calls with success
[DEBUG] 09:48:56: Get Connection status with success
[DEBUG] 09:48:58: Get Disk 1 info with success
[DEBUG] 09:48:59: Get Wi-Fi Stations List with success
[DEBUG] 09:48:59: last activity at 1499499735
[DEBUG] 09:48:59: 30:07:4D:4F:A2:32 seems sleep.
[DEBUG] 09:49:00: Get Wi-Fi Stations List with success
[DEBUG] 09:49:00: last activity at 1499487342
[DEBUG] 09:49:00: Device 30:07:4D:50:AA:65 not found!
[DEBUG] 09:49:01: Get LAN Host 30:07:4D:4F:A2:32 with success
[DEBUG] 09:49:01: primary_name : Alex-S8 , last_activity : 08/07/2017 09:42:51
[DEBUG] 09:49:02: Get LAN Host 30:07:4D:50:AA:65 with success
[DEBUG] 09:49:02: primary_name : Galaxy-S8 , last_activity : 08/07/2017 06:10:11
[DEBUG] 09:49:03: Session - Closing the current session successfully.
[DEBUG] 09:49:03: Benchmark [Main process]: elapsed time: 1.330 cpu secs
[DEBUG] 09:49:03: Benchmark [Total loop process]: elapsed time: 1.340 cpu secs
[DEBUG] 09:49:03: Total memory in use by Lua: 359.14 Kbytes
[DEBUG] 09:49:34: difftime is 31 seconds
[DEBUG] 09:49:34: Start main process #1511, please wait...
[DEBUG] 09:49:34: 2.0 - Track authorization progress for track Id: 2
[DEBUG] 09:49:35: 2.1 - The app should monitor the status until it is different from pending.
[DEBUG] 09:49:35: status: granted: the app_token is valid and can be used to open a session
[DEBUG] 09:49:35: challenge: Q5AJmUH4O//2t5HXodfELTd+H3eE0KaL
[DEBUG] 09:49:35: 3.0 - Try to opening a session.
[DEBUG] 09:49:35: difftime is 0 seconds
[DEBUG] 09:49:35: 3.1 - Compute password: hmac-sha1 of the challenge and the app_token.
[DEBUG] 09:49:36: 3.2 - Opening Session
[DEBUG] 09:49:37: 3.3 - Session is opened
[DEBUG] 09:49:38: Get System config with success
[DEBUG] 09:49:39: Get Wi-Fi Status with success
[DEBUG] 09:49:40: Get Every Calls with success
[DEBUG] 09:49:41: Get Connection status with success
[DEBUG] 09:49:42: Get Disk 1 info with success
[DEBUG] 09:49:44: Get Wi-Fi Stations List with success
[DEBUG] 09:49:44: last activity at 1499499735
[DEBUG] 09:49:44: 30:07:4D:4F:A2:32 seems sleep.
[DEBUG] 09:49:45: Get Wi-Fi Stations List with success
[DEBUG] 09:49:45: last activity at 1499487342
[DEBUG] 09:49:45: Device 30:07:4D:50:AA:65 not found!
[DEBUG] 09:49:46: Get LAN Host 30:07:4D:4F:A2:32 with success
[DEBUG] 09:49:46: primary_name : Alex-S8 , last_activity : 08/07/2017 09:42:51
[DEBUG] 09:49:47: Get LAN Host 30:07:4D:50:AA:65 with success
[DEBUG] 09:49:47: primary_name : Galaxy-S8 , last_activity : 08/07/2017 06:10:11
[DEBUG] 09:49:48: Session - Closing the current session successfully.
[DEBUG] 09:49:48: Benchmark [Main process]: elapsed time: 1.220 cpu secs
[DEBUG] 09:49:48: Benchmark [Total loop process]: elapsed time: 1.230 cpu secs
[DEBUG] 09:49:48: Total memory in use by Lua: 359.14 Kbytes
[DEBUG] 09:50:18: difftime is 30 seconds
[DEBUG] 09:50:18: Start main process #1512, please wait...
[DEBUG] 09:50:18: 2.0 - Track authorization progress for track Id: 2
[DEBUG] 09:50:20: 2.1 - The app should monitor the status until it is different from pending.
[DEBUG] 09:50:20: status: granted: the app_token is valid and can be used to open a session
[DEBUG] 09:50:20: challenge: T6zfLtXFmcKC8qGjNqpDpUzueq162T9V
[DEBUG] 09:50:20: 3.0 - Try to opening a session.
[DEBUG] 09:50:20: difftime is 0 seconds
[DEBUG] 09:50:20: 3.1 - Compute password: hmac-sha1 of the challenge and the app_token.
[DEBUG] 09:50:21: 3.2 - Opening Session
[DEBUG] 09:50:21: 3.3 - Session is opened
[DEBUG] 09:50:22: Get System config with success
[DEBUG] 09:50:24: Get Wi-Fi Status with success
[DEBUG] 09:50:25: Get Every Calls with success
[DEBUG] 09:50:26: Get Connection status with success
[DEBUG] 09:50:27: Get Disk 1 info with success
[DEBUG] 09:50:28: Get Wi-Fi Stations List with success
[DEBUG] 09:50:28: last activity at 1499499735
[DEBUG] 09:50:28: 30:07:4D:4F:A2:32 seems sleep.
[DEBUG] 09:50:30: Get Wi-Fi Stations List with success
[DEBUG] 09:50:30: last activity at 1499487342
[DEBUG] 09:50:30: Device 30:07:4D:50:AA:65 not found!
[DEBUG] 09:50:31: Get LAN Host 30:07:4D:4F:A2:32 with success
[DEBUG] 09:50:31: primary_name : Alex-S8 , last_activity : 08/07/2017 09:42:51
[DEBUG] 09:50:32: Get LAN Host 30:07:4D:50:AA:65 with success
[DEBUG] 09:50:32: primary_name : Galaxy-S8 , last_activity : 08/07/2017 06:10:11
[DEBUG] 09:50:33: Session - Closing the current session successfully.
[DEBUG] 09:50:33: Benchmark [Main process]: elapsed time: 1.180 cpu secs
[DEBUG] 09:50:33: Benchmark [Total loop process]: elapsed time: 1.180 cpu secs
[DEBUG] 09:50:33: Total memory in use by Lua: 359.09 Kbytes
[DEBUG] 09:51:03: difftime is 30 seconds
[DEBUG] 09:51:03: Start main process #1513, please wait...
[DEBUG] 09:51:03: 2.0 - Track authorization progress for track Id: 2
[DEBUG] 09:51:04: 2.1 - The app should monitor the status until it is different from pending.
[DEBUG] 09:51:04: status: granted: the app_token is valid and can be used to open a session
[DEBUG] 09:51:05: challenge: MwAJRoIUZfmghw+jqGagUWq0GWYG9GO0
[DEBUG] 09:51:05: 3.0 - Try to opening a session.
[DEBUG] 09:51:05: difftime is 1 seconds
[DEBUG] 09:51:05: 3.1 - Compute password: hmac-sha1 of the challenge and the app_token.
[DEBUG] 09:51:06: 3.2 - Opening Session
[DEBUG] 09:51:06: 3.3 - Session is opened
[DEBUG] 09:51:07: Get System config with success
[DEBUG] 09:51:08: Get Wi-Fi Status with success
[DEBUG] 09:51:10: Get Every Calls with success
[DEBUG] 09:51:11: Get Connection status with success
[DEBUG] 09:51:12: Get Disk 1 info with success
[DEBUG] 09:51:13: Get Wi-Fi Stations List with success
[DEBUG] 09:51:13: Alex-S8 found.

L'adresse MAC de mon S8 est bien : 30:07:4D:4F:A2:32 avec le wifi bien réglé pour être activé même en veille 

 

Désolé pour le  Pavé :D

 

Modifié par Bloug
Lien vers le commentaire
Partager sur d’autres sites

Une adresse MAC c'est pas trop grave encore, c'est pas comme un numéro de téléphone ou un numéro IMEI.

 

 

Maintenant le comportement me semble normal :)

En fait, dans la scène de détection de présence, tu as local delay = 1800, donc la scène ne signalera l'absence qu'au bout d'une demi-heure.

Hors tu as attendu seulement 8 minutes dans ton test avant de réactiver le Wifi de ton tel.

 

Il faut donc réduire le delay, ou attendre plus longtemps.

  • Upvote 1
Lien vers le commentaire
Partager sur d’autres sites

Oupsss   :D Ceci explique cela :lol: 

arfff la grosse boulette c'est sur que là avec 180 c'est mieux :P  

 

Un Grand Merci !!!!

 

 

 

@Did   vous êtes pas plus d'une une vingtaine de personnes à faire des trucs de fou avec une simple adresse :P la liste des suspects sera courte ! :D 

           Et si j'avais changé une lettre O cas Z'OUUUU ?????    non avec la bourde du dessus j'suis pas crédible 

 

Modifié par Bloug
  • Upvote 3
Lien vers le commentaire
Partager sur d’autres sites

  • 1 an après...

moi g pas compris le tuto lol

j'ai créer un truc virtuel freebox avec le fichier 0..1.11

ensuite j'ai lancé le debut et ma freebox s'est agitéée

j'(ai validé et maintenant je vois un tas de truc...qui correspondent a des valeurs de ma freebox.

 

ensuite je suis paumé...

faut que je rajoute dans le mainloop ce truc... dans le mainloop de la freebox serveur ?

là ou y a tout le texte en LUA ?

faut mettre au debut a la fin ? au milieu ? entre quoi et quoi ? lol

 

merci d'avance les zamis

 _lanDevice = {
    {
      mac = "00:00:00:00:00:00", -- Sony Xperia Z2 (ether-00:00:00:00:00:00)
      vg = "FbxV6_LAN_XperiaZ2"
    },
    {
      mac = "00:00:00:00:00:00", -- Samsung Galaxy S4 Mini
      vg = "FbxV6_LAN_S4mini"
    }
  },
Lien vers le commentaire
Partager sur d’autres sites

Oui c'est bien indiqué " Modifier la Main Loop du module virtuel Freebox "

 

Désolé je n'ai plus de Freebox, je n'utilise plus ce script.... donc faut que tu cherches un peu pour savoir où l'ajouter.

 

PS : tu sais que tu peux éditer ton message quand tu as besoin d'ajouter un commentaire.... inutile de multiplier les nouveaux messages pour rien ;)

 

Lien vers le commentaire
Partager sur d’autres sites

Hello voilà j'ai nettoyé mes conneries :) 

 

je commence par faire un test sur mon smartphone uniquement (Twentycents)

Si je passe la valeur delay = 30 et que je suis en wifi

il me dit absence détectée

 

si je passe cette valeur à 6000 : il ne se passe rien donc je suis toujours en mode Absence détectée

 

si je coupe maintenant mon wifi et change mon délai à 90800 par exemple lol bah je vois Présence détectée

 

je voulais qu'il vérifie toutes les minutes si mon tel est là ou pas...

j'ai l'impression que j'ai fais une erreur de programmation :(

 

@Lazer c'est de ta faute si j'en suis là... que ma vie est nulle moi je voulais utiliser le GPS à la base lol :) et jojo il m'a permis d'avoir un bon prix sur ma domotique alors vous etes coupable !

--[[
%% autostart
%% properties
%% globals
Twentycents
iPhone
--]]

function Check()

	local delay = 30
	local timestamp = os.time()
	local Twentycents = tonumber(fibaro:getGlobalValue("Twentycents"))
    local iPhone  = tonumber(fibaro:getGlobalValue("iPhone"))
	local Presence = fibaro:getGlobalValue("Presence")

	if Twentycents < timestamp - delay then
		if Presence == "1" then
			fibaro:debug(os.date('%d/%m/%Y').." : Absence détectée")
			fibaro:setGlobal("Presence", "0")
		end
	else
		if Presence == "0" then
			fibaro:debug(os.date('%d/%m/%Y').." : Présence détectée")
			fibaro:setGlobal("Presence", "1")
		end
	end

end

local trigger = fibaro:getSourceTrigger()

if trigger["type"] == "autostart" then
	fibaro:debug(os.date('%d/%m/%Y').." : Autostart infinite loop...")
	while true do
		Check()
		fibaro:sleep(1*60*1000) -- 1 minute
	end
elseif trigger["type"] == "global" then
	fibaro:debug("Global variable change : "..trigger['name'])
	Check()
elseif trigger["type"] == "other" then
	fibaro:debug(os.date('%d/%m/%Y').." : Started manually")
	Check()
elseif trigger["type"] == "property" then
	fibaro:debug(os.date('%d/%m/%Y').." : Property changed : ".. trigger['deviceID'].." => "..trigger['propertyName'])
else
	fibaro:debug(os.date('%d/%m/%Y').." : Unknown trigger : "..trigger["type"])
end

 

Modifié par Twentycents
Lien vers le commentaire
Partager sur d’autres sites

Je crois que ça fonctionne et je crois aussi savoir pourquoi ça bug aussi....

 

[DEBUG] 15:58:23: 27/10/2018 : Autostart infinite loop...  ------------------ Wifi activé sur mon tel (donc variable Presence = 1)
[DEBUG] 15:58:58: Global variable change : Twentycents------------- Wifi toujours activé (donc variable Presence = 1)
[DEBUG] 16:00:10: Global variable change : Twentycents -------------------- Wifi toujours activé (donc variable Presence = 1) et là je passe en 4G.... et donc la Variable Presence =0 
[DEBUG] 16:01:23: 27/10/2018 : Absence détectée ---- BINGO ça fonctionne....allez je repasse en WIFI
[DEBUG] 16:02:34: Global variable change : Twentycents ---  Bingo again ! 
[DEBUG] 16:02:34: 27/10/2018 : Présence détectée et me revoilà :) 

 

Maintenant pourquoi ça bugait !!!!???

bah Facile ! ....

 

il suffit d'aller dans le menu des variables :  comme ce ci

 

image.thumb.png.ad77f096106d9dcd8df176731027b0a6.png

 

et cliquer tu la petite disquette (oh oui j'aime les disquettes) et ça change des trucs... du genre des trucs quand même importants ( en ROUGE )

 

image.thumb.png.969d13e748db6919fab40e8a27ba1d8d.png

 

et donc là que se passe-t-il ?

mon téléphone est connecté en wifi et je reçois une alerte qui dit que je suis absent... mais bien sur mon gars....

 

mais pourquoi ? que vient-il de se passer......... quel suspens :)

 

bah allez je retourne dans mon VD Freebox et donc un petit run sur le debug...

 

 

[DEBUG] 16:13:13: error_code: invalid_session
[DEBUG] 16:13:13: Benchmark [Main process]: elapsed time: 1.995 cpu secs
[DEBUG] 16:13:13: Benchmark [Total loop process]: elapsed time: 1.995 cpu secs
[DEBUG] 16:13:13: Total memory in use by Lua: 358.66 Kbytes
[DEBUG] 16:13:14: 3.1 - Explicitly request a challenge.
[DEBUG] 16:13:14: Challenge is OmIx5lw92hD4gKo1bjEiye6H78q1H3vn
[DEBUG] 16:13:15: Status: 403
[DEBUG] 16:13:15: Opening Session failled, because Erreur d'authentification de l'application error code: invalid_token
[DEBUG] 16:13:16: uid: a067bcf42b9d034eb5af735cb55b83d5
[DEBUG] 16:16:24: Opening Session failled, because Erreur d'authentification de l'application error code: invalid_token
[DEBUG] 16:16:25: uid: a067bcf42b9d034eb5af735cb55b83d5
[DEBUG] 16:16:25: success: false
[DEBUG] 16:16:25: msg: Vous devez vous connecter pour accéder à cette fonction
[DEBUG] 16:16:25: result.password_salt: aR9vxdkdVQI+MqrZPjTx1tQrYEoBKzKD
[DEBUG] 16:16:25: result.challenge: 5p9VRRRs6Zpo4E+RGQ4wEzq90v4nbm3u
[DEBUG] 16:16:25: error_code: invalid_session

 

et bla bla bla et bla bla bla

En gros, ça marche NICKEL mais ne jamais cliquer sur la disquette dans le panneaux variables...

merci @Lazer

 

 

Modifié par Twentycents
Lien vers le commentaire
Partager sur d’autres sites

Alors attention, le GPS il faut le régler. Il faut ajuster et ne pas réveiller trop non plus, sinon cela te bouffe la batterie de ton portable.

Quand tu vas sur ton user dans la HC2, tu peux régler un mode avancer avec un calendrier. Là, ce que tu fais : Tu augmentes la fréquence aux horaires importants et tu la diminues le reste du temps : Et là du coup cela fonctionne plutôt pas mal. Moi j'arrivai à me suivre vraiment en rentrant du boulot sur la route.

Après pour ouvrir ton portail en auto non, mais pour faire un scénario de non présence, c'est utilisable.

Lien vers le commentaire
Partager sur d’autres sites

×
×
  • Créer...