Skip to content

Commit

Permalink
adding scan file; adding sw version to support conditionals for scan
Browse files Browse the repository at this point in the history
  • Loading branch information
pvyleta committed Mar 24, 2024
1 parent a777ea9 commit 62a0f46
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ebusd-scan/scan.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# type (r;w;u;1-9),class,name,comment,QQ,ZZ,PBSB,ID,field,part (m;s),type / templates,divider / values,unit,comment,field,part (m;s),type / templates,divider / values,unit,comment,field,part (m;s),type / templates,divider / values,unit,comment,field,part (m;s),type / templates,divider / values,unit,comment,field,part (m;s),type / templates,divider / values,unit,comment,field,part (m;s),type / templates,divider / values,unit,comment,field,part (m;s),type / templates,divider / values,unit,comment,field,part (m;s),type / templates,divider / values,unit,comment
## This ebus config is based on information from decompiled BCSServiceTool/Common/AppliaceCommon.cs
r,scan,id,Scan ID,,,0704,ff,MF,,UCH,0x06=Dungs;0x0f=FH Ostfalia;0x10=TEM;0x11=Lamberti;0x14=CEB;0x15=Landis-Staefa;0x16=FERRO;0x17=MONDIAL;0x18=Wikon;0x19=Wolf;0x20=RAWE;0x30=Satronic;0x40=ENCON;0x50=Kromschröder;0x60=Eberle;0x65=EBV;0x75=Grässlin;0x85=ebm-papst;0x95=SIG;0xa5=Theben;0xa7=Thermowatt;0xb5=Vaillant;0xc0=Toby;0xc5=Weishaupt;0xfd=ebusd.eu,,,brand,,UCH,8=Brink;161=Viessmann,,,model,,UCH,2=Allure;17=Excellent400;18=Sky300;19=ConstantRPM400;20=Sky150;21=Excellent180;22=Excellent300;23=CWLTower300;24=RenoventElan300;25=Excellent450;26=Sky200;32=Elan10;33=Elan16;34=Elan25;35=DecentralAir70;37=Nather300;38=Elan4;45=CWLF250;46=CWLF350;80=Flair325;81=Flair225;82=Flair450;83=Flair600;84=Flair300;85=Flair400;86=Flair200;128=MultiRoomCtrl;145=AirControl;192=Valve;193=CO2Sensor,,,,,IGN,,,,version,,BI0:3,0=None;1=Basic;2=Plus,,,device_type,,bi0:3,1=Heater;2=Ventilation;3=Actuator;4=Sensor;5=Controller;6=Cooling;7=VentilationCombi,,,,,IGN,,,,SW,,PIN,,,,HW,,PIN,,,
r,scan,SoftwareVersion,S1.08.18 0001,,,4022,00,,,IGN:1,,,,sw_major,,UCH,,,,sw_dot,,IGN:1,,,,sw_minor,,UIN,,,,sw_patch,,UIN,,,,,,IGN:5,,,,
6 changes: 5 additions & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
# TODO Simplify output by joining params + sensors in one file per version range
# TODO add names of parameters parsed through the stringresources.de-de.xaml
# TODO go thorugh AirControlEBusCommands and figure out if flowMode can be set on the wall controller rather than on the unit
# TODO consider to hack the scanning through scan with different ID. the units might be willing to accept it
# TODO make sure all output files have only LF and not CRLF

# This script expects BCSServiceTool via JetBrains DotPeak in its child folder


device_to_name_current_to_name_param_dict = device_to_name_current_to_name_param()
cmd_dict, cmd_bytes_dict = get_commands_dict()
device_to_name_param_to_converter = find_converters()
Expand Down Expand Up @@ -78,6 +79,9 @@

previous_parameters = parameters


print("len(device_models): " + str())

print("len(device_models): " + str(len(device_models)))
print("unused_converters_set: " + str(unused_converters_set))
print("sensors_without_converters_set: " + str(len(sensors_without_converters_set)))
Expand Down
1 change: 0 additions & 1 deletion src/out.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ def csv_from_parameters(parameters: list[Parameter], device_name: str, is_plus:
return file_str


# TODO add conditionals for plus
# TODO add conditionals for dipswitch value
# TODO figure out what to do with the versions... for start, we can include the latest version, but then we will need to add some conditionals on current sw version -> which would be worth to add to scan, scan can likely be added per device
def csv_known_device(sensors: list[Sensor], device_name: str, parameters: list[Parameter], is_plus: bool, slave_address: str = '') -> str:
Expand Down
17 changes: 17 additions & 0 deletions src/sw_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from model import BaseObject

# This class represents the Brink SoftwareVersion string represented as three integers
class SWVersionBrinkEbusd(BaseObject):
def __init__(self, major: int, minor: int, patch: int):
self.major = major
self.minor = minor
self.patch = patch

def sw_version_int_to_ebusd(sw_version_int: int) -> SWVersionBrinkEbusd:
sw_version_str = str(sw_version_int)
sw_version_bytes = bytes(sw_version_str,'UTF-8')
major = int.from_bytes(sw_version_bytes[0:1], "big")
minor = int.from_bytes(sw_version_bytes[1:3], "big")
patch = int.from_bytes(sw_version_bytes[3:5], "big")

return SWVersionBrinkEbusd(major, minor, patch)

0 comments on commit 62a0f46

Please sign in to comment.