Add an HTTP view to dump the Z-Wave JS state#45452
Conversation
|
Since I just literally thought about the need for something similar. Could we perhaps generalize it a bit. Allowing asking for debug data for any config entry? |
|
@elupus not sure what part we can generalize, since the implementation is integration specific. I guess some "Support dump for debugging" feature could be added to a config entry as an option |
|
We need to rebase after the library bump. |
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
257cdb4 to
f40be71
Compare
|
That was the idea. Just making a hooking function same as async_setup_entry(entry), like async_dump_debug_info(entry) with a way to trigger from gui and get it's output. Keeping frontend code agnostic to which integration is dumping debug data. |
|
@elupus I like that idea. Let's do that in a new PR. I think that we should start allowing some flags to be set during async_setup_entry(hass, entry):
# Maybe something like this?
entry.set_features(entry.FEATURE_DEBUG_DUMP)
# Or maybe even just pass the function
entry.set_debug_dump_creator(async_create_dump) |
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
MartinHjelmare
left a comment
There was a problem hiding this comment.
@bramkragten go ahead and merge here when you're happy. 👍
Breaking change
Proposed change
Adds an HTTP view to download a dump of the Z-Wave JS server state. This will help people provide data for debugging.
Note, this is an HTTP POST endpoint that requires authentication and triggers a download. To make this work in the frontend, create a form that has as URL a signed path.
@bramkragten have we done an HTTP POST to download before, any code examples you can link?
Type of change
Example entry for
configuration.yaml:# Example configuration.yamlAdditional information
Checklist
black --fast homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: