Paramétrage Tesla

Sous forum dédié au plugin MQTTMAPPER de FlyingDomotic
Merci de poster vous questions concernant ce plugin ici et non pas dans le forum MQTT directement
marcus_54
Messages : 425
Inscription : 28 févr. 2018, 12:15

Re: Plugin MQTT de FlyingDomotic

Message par marcus_54 »

j'ai essayé cela m'a multiplié également la puissance instantanée :?

Code : Tout sélectionner

	"Puissance Solaire": {"topic": "zigbee/Energie",
		"type": "243", "subtype": "29", "switchtype": "0", 
		"key": "PSolaire",		
		"mapping": {"item": "power_b;energy_b,"multiplier": 1000"}},
Domoticz 2024.7
Domoticz sur RPI 4B+ : MQTT; MQTTMapper; Zigbee; RFlink DIY 433; Téléinfo; DS18B20; Capteur; compteur eau wmbusmeter, NanoLeaf...
marcus_54
Messages : 425
Inscription : 28 févr. 2018, 12:15

Re: Plugin MQTT de FlyingDomotic

Message par marcus_54 »

J'ai aussi un problème avec mon compteur d'eau dans le même genre sauf que lui il me rajoute les litres qu'il reçoit à chaque fois qu'il y a une variation.
c'est à dire que s'il affiche 100 l et que il y a une variation de 1 l, il va afficher 201 liter

Code : Tout sélectionner

    "Eau compteur2": {"topic": "eau/consommation", 
		"type": "113", "subtype": "0", "switchtype": "2", 
		"key": "eau2",
		"options": {"ValueQuantity":"Consommation", "ValueUnits":"m3"},
		"mapping": {"item": "total_l"}},
Edit :
C'est OK pour l'eau c'était un facteur 1000
ce qui est curieux c'est que pour 1 litres comsommé ca m'en affichait 10... encore un petit mistère :)
Domoticz 2024.7
Domoticz sur RPI 4B+ : MQTT; MQTTMapper; Zigbee; RFlink DIY 433; Téléinfo; DS18B20; Capteur; compteur eau wmbusmeter, NanoLeaf...
Flying Domotic
Messages : 772
Inscription : 10 mars 2020, 15:26

Re: Plugin MQTT de FlyingDomotic

Message par Flying Domotic »

marcus_54 a écrit : 05 oct. 2024, 19:16 j'ai essayé cela m'a multiplié également la puissance instantanée :?

Code : Tout sélectionner

	"Puissance Solaire": {"topic": "zigbee/Energie",
		"type": "243", "subtype": "29", "switchtype": "0", 
		"key": "PSolaire",		
		"mapping": {"item": "power_b;energy_b,"multiplier": 1000"}},
Ah, oui, tiens, j'avais pas pensé à ça. Je vais essayer de faire un truc pour avoir un facteur de multiplication par élément de sValue.
Flying Domotic
Messages : 772
Inscription : 10 mars 2020, 15:26

Re: Plugin MQTT de FlyingDomotic

Message par Flying Domotic »

Bon, j'ai ajouté la possibilité de définir plusieurs valeurs dans multiplier et digits.

Du coup, après mise à jour, d'écrire un truc comme :

Code : Tout sélectionner

"Puissance Solaire": {"topic": "zigbee/Energie",
	"type": "243", "subtype": "29", "switchtype": "0", 
	"key": "PSolaire",		
	"initial": {"svalue": "0;0"},
	"mapping": {"item": "power_b;energy_b","multiplier": "1000;1"}
marcus_54
Messages : 425
Inscription : 28 févr. 2018, 12:15

Re: Plugin MQTT de FlyingDomotic

Message par marcus_54 »

Il semble qu'il reste un petit souci avec le fichier checkJsonFiles.py

Celui ci me retourne une erreur me disant qu'il manque une virgule sur l'avant dernière accolade ou normalement il devra pas y en avoir.
/home/marc/domoticz/plugins/MqttMapper/./checkJsonFiles.py V1.3.6 - Use --trace to get details
Expecting ',' delimiter: line 103 column 1 (char 4270) when loading MqttMapper.json. Fix error and retry check!!!

Code : Tout sélectionner

		
	....
	"Prise Salon AR": {"topic": "zigbee/Prise_Salon_AR",
		"type": "244", "subtype": "73", "switchtype": "0",
		"key": "SalonAR",
		"set": {"topic": "zigbee/Prise_Salon_AR/set", "payload": {"state":"#"}},
		"mapping": {"item": "state", "default": "0", "values": {"OFF": "0", "ON": "100"}}},
	
	"Relais Lampe": {"topic": "zigbee/Relais_Lampe",
		"type": "244", "subtype": "73", "switchtype": "0",
		"key": "Relais",
		"set": {"topic": "zigbee/Relais_Lampe/set", "payload": {"state":"#"}},
		"mapping": {"item": "state", "default": "0", "values": {"OFF": "0", "ON": "100"}}}
}
Domoticz 2024.7
Domoticz sur RPI 4B+ : MQTT; MQTTMapper; Zigbee; RFlink DIY 433; Téléinfo; DS18B20; Capteur; compteur eau wmbusmeter, NanoLeaf...
Flying Domotic
Messages : 772
Inscription : 10 mars 2020, 15:26

