Commit Graph

41 Commits (7a1b05d166c65d8662a029f730ae16d41bbd312a)

Author SHA1 Message Date
Raman Gupta eeafa36abc
Add SmartStart provisioning support to zwave_js WS API (#59037)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-12-01 11:43:51 +01:00
Ville Skyttä 0de95610e3
Use http.HTTPStatus in components/[wxyz]* (#58330) 2021-10-24 17:25:01 +02:00
Raman Gupta 3c074ab865
Add additional properties to node_status WS cmd (#56927)
* Add node.zwave_plus_version to node_status WS command

* Add highest security class to node_status
2021-10-05 11:23:44 -04:00
Martin Hjelmare 50fffe48f8
Add zwave to zwave_js migration (#56159)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-09-29 08:55:27 -07:00
Raman Gupta e76ddb4b27
Add proper S2 support for adding zwave_js nodes (#56516)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-09-28 15:37:45 -07:00
Raman Gupta 113288cb1f
Fix zwave_js/node_state WS API command (#55979)
* Fix zwave_js/node_state WS API command

* Add negative assertion check to avoid regression

* Update tests/components/zwave_js/test_api.py

Co-authored-by: jan iversen <jancasacondor@gmail.com>

* use constant

Co-authored-by: jan iversen <jancasacondor@gmail.com>
2021-09-09 14:04:27 -04:00
Martin Hjelmare b088ce601c
Bump zwave-js-server-python to 0.30.0 (#55831) 2021-09-06 13:37:12 -07:00
Raman Gupta 11c6a33594
Bump zwave-js-server-python to 0.29.0 (#54931)
* Bump zwave-js-server-python to 0.29.0

* Cover secure flag true paths for add node WS commands
2021-08-20 14:55:58 -04:00
Raman Gupta 4b189bd8c5
Add zwave_js WS API commands to get statistics (#53393)
* Add zwave_js WS API commands to get statistics

* update function name

* move nested functions to top level functions
2021-07-26 11:59:16 -04:00
Raman Gupta 9ee7e55f10
Send initial status in zwave_js WS API cmds to subscribe to updates (#53386) 2021-07-23 10:34:49 -04:00
Raman Gupta e915f5be53
Handle FailedCommand exceptions in zwave_js WS API (#52461)
* Handle zwave-js errors in WS API

* Unsubscribe callbacks when zwave-js error is caught

* fix tests

* simplify unsub logic

* add tests

* add kwargs to be safe

* use existing msg format

* switch to generic failed command handling

* remove unneeded constant

* Update homeassistant/components/zwave_js/api.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/zwave_js/api.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* fix

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-07-13 00:13:43 -04:00
Raman Gupta 1e18011603
Adjust zwave_js WS API commands for logging (#51096) 2021-06-17 17:19:25 +02:00
Raman Gupta a250343c55
Support bitmask as a value (#51892)
* Support bitmask as a value

* Fix value schema and add tests

* fix test

* revert change to value schema
2021-06-16 15:53:45 -04:00
Raman Gupta 8705168fe6
Add zwave_js WS API cmds to get node state and version info (#51396)
* Add zwave_js view to retrieve a node's state

* remove typehints

* Make dump views require admin

* Add version info to node level dump

* Add back typehints

* switch from list to dict

* switch from dump node view to two WS API commands

* switch to snake
2021-06-14 16:43:51 -04:00
Raman Gupta 18e6ae8750
Add WS API commands to check for and install zwave_js config updates (#51106) 2021-05-26 08:39:08 -07:00
Raman Gupta 6d9b67ddb2
Add zwave_js heal node and network WS API commands (#51047)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-26 08:38:02 -07:00
Raman Gupta 5f7964b54b
Add firmware updates support for zwave_js (#50390)
* Add WS API support for zwave_js firmware updates

* move file to fixture

* review comments

* fix logic and test based on upstream changes

* handle failure scenario

* handle failure scenario

* fix tests and adjust message

* Update homeassistant/components/zwave_js/api.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* remove return from firmware upload view because client will raise an exception if not successful

* raise if user is not an admin

* raise bad request exception if firmware command fails

* incorporate #50923

* Add test for failed command

* add event name to messages

* change error to not found

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-05-26 02:57:00 -04:00
Raman Gupta 4875035ff8
Add zwave_js WS API commands for node ping and metadata (#51049) 2021-05-25 17:37:12 +02:00
Raman Gupta ebf6e3d985
Add zwave_js WS API commands to replace and remove failed nodes (#51018)
* Add zwave_js WS API commands to replace and remove failed nodes

* no need to manually add node to driver in test
2021-05-24 13:11:09 -04:00
Charles Garwood f33b45ec82
Add interview feedback for Z-Wave JS add node websocket (#50384)
* Add interview feedback for add node websocket

* cleanup leftover logging

* add tests

* test interview failed event

* fix event type

* include manufacturer & model from device registry

* update test
2021-05-14 09:47:09 -04:00
Martin Hjelmare 5ec09eab42
Move not loaded websocket constant to zwave_js (#50188) 2021-05-06 17:59:03 -07:00
Martin Hjelmare 38d7652176
Fix zwave_js websocket api KeyError on unloaded entry (#50154) 2021-05-06 16:43:14 +02:00
Raman Gupta 795fe18a90
Add additional zwave_js WS API commands for nodes (#49509)
* Add zwave_js WS API commands for node.refresh_values and node.refresh_cc_values

* remove guard since API will be used by frontend

* add missing validation

* use get in case node ID is wrong

* use decorator

* add additional coverage
2021-04-28 10:22:18 -04:00
Raman Gupta 99c5087c1e
Add WS API command to capture zwave_js logs from server (#49444)
* Add WS API commands to capture zwave_js logs from server

* register commands

* create a task

* Update homeassistant/components/zwave_js/api.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Update homeassistant/components/zwave_js/api.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* fix

* fixes and add test

* fix PR on rebase

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-04-21 07:37:35 -04:00
Charles Garwood cad281b326
Add subscription for Z-Wave JS node re-interview status (#49024)
* Add subscription for interview status

* update test

* forward stage completed event

* add additional test

* additional tests

* return earlier
2021-04-21 07:35:16 -04:00
Raman Gupta 6e22251e1d
Add support to enable/disable zwave_js data collection (#49440) 2021-04-20 21:40:54 -04:00
Raman Gupta cf16e651cf
Bump zwave_js dependency to 0.24.0 (#49445)
* Bump zwave_js dependency to 0.24.0

* fix bug in schema

* fix test
2021-04-20 23:44:26 +02:00
Raman Gupta ebb369e008
Add zwave_js WS API command to call node.refresh_info (#48564) 2021-04-02 00:35:13 +02:00
Raman Gupta dda9f957b6
Bump zwave-js-server-python to 0.23.0 to support zwave-js 7 (#48094)
* Bump zwave-js-server-python to 0.23.0 and update integration to support schema changes

* refactor notification evenets a bit

* fix tests and bug fixes

* additional changes due to new PR

* add command class and command name

* use new event names so we can retain event property names

* handle command status being returned from async_set_config_parameter

* bump dependency version

* adjust log message to be consistent

* disable pylint warning

* Update homeassistant/components/zwave_js/services.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* add test for awake node

* switch async_get_registry to async_get

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-29 16:28:55 -04:00
Raman Gupta 9fca001eed
Bump zwave-js-server-python to 0.22.0 (#48085) 2021-03-18 18:12:33 +01:00
Charles Garwood 13cd2f52d8
Return property_key in zwave_js get_config_parameters websocket (#47808) 2021-03-12 13:49:59 -05:00
Erik Montnemery b3fecb1c95
Update tests t-z to use async_get() instead of async_get_registry() (#47655) 2021-03-09 14:25:03 +01:00
Raman Gupta ee69e93b46
Bump zwave-js-server-python to 0.21.0 (#47408)
Co-authored-by: Tobias Sauerwein <cgtobi@users.noreply.github.com>
2021-03-04 16:15:50 -08:00
Charles Garwood d8633f94f6
Guard zwave_js missing nodes in websocket api (#47096) 2021-02-26 16:07:50 +01:00
Marcel van der Veldt 23cbd2dda3
Change Z-Wave JS discovery logic to adopt changes to DeviceClass (#46983)
Co-authored-by: raman325 <7243222+raman325@users.noreply.github.com>
2021-02-24 12:59:06 -08:00
Charles Garwood 3c35b6558b
Return states list from zwave_js get_config_parameters websocket if available (#46954) 2021-02-23 09:31:47 -05:00
Raman Gupta 1cecf229b9
Add zwave_js set_config_parameter WS API command (#46910)
* add WS API command

* handle error scenario better

* fixes and remove duplicate catch

* make elif statement more compact

* fix conflict

* switch to str(err)
2021-02-22 20:34:47 -05:00
Raman Gupta 20ccec9aab
Add zwave_js/get_log_config and zwave_js/update_log_config WS API commands (#46601)
* Add zwave_js.update_log_config service

* fix comment

* reduce lines

* move update_log_config from service to ws API call

* fix docstring

* Add zwave_js/get_log_config WS API command

* resolve stale comments

* remove transports since it will be removed from upstream PR

* add support to update all log config parameters since they could be useful outside of the UI for advanced users

* fix comment

* switch to lambda instead of single line validator

* fix rebase

* re-add ATTR_DOMAIN
2021-02-22 18:35:19 -05:00
Charles Garwood 04e07d8b2c
Add get_config_parameters websocket command to zwave_js (#46463)
* Add get_configuration_values websocket command to zwave_js

* Tweak return value

* Review comments and cleanup returned values

* Update test

* Rename to get_config_parameters

* Add get_configuration_values websocket command to zwave_js

* Rename to get_config_parameters

* fix test

* fix tests #2

* Add readable to metadata

Co-authored-by: Raman Gupta <7243222+raman325@users.noreply.github.com>
2021-02-22 17:03:38 -05:00
Raman Gupta 47dcd2bf32
Format zwave_js dump as json (#46792) 2021-02-19 18:44:15 -05:00
Paulus Schoutsen b9a525a9a7
Add an HTTP view to dump the Z-Wave JS state (#45452)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
2021-01-26 10:27:20 +01:00