Skip to content

Commit

Permalink
Add viessmannCustomX attributes to hvacThermostat
Browse files Browse the repository at this point in the history
From some gateway <-> TRV dumps there seem to be a lot of custom attributes, sadly we have no idea what they do as of now.
Add them as viessmannCustomX so we can play with them.
  • Loading branch information
sjorge committed Mar 1, 2021
1 parent d8bda14 commit 2a0128c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/zcl/definition/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1896,6 +1896,16 @@ const Cluster: {
SinopeBacklight: {ID: 1026, type: DataType.enum8, manufacturerCode: ManufacturerCode.Sinope},
StelproSystemMode: {ID: 0x401c, type: DataType.enum8},
StelproOutdoorTemp: {ID: 0x4001, type: DataType.int16, manufacturerCode: ManufacturerCode.Stelpro},
viessmannCustom0: {ID: 0x4000, type: DataType.enum8, manufacturerCode: ManufacturerCode.VIESSMAN_ELEKTRO},

This comment has been minimized.

Copy link
@sjorge

sjorge Mar 8, 2021

Author Owner

@Koenkk anything missing here (asside from the bad placeholder names until I figure out what they do)
I ran npm run build and they show up with as viessmannCustomX in fromZigbee and are usable in toZigbee, but they don't show up in the frontend under reporting. While StelproOutdoorTemp does...
I guess there is an issue where it does not honer the manufacturerCode maybe?

Also I noticed SinopeOccupancy, SinopeOccupancy, StelproSystemMode, and StelproOutdoorTemp do not follow the casing convention.

This comment has been minimized.

Copy link
@Koenkk

Koenkk Mar 8, 2021

You mean they don't show up after setting up reporting? If yes, can you share the data/database.db entry after doing that?

This comment has been minimized.

Copy link
@sjorge

sjorge Mar 8, 2021

Author Owner

I'm setting them up like this, that seems to work fine.

            // custom viessmann attributes
            const options = {manufacturerCode: 0x1221};
            await endpoint.configureReporting('hvacThermostat', [{attribute: 'viessmannCustom0', minimumReportInterval: 60,
                maximumReportInterval: 3600}], options);

I setup all the ones the gateway did, but it's basically just this repeated for each attribute...

{"id":78,"type":"EndDevice","ieeeAddr":"0x90fd9ffffe4a612f","nwkAddr":50657,"manufId":4641,"manufName":"Viessmann","powerSource":"Battery","modelId":"7637434","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":769,"inClusterList":[0,1,3,10,32,513,516,2821],"outClusterList":[0,25],"clusters":{"genBasic":{"attributes":{"modelId":"7637434","manufacturerName":"Viessmann","powerSource":3,"zclVersion":3,"appVersion":0,"stackVersion":8,"hwVersion":69,"dateCode":"20190705","swBuildId":"01.12.0008 02.00"}},"hvacThermostat":{"attributes":{"16384":1,"16386":-8000,"16391":0,"16392":0,"16402":0,"16416":1,"16459":0,"occupiedHeatingSetpoint":2100,"localTemp":2164,"systemMode":4,"pIHeatingDemand":2,"ctrlSeqeOfOper":2,"StelproOutdoorTemp":-8000,"viessmannCustom1":-8000,"viessmannCustom2":-8000,"viessmannCustom0":0}},"genIdentify":{"attributes":{"16384":0}},"genPowerCfg":{"attributes":{"batteryPercentageRemaining":136}},"hvacUserInterfaceCfg":{"attributes":{"keypadLockout":0}}},"binds":[{"cluster":0,"type":"endpoint","deviceIeeeAddress":"0x00124b00228120b5","endpointID":1},{"cluster":1,"type":"endpoint","deviceIeeeAddress":"0x00124b00228120b5","endpointID":1},{"cluster":3,"type":"endpoint","deviceIeeeAddress":"0x00124b00228120b5","endpointID":1},{"cluster":10,"type":"endpoint","deviceIeeeAddress":"0x00124b00228120b5","endpointID":1},{"cluster":32,"type":"endpoint","deviceIeeeAddress":"0x00124b00228120b5","endpointID":1},{"cluster":513,"type":"endpoint","deviceIeeeAddress":"0x00124b00228120b5","endpointID":1},{"cluster":516,"type":"endpoint","deviceIeeeAddress":"0x00124b00228120b5","endpointID":1}],"configuredReportings":[{"cluster":513,"attrId":28,"minRepIntval":"0","maxRepIntval":3600,"repChange":0},{"cluster":513,"attrId":16385,"minRepIntval":60,"maxRepIntval":900,"repChange":10},{"cluster":513,"attrId":16386,"minRepIntval":60,"maxRepIntval":900,"repChange":10},{"cluster":513,"attrId":16392,"minRepIntval":60,"maxRepIntval":65534,"repChange":1},{"cluster":513,"attrId":16402,"minRepIntval":0,"maxRepIntval":65534,"repChange":10},{"cluster":513,"attrId":16416,"minRepIntval":0,"maxRepIntval":65534,"repChange":1},{"cluster":513,"attrId":16459,"minRepIntval":0,"maxRepIntval":65534,"repChange":1},{"cluster":1,"attrId":33,"minRepIntval":60,"maxRepIntval":43200,"repChange":1},{"cluster":513,"attrId":0,"minRepIntval":90,"maxRepIntval":900,"repChange":10},{"cluster":513,"attrId":18,"minRepIntval":0,"maxRepIntval":65534,"repChange":1},{"cluster":513,"attrId":8,"minRepIntval":60,"maxRepIntval":3600,"repChange":1},{"cluster":513,"attrId":16384,"minRepIntval":60,"maxRepIntval":3600}],"meta":{}}},"appVersion":0,"stackVersion":8,"hwVersion":69,"dateCode":"20190705","swBuildId":"01.12.0008 02.00","zclVersion":3,"interviewCompleted":true,"meta":{"configured":2},"lastSeen":1615230668298}

