Skip to content

Commit

Permalink
Update herdsmann (#284)
Browse files Browse the repository at this point in the history
* Update herdsmann to x.15

* Update herdsman-converters to 15.132.0

* Update herdsman to 0.26.1

* Update herdsman-converters to v16.0.0

* Small Fixes

* Bump version

* Fix tests

* Updated config.yml

* jest junit

* review cicd config
  • Loading branch information
madchicken committed Aug 16, 2024
1 parent 3b1e427 commit 7ec25c2
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 86 deletions.
19 changes: 11 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
version: 2.1
orbs:
node: circleci/node@1.1.6
node: circleci/node@5.0.2
jobs:
build-and-test:
executor:
name: node/default
executor: node/default
steps:
- checkout
- node/with-cache:
steps:
- run: yarn install
- run: yarn test
- node/install-packages:
pkg-manager: yarn
- run:
command: yarn build
name: Build app
- run:
command: yarn test
name: Run tests
workflows:
build-and-test:
jobs:
- build-and-test
- build-and-test
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homebridge-zigbee-nt",
"version": "2.6.0",
"version": "2.6.1",
"description": "ZigBee New Technology Platform plugin for HomeBridge",
"main": "dist/index.js",
"targets": {
Expand Down Expand Up @@ -75,8 +75,8 @@
"uri-js": "4.4.1",
"winston": "3.3.3",
"ws": "^7.5.0",
"zigbee-herdsman": "0.14.117",
"zigbee-herdsman-converters": "14.0.694"
"zigbee-herdsman": "0.55.5",
"zigbee-herdsman-converters": "16.0.0"
},
"devDependencies": {
"@emotion/eslint-plugin": "^11.2.0",
Expand Down Expand Up @@ -108,6 +108,7 @@
"http-proxy-middleware": "^1.0.6",
"husky": "^7.0.4",
"jest": "^27.4.4",
"jest-junit": "^16.0.0",
"nock": "^12.0.2",
"node-forge": "^1.0.0",
"parcel": "2.6.2",
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/test.db
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{"id":1,"type":"EndDevice","ieeeAddr":"0x00158d00047b5957","nwkAddr":56475,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.weather","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":770,"inClusterList":[0,3,65535,1026,1027,1029],"outClusterList":[0,4,65535],"clusters":{"genBasic":{"attributes":{"65281":{"1":2995,"4":424,"5":5,"6":[0,1],"10":44475,"100":2984,"101":7225,"102":101438},"manufacturerName":"LUMI","powerSource":3,"zclVersion":1,"stackVersion":2,"modelId":"lumi.weather","appVersion":5,"dateCode":"20191205","swBuildId":"3000-0001"}},"msTemperatureMeasurement":{"attributes":{"measuredValue":2916}},"msRelativeHumidity":{"attributes":{"measuredValue":7635}},"msPressureMeasurement":{"attributes":{"16":10145,"20":-1,"measuredValue":1014}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":5,"stackVersion":2,"dateCode":"20191205","swBuildId":"3000-0001","zclVersion":1,"interviewCompleted":true,"meta":{},"lastSeen":1594221551831,"defaultSendRequestWhen":"immediate"}
{"id":2,"type":"EndDevice","ieeeAddr":"0x14b457fffec8d738","nwkAddr":21286,"manufId":4476,"manufName":"IKEA of Sweden","powerSource":"Battery","modelId":"TRADFRI on/off switch","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":2080,"inClusterList":[0,1,3,9,32,4096,64636],"outClusterList":[3,4,6,8,25,258,4096],"clusters":{"genBasic":{"attributes":{"modelId":"TRADFRI on/off switch","manufacturerName":"IKEA of Sweden","powerSource":3,"zclVersion":3,"appVersion":34,"stackVersion":98,"hwVersion":1,"dateCode":"20190410","swBuildId":"2.2.008"}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":34,"stackVersion":98,"hwVersion":1,"dateCode":"20190410","swBuildId":"2.2.008","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1593802671178,"defaultSendRequestWhen":"immediate"}
{"id":1,"type":"EndDevice","ieeeAddr":"0x00158d00047b5957","nwkAddr":56475,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.weather","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":770,"inClusterList":[0,3,65535,1026,1027,1029],"outClusterList":[0,4,65535],"clusters":{"genBasic":{"attributes":{"65281":{"1":2995,"4":424,"5":5,"6":[0,1],"10":44475,"100":2984,"101":7225,"102":101438},"manufacturerName":"LUMI","powerSource":3,"zclVersion":1,"stackVersion":2,"modelId":"lumi.weather","appVersion":5,"dateCode":"20191205","swBuildId":"3000-0001"}},"msTemperatureMeasurement":{"attributes":{"measuredValue":2916}},"msRelativeHumidity":{"attributes":{"measuredValue":7635}},"msPressureMeasurement":{"attributes":{"16":10145,"20":-1,"measuredValue":1014}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":5,"stackVersion":2,"dateCode":"20191205","swBuildId":"3000-0001","zclVersion":1,"interviewCompleted":true,"meta":{},"lastSeen":1594221551831}
{"id":2,"type":"EndDevice","ieeeAddr":"0x14b457fffec8d738","nwkAddr":21286,"manufId":4476,"manufName":"IKEA of Sweden","powerSource":"Battery","modelId":"TRADFRI on/off switch","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":2080,"inClusterList":[0,1,3,9,32,4096,64636],"outClusterList":[3,4,6,8,25,258,4096],"clusters":{"genBasic":{"attributes":{"modelId":"TRADFRI on/off switch","manufacturerName":"IKEA of Sweden","powerSource":3,"zclVersion":3,"appVersion":34,"stackVersion":98,"hwVersion":1,"dateCode":"20190410","swBuildId":"2.2.008"}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":34,"stackVersion":98,"hwVersion":1,"dateCode":"20190410","swBuildId":"2.2.008","zclVersion":3,"interviewCompleted":true,"meta":{},"lastSeen":1593802671178}
{"id":3,"type":"Router","ieeeAddr":"0x00124b001f79d7f0","nwkAddr":44526,"manufId":0,"manufName":"GLEDOPTO","powerSource":"Mains (single phase)","modelId":"GL-C-009","epList":[11,13],"endpoints":{"11":{"profId":49246,"epId":11,"devId":256,"inClusterList":[0,3,4,5,6,8,768],"outClusterList":[],"clusters":{"genBasic":{"attributes":{"modelId":"GL-C-009","manufacturerName":"GLEDOPTO","powerSource":1,"zclVersion":1,"appVersion":1,"stackVersion":2,"hwVersion":1,"dateCode":"20131206","swBuildId":"1.0.8"}}},"binds":[],"configuredReportings":[],"meta":{}},"13":{"profId":49246,"epId":13,"devId":256,"inClusterList":[4096],"outClusterList":[4096],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":1,"stackVersion":2,"hwVersion":1,"dateCode":"20131206","swBuildId":"1.0.8","zclVersion":1,"interviewCompleted":true,"meta":{},"lastSeen":1593706063667}
{"id":4,"type":"Router","ieeeAddr":"0x0017880106ef252d","nwkAddr":57101,"manufId":4107,"manufName":"Philips","powerSource":"Mains (single phase)","modelId":"LCT015","epList":[11,242],"endpoints":{"11":{"profId":49246,"epId":11,"devId":528,"inClusterList":[0,3,4,5,6,8,768,4096,64513],"outClusterList":[25],"clusters":{"genBasic":{"attributes":{"modelId":"LCT015","manufacturerName":"Philips","powerSource":1,"zclVersion":1,"appVersion":2,"stackVersion":1,"hwVersion":2,"dateCode":"20170908","swBuildId":"1.29.0_r21169"}},"genLevelCtrl":{"attributes":{"currentLevel":254}},"lightingColorCtrl":{"attributes":{"colorTemperature":467,"currentX":33655,"currentY":24190}},"genOnOff":{"attributes":{"onOff":1}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[33],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":2,"stackVersion":1,"hwVersion":2,"dateCode":"20170908","swBuildId":"1.29.0_r21169","zclVersion":1,"interviewCompleted":true,"meta":{},"lastSeen":1610475042638}
{"id":5,"type":"Router","ieeeAddr":"0x0017880108206ff6","nwkAddr":12051,"manufId":4107,"manufName":"Philips","powerSource":"Mains (single phase)","modelId":"LWA001","epList":[11,242],"endpoints":{"11":{"profId":260,"epId":11,"devId":257,"inClusterList":[0,3,4,5,6,8,4096,64514],"outClusterList":[25],"clusters":{"genBasic":{"attributes":{"modelId":"LWA001","manufacturerName":"Philips","powerSource":1,"zclVersion":2,"appVersion":2,"stackVersion":1,"hwVersion":1,"dateCode":"20200124","swBuildId":"1.65.9_hB3217DF4"}},"genLevelCtrl":{"attributes":{"currentLevel":254}},"genOnOff":{"attributes":{"onOff":0}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":2,"stackVersion":1,"hwVersion":1,"dateCode":"20200124","swBuildId":"1.65.9_hB3217DF4","zclVersion":2,"interviewCompleted":true,"meta":{},"lastSeen":1610401986901}
{"id":6,"type":"Router","ieeeAddr":"0x00158d01028e2d8d","nwkAddr":43733,"manufId":4151,"manufName":"LUMI","powerSource":"Battery","modelId":"lumi.lock.v1","epList":[1],"endpoints":{"1":{"profId":260,"epId":1,"devId":10,"inClusterList":[],"outClusterList":[],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"interviewCompleted":true,"meta":{},"lastSeen":null}
{"id":7,"type":"Group","groupID":901,"members":[],"meta":{}}
{"id":8,"type":"Router","ieeeAddr":"0x84fd27fffe6fab53","nwkAddr":34504,"manufId":4476,"manufName":"IKEA of Sweden","powerSource":"Mains (single phase)","modelId":"TRADFRI Signal Repeater","epList":[11,13],"endpoints":{"11":{"profId":49246,"epId":11,"devId":256,"inClusterList":[0,3,4,5,6,8,768],"outClusterList":[],"clusters":{"genBasic":{"attributes":{"modelId":"TRADFRI Signal Repeater","manufacturerName":"IKEA of Sweden","powerSource":1,"zclVersion":1,"appVersion":1,"stackVersion":2,"hwVersion":1,"dateCode":"20131206","swBuildId":"1.0.8"}}},"binds":[],"configuredReportings":[],"meta":{}},"13":{"profId":49246,"epId":13,"devId":256,"inClusterList":[4096],"outClusterList":[4096],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":1,"stackVersion":2,"hwVersion":1,"dateCode":"20131206","swBuildId":"1.0.8","zclVersion":1,"interviewCompleted":true,"meta":{},"lastSeen":1593706063667}
{"id":9,"type":"Router","ieeeAddr":"0x14b457fffe4f77ca","nwkAddr":6060,"manufId":4476,"manufName":"IKEA of Sweden","powerSource":"Mains (single phase)","modelId":"TRADFRI bulb E27 CWS opal 600lm","epList":[1],"endpoints":{"1":{"profId":49246,"epId":1,"devId":512,"inClusterList":[0,3,4,5,6,8,768,2821,4096],"outClusterList":[5,25,32,4096],"clusters":{"genBasic":{"attributes":{"modelId":"TRADFRI bulb E27 CWS opal 600lm","manufacturerName":"IKEA of Sweden","powerSource":1,"zclVersion":1,"appVersion":17,"stackVersion":87,"hwVersion":1,"dateCode":"20180410","swBuildId":"1.3.009"}},"lightingColorCtrl":{"attributes":{"colorCapabilities":8,"currentX":20103,"currentY":20743}},"genOnOff":{"attributes":{"onOff":0}},"genLevelCtrl":{"attributes":{"currentLevel":1}}},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":17,"stackVersion":87,"hwVersion":1,"dateCode":"20180410","swBuildId":"1.3.009","zclVersion":1,"interviewCompleted":true,"meta":{},"lastSeen":1631010389559}
{"id":10,"type":"EndDevice","ieeeAddr":"0x00124b0026b753c7","nwkAddr":49595,"manufId":4742,"manufName":"SONOFF","powerSource":"Mains (single phase)","modelId":"ZBMINI-L","epList":[11,242],"endpoints":{"11":{"profId":260,"epId":11,"devId":257,"inClusterList":[0,3,4,5,6,8,4096,64514],"outClusterList":[25],"clusters":{"genBasic":{"attributes":{"modelId":"LWA001","manufacturerName":"Philips","powerSource":1,"zclVersion":2,"appVersion":2,"stackVersion":1,"hwVersion":1,"dateCode":"20200124","swBuildId":"1.65.9_hB3217DF4"}},"genLevelCtrl":{"attributes":{"currentLevel":254}},"genOnOff":{"attributes":{"onOff":0}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":2,"stackVersion":1,"hwVersion":1,"dateCode":"20200124","swBuildId":"1.65.9_hB3217DF4","zclVersion":2,"interviewCompleted":true,"meta":{},"lastSeen":1610401986901,"defaultSendRequestWhen":"immediate"}
{"id":10,"type":"EndDevice","ieeeAddr":"0x00124b0026b753c7","nwkAddr":49595,"manufId":4742,"manufName":"SONOFF","powerSource":"Mains (single phase)","modelId":"ZBMINI-L","epList":[11,242],"endpoints":{"11":{"profId":260,"epId":11,"devId":257,"inClusterList":[0,3,4,5,6,8,4096,64514],"outClusterList":[25],"clusters":{"genBasic":{"attributes":{"modelId":"LWA001","manufacturerName":"Philips","powerSource":1,"zclVersion":2,"appVersion":2,"stackVersion":1,"hwVersion":1,"dateCode":"20200124","swBuildId":"1.65.9_hB3217DF4"}},"genLevelCtrl":{"attributes":{"currentLevel":254}},"genOnOff":{"attributes":{"onOff":0}}},"binds":[],"configuredReportings":[],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":2,"stackVersion":1,"hwVersion":1,"dateCode":"20200124","swBuildId":"1.65.9_hB3217DF4","zclVersion":2,"interviewCompleted":true,"meta":{},"lastSeen":1610401986901}
8 changes: 4 additions & 4 deletions src/web/ui/components/devices/device-bindings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { renderSpinner } from '../common';
import { CoordinatorResponse, CoordinatorService } from '../../actions/coordinator';
import { COORDINATOR_QUERY_KEY } from '../../coordinator';
import { GroupResponse, GroupsServices } from '../../actions/groups';
import { getCluster } from 'zigbee-herdsman/dist/zcl/utils';
import { getCluster } from 'zigbee-herdsman/dist/zspec/zcl/utils';

interface Props {
device: DeviceModel;
Expand Down Expand Up @@ -41,7 +41,7 @@ function DestDeviceSelect(props: DeviceSelectProps) {
const [value, setValue] = React.useState(props.selected)
return (
<Pane>
<SelectField label={`Cluster: ${props.cluster ? getCluster(props.cluster).name : 'all'}, destination device`} width="100%" value={value} onChange={event => setValue(event.target.value)}>
<SelectField label={`Cluster: ${props.cluster ? getCluster(props.cluster, null, null).name : 'all'}, destination device`} width="100%" value={value} onChange={event => setValue(event.target.value)}>
<option value="">None</option>
{props.allDevices.map(d => {
return (<option key={d.ieeeAddr} value={d.ieeeAddr}>{d.settings.friendlyName || d.ieeeAddr}</option>)
Expand All @@ -61,7 +61,7 @@ function DestGroupSelect(props: GroupSelectProps) {
const [value, setValue] = React.useState(props.selected)
return (
<Pane>
<SelectField label={`Cluster: ${props.cluster ? getCluster(props.cluster).name : 'all'}, destination group`} width="100%" value={value} onChange={event => setValue(parseInt(event.target.value))}>
<SelectField label={`Cluster: ${props.cluster ? getCluster(props.cluster, null, null).name : 'all'}, destination group`} width="100%" value={value} onChange={event => setValue(parseInt(event.target.value))}>
<option value="">None</option>
{props.allGroups.map(g => {
return (<option key={g.ID} value={g.ID}>{g.ID}</option>)
Expand Down Expand Up @@ -155,4 +155,4 @@ export function DeviceBindings(props: Props) {
)}
</Pane>
)
}
}
2 changes: 1 addition & 1 deletion src/zigbee/zig-bee-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ export class ZigBeeClient {

hasOTA(device: Device): boolean {
const zigBeeEntity = this.zigBee.resolveEntity(device);
return !!zigBeeEntity?.definition.ota;
return !!zigBeeEntity?.definition?.ota;
}

private async bindOrUnbind(
Expand Down
2 changes: 1 addition & 1 deletion src/zigbee/zigBee-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class ZigBeeController {
},
databasePath: config.databasePath,
databaseBackupPath: `${config.databasePath}.${Date.now()}`,
acceptJoiningDeviceHandler: (ieeeAddr) => this.acceptJoiningDeviceHandler(ieeeAddr),
acceptJoiningDeviceHandler: (ieeeAddr: string) => this.acceptJoiningDeviceHandler(ieeeAddr),
backupPath: null,
adapter: { disableLED: false },
network: {
Expand Down
Loading

0 comments on commit 7ec25c2

Please sign in to comment.