Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: hass discovery #20

Merged
merged 48 commits into from
Nov 30, 2020
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
54afd1e
feat: bind target values to current
robertsLando Nov 20, 2020
1fc0cd6
feat(wip): hass discovery
robertsLando Nov 20, 2020
5fcb0d3
fix: better discovery support
robertsLando Nov 20, 2020
320ea8c
fix: hass socket apis
robertsLando Nov 20, 2020
7ac9560
fix: alarmType and meterType mapping
robertsLando Nov 20, 2020
ab85eca
fix: use commandClasses instead of hardCoded numbers
robertsLando Nov 20, 2020
63ba463
refactor: better docs on methods
robertsLando Nov 20, 2020
8680cc1
fix: converted some values in hass devices.js
robertsLando Nov 20, 2020
fd3a1fc
fix: converted some more values in devices.js
robertsLando Nov 20, 2020
54e6d37
feat: skip discovety flag
robertsLando Nov 23, 2020
36f757a
fix: lint issues
robertsLando Nov 23, 2020
bdf5d48
fix: ignore discovery
robertsLando Nov 23, 2020
e5234f2
fix: converted some more valueIds of devices.json
robertsLando Nov 23, 2020
e35dc78
fix: lint issues
robertsLando Nov 23, 2020
08bf31c
fix: push target value in values
robertsLando Nov 23, 2020
ec99ca8
fix: mode_map and fan _mode_map
robertsLando Nov 23, 2020
08f4c77
fix: allow empty json device
robertsLando Nov 23, 2020
0573aa4
fix: added ccSpecific to value meta
robertsLando Nov 24, 2020
5ed57f3
fix: setpoints valueIds
robertsLando Nov 24, 2020
335426b
fix: commandclasses import
robertsLando Nov 24, 2020
c2f87b5
fix: set defaiult endpoint to 0
robertsLando Nov 24, 2020
8788028
Merge branch 'master' into feat#hassDiscovery
robertsLando Nov 24, 2020
344b71f
feat: added ccSpecific
robertsLando Nov 24, 2020
7cd666c
fix: undefined in num2hex
robertsLando Nov 24, 2020
7c4a008
fix: use 5.4.1-alpha.0
robertsLando Nov 24, 2020
95a76af
fix: probably fix to map template bug
robertsLando Nov 24, 2020
85c03ae
fix: mode_map template creation
robertsLando Nov 24, 2020
5856e9c
fix: added brackets to keys
robertsLando Nov 24, 2020
b6b046a
fix: added comments
robertsLando Nov 24, 2020
e5aaada
fix: getMappedValuesTemplate check type of value
robertsLando Nov 24, 2020
f872e1f
fix: lint errors
robertsLando Nov 24, 2020
887ae73
docs: fixed hass docs
robertsLando Nov 24, 2020
208f58b
docs: migration and why zwavejs
robertsLando Nov 24, 2020
0bb517c
docs: bitmask and color values
robertsLando Nov 24, 2020
8c05460
Merge branch 'master' into feat#hassDiscovery
robertsLando Nov 24, 2020
52cbcdb
fix: lint issues
robertsLando Nov 24, 2020
709fb9c
docs: fix for review
robertsLando Nov 25, 2020
e39b6a8
fix: typo
robertsLando Nov 25, 2020
0ab98e7
fix: lint on readme
robertsLando Nov 25, 2020
69b7a46
docs: fix
robertsLando Nov 25, 2020
c23d27d
Merge branch 'master' into feat#hassDiscovery
robertsLando Nov 25, 2020
f639533
docs: added some points to why zwavejs section
robertsLando Nov 25, 2020
5442408
Merge branch 'master' into feat#hassDiscovery
robertsLando Nov 27, 2020
ac43537
fix: payload parse of modes when discovery is enabled
robertsLando Nov 27, 2020
815b497
Merge branch 'master' into feat#hassDiscovery
robertsLando Nov 27, 2020
ac4ed9a
fix: missing ccSpecific values (#35)
varet80 Nov 30, 2020
23f8cb3
fix: binary sensors, units and undefined labels (#36)
varet80 Nov 30, 2020
6c1c4ad
fix: lint issues
robertsLando Nov 30, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"wallaby.startAutomatically": true,
"[vue]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
284 changes: 134 additions & 150 deletions README.md

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,25 +91,25 @@ app.startSocket = function (server) {
socket.on('HASS_API', async function (data) {
switch (data.apiName) {
case 'delete':
gw.publishDiscovery(data.device, data.node_id, true, true)
gw.publishDiscovery(data.device, data.nodeId, true, true)
break
case 'discover':
gw.publishDiscovery(data.device, data.node_id, false, true)
gw.publishDiscovery(data.device, data.nodeId, false, true)
break
case 'rediscoverNode':
gw.rediscoverNode(data.node_id)
gw.rediscoverNode(data.nodeId)
break
case 'disableDiscovery':
gw.disableDiscovery(data.node_id)
gw.disableDiscovery(data.nodeId)
break
case 'update':
gw.zwave.updateDevice(data.device, data.node_id)
gw.zwave.updateDevice(data.device, data.nodeId)
break
case 'add':
gw.zwave.addDevice(data.device, data.node_id)
gw.zwave.addDevice(data.device, data.nodeId)
break
case 'store':
await gw.zwave.storeDevices(data.devices, data.node_id, data.remove)
await gw.zwave.storeDevices(data.devices, data.nodeId, data.remove)
break
}
})
Expand Down
22 changes: 16 additions & 6 deletions hass/configurations.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

module.exports = {
// Binary sensor https://www.home-assistant.io/components/binary_sensor.mqtt
binary_sensor_occupancy: {
binary_sensor_motion: {
type: 'binary_sensor',
object_id: 'occupancy',
object_id: 'motion',
discovery_payload: {
payload_on: true,
payload_off: false,
Expand Down Expand Up @@ -43,9 +43,9 @@ module.exports = {
device_class: 'lock'
}
},
binary_sensor_water_leak: {
binary_sensor_water: {
type: 'binary_sensor',
object_id: 'water_leak',
object_id: 'water',
discovery_payload: {
payload_on: true,
payload_off: false,
Expand Down Expand Up @@ -73,9 +73,19 @@ module.exports = {
device_class: 'gas'
}
},
binary_sensor_carbon_monoxide: {
binary_sensor_co: {
type: 'binary_sensor',
object_id: 'carbon_monoxide',
object_id: 'co',
discovery_payload: {
payload_on: true,
payload_off: false,
value_template: '{{ value_json.value }}',
device_class: 'safety'
}
},
binary_sensor_co2: {
type: 'binary_sensor',
object_id: 'co2',
discovery_payload: {
payload_on: true,
payload_off: false,
Expand Down
Loading