Seems to have worked, but the frontend then as non selected and shows viessmannCustom1 as StelproOutdoorTemp.

This comment has been minimized.

Copy link
@Koenkk

Koenkk Mar 9, 2021

This indeed doesn't work when an ID is used multiple times, e.g viessmannCustom1 and StelproOutdoorTemp. Fixed this now in: https://github.com/Koenkk/zigbee-herdsman/pull/324/files

Also included your commit.

This comment has been minimized.

Copy link
@sjorge

sjorge via email Mar 9, 2021

Author Owner
viessmannCustom1: {ID: 0x4001, type: DataType.int16, manufacturerCode: ManufacturerCode.VIESSMAN_ELEKTRO},
viessmannCustom2: {ID: 0x4002, type: DataType.int16, manufacturerCode: ManufacturerCode.VIESSMAN_ELEKTRO},
viessmannCustom3: {ID: 0x4008, type: DataType.uint16, manufacturerCode: ManufacturerCode.VIESSMAN_ELEKTRO},
viessmannCustom4: {ID: 0x4009, type: DataType.uint16, manufacturerCode: ManufacturerCode.VIESSMAN_ELEKTRO},
viessmannCustom5: {ID: 0x4010, type: DataType.enum8, manufacturerCode: ManufacturerCode.VIESSMAN_ELEKTRO},
viessmannCustom6: {ID: 0x4011, type: DataType.uint16, manufacturerCode: ManufacturerCode.VIESSMAN_ELEKTRO},
viessmannCustom7: {ID: 0x4012, type: DataType.boolean, manufacturerCode: ManufacturerCode.VIESSMAN_ELEKTRO},
viessmannCustom8: {ID: 0x4020, type: DataType.uint8, manufacturerCode: ManufacturerCode.VIESSMAN_ELEKTRO},
viessmannCustom9: {ID: 0x404b, type: DataType.int8, manufacturerCode: ManufacturerCode.VIESSMAN_ELEKTRO},
},
commands: {
setpointRaiseLower: {
Expand Down Expand Up @@ -1989,6 +1999,7 @@ const Cluster: {
tempDisplayMode: {ID: 0, type: DataType.enum8},
keypadLockout: {ID: 1, type: DataType.enum8},
programmingVisibility: {ID: 2, type: DataType.enum8},
viessmannCustom10: {ID: 0x4000, type: DataType.enum8, manufacturerCode: ManufacturerCode.VIESSMAN_ELEKTRO},
},
commands: {
},
Expand Down

0 comments on commit 2a0128c

Please sign in to comment.