Re: Plugin MQTT de FlyingDomotic

Message par Flying Domotic »

Est-il possible d'avoir le contenu du fichier de configuration de la ligne 90 à à la ligne 105 ?
marcus_54
Messages : 425
Inscription : 28 févr. 2018, 12:15

Re: Plugin MQTT de FlyingDomotic

Message par marcus_54 »

je te met le fichier complet

Code : Tout sélectionner

{
    "Tesla Compteur": {"topic": "teslamate/cars/1/odometer",
        "type": "113", "subtype": "0", "switchtype": "3",
        "options": {"ValueQuantity":"Distance", "ValueUnits":"km"},
        "mapping": {"item": ""}},
		
	"Tesla Batterie": {"topic": "teslamate/cars/1/battery_level",
        "type": "243", "subtype": "6", "switchtype": "0",
        "options": {"ValueUnits":"%"},
        "mapping": {"item": ""}},
		
	"Tesla Roue AvD": {"topic": "teslamate/cars/1/tpms_pressure_fr",
        "type": "243", "subtype": "9", "switchtype": "0",
        "options": {"ValueUnits":"Bar"},
        "mapping": {"item": "","digits": 2} },
		
	"Tesla Roue AvG": {"topic": "teslamate/cars/1/tpms_pressure_fl",
        "type": "243", "subtype": "9", "switchtype": "0",
        "options": {"ValueUnits":"Bar"},
		"mapping": {"item": "","digits": 2}},
	
	"Tesla Roue ArD": {"topic": "teslamate/cars/1/tpms_pressure_rr",
        "type": "243", "subtype": "9", "switchtype": "0",
        "options": {"ValueUnits":"Bar"},
        "mapping": {"item": "","digits": 2}},
		
	"Tesla Roue ArG": {"topic": "teslamate/cars/1/tpms_pressure_rl",
        "type": "243", "subtype": "9", "switchtype": "0",
        "options": {"ValueUnits":"Bar"},
        "mapping": {"item": "","digits": 2}},
		
	"Tesla Temp int": {"topic": "teslamate/cars/1/inside_temp",
        "type": "80", "subtype": "5", "switchtype": "0",
        "mapping": {"item": ""}},
		
	"Tesla Temp ext": {"topic": "teslamate/cars/1/outside_temp",
        "type": "80", "subtype": "5", "switchtype": "0",
        "mapping": {"item": ""}},
		
    "Eau Compteur": {"topic": "eau/consommation", 
		"type": "113", "subtype": "0", "switchtype": "2", 
		"initial": {"svalue":"38313"},
		"options": {"ValueQuantity":"Consommation", "ValueUnits":"l"},
		"mapping": {"item": "total_l"}},
		
	"Intensité Secteur rms": {"topic": "zigbee/Energie", 
		"type": "243", "subtype": "23", "switchtype": "0",
		"key": "power_as",
		"mapping": {"item": "power_a","multiplier": 0.00417,"digits": 2}},
	
	"Intensité Solaire rms": {"topic": "zigbee/Energie",
		"type": "243", "subtype": "23", "switchtype": "0",
		"key": "power_bs",
		"mapping": {"item": "power_b","multiplier": 0.00425,"digits": 2}},
		
	"Puissance Secteur": {"topic": "zigbee/Energie",
		"type": "243", "subtype": "29", "switchtype": "0", 
		"key": "PSecteur",	
		"mapping": {"item": "power_a;energy_a","multiplier": "1000;1"}},
		
	"Puissance Solaire": {"topic": "zigbee/Energie",
		"type": "243", "subtype": "29", "switchtype": "0", 
		"key": "PSolaire",		
		"initial": {"svalue": "0;0"},
		"mapping": {"item": "power_b;energy_b","multiplier": "1000;1"},
		
	"Puissance Chauffage": {"topic": "zigbee/Energie",
		"type": "243", "subtype": "29", "switchtype": "0", 
		"key": "Ppompes",
		"mapping": {"item": "power_c;energy_c","multiplier": "1000;1"}},

    "Temp Ext garage": {"topic": "zigbee/Temp_Ext",
		"type": "82", "subtype": "1", "switchtype": "0", 
		"mapping": {"item": "temperature;humidity;battery_state"}},

	"Prise Bureau Energie": {"topic": "zigbee/Prise_Bureau",
		"type": "243", "subtype": "29", "switchtype": "0", 
		"key": "PriseBureau",
		"mapping": {"item": "power;energy","multiplier": "1000;1"}},
		
	"Prise Bureau": {"topic": "zigbee/Prise_Bureau",
		"type": "244", "subtype": "73", "switchtype": "0",
		"key": "bureauMA",
		"set": {"topic": "zigbee/PPrise_Bureau/set", "payload": {"state":"#"}},
		"mapping": {"item": "state", "default": "0", "values": {"OFF": "0", "ON": "100"}}},	

	"Prise Salon Energie": {"topic": "zigbee/Prise_Salon_AR",
		"type": "243", "subtype": "29", "switchtype": "0", 
		"key": "PriseSalon",
		"mapping": {"item": "power;energy","multiplier": "1000;1"}},
		
	"Prise Salon AR": {"topic": "zigbee/Prise_Salon_AR",
		"type": "244", "subtype": "73", "switchtype": "0",
		"key": "SalonAR",
		"set": {"topic": "zigbee/Prise_Salon_AR/set", "payload": {"state":"#"}},
		"mapping": {"item": "state", "default": "0", "values": {"OFF": "0", "ON": "100"}}},
	
	"Relais Lampe": {"topic": "zigbee/Relais_Lampe",
		"type": "244", "subtype": "73", "switchtype": "0",
		"key": "Relais",
		"set": {"topic": "zigbee/Relais_Lampe/set", "payload": {"state":"#"}},
		"mapping": {"item": "state", "default": "0", "values": {"OFF": "0", "ON": "100"}}}
}
Domoticz 2024.7
Domoticz sur RPI 4B+ : MQTT; MQTTMapper; Zigbee; RFlink DIY 433; Téléinfo; DS18B20; Capteur; compteur eau wmbusmeter, NanoLeaf...
Flying Domotic
Messages : 772
Inscription : 10 mars 2020, 15:26

Re: Plugin MQTT de FlyingDomotic

Message par Flying Domotic »

Ajouter une "}" à la fin de la ligne 65, pour que le contenu devienne :

Code : Tout sélectionner

		"mapping": {"item": "power_b;energy_b","multiplier": "1000;1"}},
