Intégration AMAFIT GTR 3 / Mibrand 9

Bonjour à tous

Je souhaite intégrer la montre AMAZFIT GTR 3 et le mibrand 9 dans le plugin.
J’ai essayé avec la GTR, donc je suis repartie des fichiers de AMAZFIT GTR par contre ca ne fonctionne pas, il doit manquer un truc !

De plus y a des fichiers.pyc dans le dossier resources>blead>devices>pycache et je ne sais pas comment les ouvrir, une idée ?
image

Les fichiers que j’ai créé :

**resources>blead>devices>amazfitgtr3.py**
# coding: utf-8
from bluepy import btle
import time
import logging
import globals

class AmazfitGtr3():
	def __init__(self):
		self.name = 'amazfitgtr3'
		self.ignoreRepeat = False

	def isvalid(self,name,manuf='',data='',mac=''):
		if name.lower() in ['amazfit gtr 3',self.name]:
			return True

	def parse(self,data,mac,name,manuf):
		action={}
		action['present'] = 1
		return action

globals.COMPATIBILITY.append(AmazfitGtr3)

**blea>core>config>device>amazfit>amazfitgtr3.json** (+.jpg)
{
    "amazfitgtr3": {
        "name": "Amazfit GTR 3",
		"groupe" : "Santé",
		"configuration" : {
			"name" : "amazfitgtr3",
			"battery_type" : "Batterie",
			"xiaomi" : 1
		},
        "commands": [
        ],
		"compatibility": [
            {
                "manufacturer": "Huami",
                "name": "Amazfit GTR 3",
				"doc": "",
				"type": "Santé",
				"battery_type": "Batterie",
				"ref" : "",
				"comlink": "",
				"remark": "Uniquement de la présence pour le moment",
				"inclusion" : "Mode inclusion",
				"imglink": "amazfitgtr3"
            }
        ]
    }
}

Informations Jeedom

Core : 4.4.19 (master)
DNS Jeedom : non

Plugin : Bluetooth Advertisement
Version : 2024-09-05 01:00:47 (stable)
Statut Démon : Démarré - (2024-11-30 12:18:09)

Bonjour,

Si c’est uniquement pour gérer la présence, en activant la détection des périphériques inconnue vous devez voir vos 2 bracelets, c’est le cas ou pas ?

On ne touche pas aux fichiers dans le cache, c’est inutile.

Pour un Miband7 j’avais fais cela :

L’image de petite taille :
blea/core/config/devices/miband/miband7.jpg

Le fichier : blea/core/config/devices/miband/miband7.json

{
    "miband7": {
        "name": "Miband 7",
		"groupe" : "Santé",
		"configuration" : {
			"name" : "miband7",
			"battery_type" : "Batterie",
			"xiaomi" : 1
		},
        "commands": [
        ],
		"compatibility": [
            {
                "manufacturer": "Xiaomi",
                "name": "Miband 7",
				"doc": "",
				"type": "Santé",
				"battery_type": "Batterie",
				"ref" : "",
				"comlink": "",
				"remark": "Uniquement de la présence pour le moment",
				"inclusion" : "Mode inclusion",
				"imglink": "miband7"
            }
        ]
    }
}

Le fichier : blea/resources/blead/devices/miband7.py

# coding: utf-8
from bluepy import btle
import time
import logging
import globals

class Miband7():
	def __init__(self):
		self.name = 'miband7'
		self.ignoreRepeat = False

	def isvalid(self,name,manuf='',data='',mac=''):
		if name.lower() in ['mi smart band 7',self.name]:
			return True
			
	def parse(self,data,mac,name,manuf):
		action={}
		action['present'] = 1
		return action

globals.COMPATIBILITY.append(Miband7)