Package: eurotronic-cometblue
CometBlueeurotronic-cometblue is a library to communicate with your Eurotronic GmbH Comet Blue radiator controllers.The device supports up to four programmable schedules for each weekday. Longer periods can be set as holidays. There are
8 holiday slots available.This library depends onbleakand runs therefore on Linux, Windows and macOS (thanks
torikroe).Compatible devicesComet Blue radiator controllers are sold under different names:"Manufacturer"ModelTestedEurotronicComet Blue:heavy_check_mark:SygonixHT100 BT:heavy_check_mark:XavaxHama:grey_question:SilvercrestRT2000BT:grey_question:This library should work with all listed radiator controllers, but is only tested with a Sygonix HT100BT which is the
only one I own.Thanks to@FloSchmidtforcheckingthe Eurotronic Comet BlueIf your device is not listed here but looks similar (or you know it is a rebranded Comet Blue), or if you are able to
test this library with another device - let me know your results.InstallationJustpip install eurotronic-cometblueUsageImport the library and instantiate an object.Parameters are the device MAC-Address and the (optional) PIN. Depending on your connection quality you can specify a
longer or shorter discovery duration.Parameterrequired?default valuemacyesNonepinno0timeoutno2fromcometblueimportCometBlueblue=CometBlue(mac="00:00:00:00:00:00",pin=123456,timeout=2)orfromcometblueimportAsyncCometBlueblue=AsyncCometBlue(mac="00:00:00:00:00:00",pin=123456,timeout=2)for an asynchronous client.The following (synchronous) methods are available, for the asynchronous variants add_async:MethodParameterReturn Valueget_temperatureNonedictwith'currentTemp''manualTemp''targetTempLow''targetTempHigh''tempOffset''windowOpen''windowOpenMinutes'set_temperaturedictwith the same values asget_temperature. Not all values have to be set.Noneget_batteryNoneint- Battery value in percentget_datetimeNonedatetime- currently set date and time of the device. Used for schedulesset_datetimeAn optionaldatetime-object. The current date and time is used if the parameter is omitted.Noneget_weekdayAWeekday-Enum value eg.Weekday.MONDAYdictwithstart#andend#(# = 1-4) keys and the time as HH:mm formattedstrs as valuesset_weekdayAWeekday-Enum value eg.Weekday.MONDAYand adictcontainingstart#andend#(# = 1-4) as keys and HH:mm formattedstrs as valuesNoneget_holidayint1-8 to select the holiday perioddictwith'start':datetime'end':datetime'temperature':floatset_holidaydictwith the same values asget_holidays return value.Noneget_manual_modeNoneTrueif manual mode is set.Falseif the schedule is usedset_manual_modeboolean-Trueif manual mode should be used.Falseif the schedule should be usedNoneget_multipleRetrieves multiple values specified in alist. Valid values are:'temperature''battery''datetime''holiday#' # = 1-8 or'holidays' (retrieves holiday1-8)'monday''tuesday'etc...'weekdays' (retrieves all weekdays)The values as adictin the format defined by the appropriate methodsdiscovertimeout:int, timeout used for discoveryMAC-addresses of all discovery Comet Blue devices:warning: the device applies set values when the connection is closed, not directly after setting themExamplesUseCometBlueAsyncand[method_name]_asyncfor asynchronous handling.Instantiating and retrieving the current temperaturefromcometblueimportCometBlueblue=CometBlue("00:00:00:00:00:00",123456)blue.connect()temp=blue.get_temperature()print(temp)blue.disconnect()orfromcometblueimportCometBluewithCometBlue("00:00:00:00:00:00",123456)asblue:temp=blue.get_temperature()print(temp)results in{'currentTemp':24.5,'manualTemp':16.0,'targetTempLow':16.0,'targetTempHigh':20.0,'tempOffset':0.0,'windowOpen':True,'windowOpenMinutes':10}Setting a new scheduleSetting a new schedule for Mondays with two heating periods:Period 1 from 06:00 to 08:00Period 2 from 16:00 to 22:00All unmentioned periods (periods 3 and 4) will be disabled (start and end set to 00:00).Set periods will be consolidated, meaning setting only period 3 via this method will write period 1 and disable the
others.To use this schedule, make sure to disable manual mode.blue.set_weekday(Weekday.MONDAY,{"start1":"06:00","end1":"08:00","start2":"16:00","end2":"22:00"})blue.set_manual_mode(False)Setting a holidaySetting a holiday (slot 2) from 26th December 2020 18:00 till 5th January 2021 14:00 and keep the temperature at 16.5 °Cblue.set_holiday(2,{"start":datetime(2020,12,26,18),"end":datetime(2021,1,5,14),"temperature":16.5})Credits:Thorsten Tränker for his reverse engineering work
donehererikroefor the switch to bleak