Bonjour,
je me suis remis sur le plugin.
J'ai essayé de modifier le plugin en python pour ajouter les particularités de mon poêle qui à 3 ventilateurs par rapport au poêle du plugin d'origine qui n'en gère qu'un.
J'ai une erreur lors de la création d'un sélecteur de vitesse pour un ventilateur. (Ventilateur Bureau)
Code : Tout sélectionner
2023-10-24 11:14:10.945 Error: Poele: Device creation failed, Hardware/Unit combination (38:3) already exists in Domoticz
le vous mets la zone en question :
Code : Tout sélectionner
if (len(Devices) != 15):
# types / subtypes reference: https://github.com/domoticz/domoticz/blob/master/hardware/hardwaretypes.h
# Image index for switches: Fireplace: 10, Fan: 7, Heating: 15, Generic:
# On/Off switch
Domoticz.Device(Name="Marche Arret", Unit=self.__UNIT_ONOFF, TypeName="Switch", Image=10, Used=1).Create()
# Power selector switch
PowerSelectorOptions = {"LevelActions": "|||||",
"LevelNames": "Off|1|2|3|4|5",
"LevelOffHidden": "true",
"SelectorStyle": "1"}
Domoticz.Device(Name="Niveau Puissance", Unit=self.__UNIT_POWER, TypeName="Selector Switch", Image=10, Options=PowerSelectorOptions, Used=1).Create()
# Fan speed selector switch
FanSpeedSelectorOptions = {"LevelActions": "|||||||",
"LevelNames": "Off|1|2|3|4|5|Auto|Hi",
"LevelOffHidden": "false",
"SelectorStyle": "1"}
Domoticz.Device(Name="Ventilateur Salon", Unit=self.__UNIT_FAN2LEVEL, TypeName="Selector Switch", Image=7, Options=FanSpeedSelectorOptions, Used=1).Create()
# Fan bureau speed selector switch
FanSpeedSelectorOptions3 = {"LevelActions": "|||||",
"LevelNames": "Off|1|2|3|4|5",
"LevelOffHidden": "false",
"SelectorStyle": "1"}
Domoticz.Device(Name="Ventilateur Bureau", Unit=self.__UNIT_FAN3LEVEL, TypeName="Selector Switch", Image=7, Options=FanSpeedSelectorOptions3, Used=1).Create()
# Setpoint
Domoticz.Device(Name="Setpoint", Unit=self.__UNIT_SETP, Type=242, Subtype=1, Image=15, Used=1).Create()
# Room Temperature
Domoticz.Device(Name="Température Salon", Unit=self.__UNIT_TMP_ROOM, TypeName="Temperature", Used=1).Create()
# pellet counter
Domoticz.Device(Name="Quantite de kg utilisés", Unit=self.__UNIT_PELLET_QTUSED, Type=113, Subtype=0, Switchtype=3, Used=1).Create()
# Status code
Domoticz.Device(Name="Code Etat", Unit=self.__UNIT_STATUS, TypeName="Text", Used=0).Create()
# Status Label
Domoticz.Device(Name="Etat", Unit=self.__UNIT_STATUSLABEL, TypeName="Text", Used=1).Create()
# Timer On/Off switch
Domoticz.Device(Name="Timer", Unit=self.__UNIT_TIMER_ONOFF, TypeName="Switch",Image=1, Used=1).Create()
# TMP_PELLET_BACKW
Domoticz.Device(Name="Temperature Pellets", Unit=self.__UNIT_TMP_PELLET_BACKW, TypeName="Temperature", Used=0).Create()
# TMP_EXHAUST
Domoticz.Device(Name="Temperature Cheninée", Unit=self.__UNIT_TMP_EXHAUST, TypeName="Temperature", Used=0).Create()
# __UNIT_FAN_FAN1V
# __UNIT_FAN_FAN1RPM
Domoticz.Device(Name="FAN_FAN1RPM", Unit=self.__UNIT_FAN_FAN1RPM, Type=243, Subtype=7 , Used=1).Create()
# __UNIT_DP
Domoticz.Device(Name="DP", Unit=self.__UNIT_DP, Type=243, Subtype=0x1F , Used=1).Create()