mac adresse en minuscule ou majuscule (uppercase)
This commit is contained in:
@@ -65,3 +65,4 @@ Note : Un fichier ```devicemapping.json``` est créé pour garder l'association
|
|||||||
| ----- | ---------- |
|
| ----- | ---------- |
|
||||||
| 1.0 | Version initial : connexion (token), températures système, espace disque, présence |
|
| 1.0 | Version initial : connexion (token), températures système, espace disque, présence |
|
||||||
| 1.1 | Ajout des switch WIFI et Reboot. Ajout d'une pause au démarrage du plugin pour corriger certains pb |
|
| 1.1 | Ajout des switch WIFI et Reboot. Ajout d'une pause au démarrage du plugin pour corriger certains pb |
|
||||||
|
| 1.1.1 | PRise en compte de l'adresse MAC en Majuscule ou minuscule pour la présence |
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ class FbxApp(FbxCnx):
|
|||||||
listePeriph = self.com( "lan/browser/pub/")
|
listePeriph = self.com( "lan/browser/pub/")
|
||||||
for periph in listePeriph["result"]:
|
for periph in listePeriph["result"]:
|
||||||
macAdresse = periph["id"]
|
macAdresse = periph["id"]
|
||||||
if(("ether-"+p_macAdresse) == macAdresse):
|
if(("ETHER-"+p_macAdresse.upper()) == macAdresse.upper()):
|
||||||
return periph["primary_name"]
|
return periph["primary_name"]
|
||||||
except (urllib.error.HTTPError, urllib.error.URLError) as error:
|
except (urllib.error.HTTPError, urllib.error.URLError) as error:
|
||||||
Domoticz.Log('La Freebox semble indisponible : '+ error.msg)
|
Domoticz.Log('La Freebox semble indisponible : '+ error.msg)
|
||||||
@@ -137,7 +137,7 @@ class FbxApp(FbxCnx):
|
|||||||
listePeriph = self.com( "lan/browser/pub/")
|
listePeriph = self.com( "lan/browser/pub/")
|
||||||
for periph in listePeriph["result"]:
|
for periph in listePeriph["result"]:
|
||||||
macAdresse = periph["id"]
|
macAdresse = periph["id"]
|
||||||
if(("ether-"+p_macAdresse) == macAdresse):
|
if(("ETHER-"+p_macAdresse.upper()) == macAdresse.upper()):
|
||||||
reachable = periph["reachable"]
|
reachable = periph["reachable"]
|
||||||
active = periph["active"]
|
active = periph["active"]
|
||||||
if reachable and active:
|
if reachable and active:
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
# https://matdomotique.wordpress.com/2018/03/25/plugin-freebox-pour-domoticz/
|
# https://matdomotique.wordpress.com/2018/03/25/plugin-freebox-pour-domoticz/
|
||||||
#
|
#
|
||||||
"""
|
"""
|
||||||
<plugin key="Freebox" name="Freebox Python Plugin" author="supermat" version="1.1.0" wikilink="http://www.domoticz.com/wiki/plugins/plugin.html" externallink="https://matdomotique.wordpress.com/2018/03/25/plugin-freebox-pour-domoticz">
|
<plugin key="Freebox" name="Freebox Python Plugin" author="supermat" version="1.1.1" wikilink="http://www.domoticz.com/wiki/plugins/plugin.html" externallink="https://matdomotique.wordpress.com/2018/03/25/plugin-freebox-pour-domoticz">
|
||||||
<params>
|
<params>
|
||||||
<param field="Address" label="URL de la Box avec http devant" width="400px" required="true" default="http://mafreebox.free.fr"/>
|
<param field="Address" label="URL de la Box avec http devant" width="400px" required="true" default="http://mafreebox.free.fr"/>
|
||||||
<param field="Port" label="Port" width="100px" required="true" default="80"/>
|
<param field="Port" label="Port" width="100px" required="true" default="80"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user