C'est à la fin du pavé "Puissance solaire", juste avant "Puissance Chauffage".

Pour info, il existe des outils de vérification de format JSON, soit en tant que plugin (de Notepad++ par exemple), soit directement sur Internet. Ça peut aider à régler les soucis de syntaxe JSON.
marcus_54
Messages : 425
Inscription : 28 févr. 2018, 12:15

Re: Plugin MQTT de FlyingDomotic

Message par marcus_54 »

désolé merci

Je viens de tester json Tools dans notepad++ sur le check syntax NOW il me trouve la même erreur à la fin du JSON :? tu utilises quelle option pour trouver cette erreur ?
Domoticz 2024.7
Domoticz sur RPI 4B+ : MQTT; MQTTMapper; Zigbee; RFlink DIY 433; Téléinfo; DS18B20; Capteur; compteur eau wmbusmeter, NanoLeaf...
marcus_54
Messages : 425
Inscription : 28 févr. 2018, 12:15

Re: Plugin MQTT de FlyingDomotic

Message par marcus_54 »

ça à l'ai OK :)

edit : c'est tout bon ;)
Domoticz 2024.7
Domoticz sur RPI 4B+ : MQTT; MQTTMapper; Zigbee; RFlink DIY 433; Téléinfo; DS18B20; Capteur; compteur eau wmbusmeter, NanoLeaf...
Répondre