guim31
September 18, 2023, 4:25pm
1
Hello everyone,
I’d like to know whether it would be interesting and feasible to improve the display of devices in the Zigbee2MQTT integration.
Several points:
DEVICE section: the search field is cumbersome to use — basically I don’t have time to start typing before it already starts filtering the devices and it tends to skip some letters that I type… others may have noticed this too. It’s as if there needed to be a bit more « latency » between the typed letters and the filtering.
DISCOVERY section: would it be possible to hide by default the devices already added to Gladys? With, at worst, a button to show them (I think that exists somewhere… in the LAN integration, no?) because on my side, especially on mobile, the list is so long that it’s a chore to scroll so much.
In the same scrolling issue when you have many devices, is it possible to add a small arrow to go back to the top of the page with a single click?
Those are my suggestions — over to you, dear developers, to tell me whether this is feasible for you!
2 Likes
Thanks for the feedback! For the first point, that’s clearly something that could be a GitHub issue, it’s not normal
For the second point, I’d like to get more feedback to know if this view is shared by everyone
For the third point, why not!
At the moment I’m the only one on Zigbee since Alex became a dad, so it’ll probably be me who takes care of that.
1 Like
guim31
September 18, 2023, 5:17pm
3
Ok great, so we’re waiting for other feedback!
Totally agree with the points raised by @guim
Ok I think these points need to be reported somewhere otherwise they’ll be forgotten
My opinion:
For point 1, create a GitHub issue (in English, if possible with a video to reproduce the bug)
For point 2, GitHub issue as well. A short text will suffice
For point 3, GitHub issue as well.
Put a link in each issue to this thread for archiving.
I can’t guarantee it will be handled in the short term, I’m the only one working on the Zigbee integration right now (looking for a maintainer if anyone happens to see this…) and there are a lot of requests!
1 Like
guim31
September 20, 2023, 5:59pm
6
Okay, I’ll take care of it as soon as I have a bit of time.
guim31
September 21, 2023, 3:15pm
7
It’s done I hope I did it right!!
Thanks! I’d like you to put a link to this thread in each issue.
For videos, in general try to put them in mp4 format — it lets you view the video directly on GitHub instead of having to download it…
Hello, I did some development between two naps to filter the already existing z2m devices (cc @VonOx ).
The test image (will be ready in 1 hour) is atrovato:z2m-filter-devices.
Thanks for your feedback (I admit I did the development blindly, drawing inspiration from the lan-manager feature).
2 Likes
I have an error when loading the Zigbee Discovery page
actions.js:42 Uncaught TypeError: Cannot read properties of undefined (reading 'filter')
at Object.setDiscoveredDevices (actions.js:42:49)
at Object.setDiscoveredDevices (index.js:60:22)
at c.componentWillMount (index.js:22:16)
I think incomingDevices is empty at that moment
1 Like
Thanks @cicoub13 for your feedback!
I’m generating a new image with the fix for incomingDevices = undefined; it should take about 6 minutes.
The page loads.
On mobile, it’s a bit cramped.
The button doesn’t work. I’ll test it on a computer tomorrow to give you more details.
1 Like
props.js:153 Uncaught TypeError: this.l[(e.type + false)] is not a function
at HTMLInputElement.x (props.js:153:20)
I think you forgot to add setDiscoveredDevices to the props on line 50 in index.js
Actually, on the onClick I hadn’t added the toggle function, it’s fixed, as well as the display.
The corrected image is available on Docker.
Thanks again @cicoub13 <3
1 Like
Great, I’ve put the PR up for review.
2 Likes
@pierre-gilles the PR to add the filter for devices that have already been added:
master ← atrovato:z2m-filter-created-devices
ouvert 03:07PM - 03 Oct 23 UTC
### Pull Request check-list
To ensure your Pull Request can be accepted as fa… st as possible, make sure to review and check all of these items:
- [x] If your changes affects code, did your write the tests?
- [x] Are tests passing? (`npm test` on both front/server)
- [x] Is the linter passing? (`npm run eslint` on both front/server)
- [x] Did you run prettier? (`npm run prettier` on both front/server)
- [x] If you are adding a new features/services, did you run integration comparator? (`npm run compare-translations` on front)
- [x] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community ([french forum](https://community.gladysassistant.com/)/[english forum](https://en-community.gladysassistant.com/)) for testing before merging.
- [ ] If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
- [ ] If you are adding a new features/services which needs explanation, did you modify the user documentation? See [the GitHub repo](https://github.com/GladysAssistant/v4-website) and the [website](https://gladysassistant.com).
- [x] Did you add fake requests data for the demo mode (`front/src/config/demo.js`) so that the demo website is working without a backend? (if needed) See [https://demo.gladysassistant.com](https://demo.gladysassistant.com).
NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
### Description of change
Fixes #1890 and #1655
The following 2 issues are fixed:
2 Likes
Thanks for the PR!
It looks good to me, I just have one small comment:
master ← atrovato:z2m-filter-created-devices
ouvert 03:07PM - 03 Oct 23 UTC
### Pull Request check-list
To ensure your Pull Request can be accepted as fa… st as possible, make sure to review and check all of these items:
- [x] If your changes affects code, did your write the tests?
- [x] Are tests passing? (`npm test` on both front/server)
- [x] Is the linter passing? (`npm run eslint` on both front/server)
- [x] Did you run prettier? (`npm run prettier` on both front/server)
- [x] If you are adding a new features/services, did you run integration comparator? (`npm run compare-translations` on front)
- [x] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community ([french forum](https://community.gladysassistant.com/)/[english forum](https://en-community.gladysassistant.com/)) for testing before merging.
- [ ] If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
- [ ] If you are adding a new features/services which needs explanation, did you modify the user documentation? See [the GitHub repo](https://github.com/GladysAssistant/v4-website) and the [website](https://gladysassistant.com).
- [x] Did you add fake requests data for the demo mode (`front/src/config/demo.js`) so that the demo website is working without a backend? (if needed) See [https://demo.gladysassistant.com](https://demo.gladysassistant.com).
NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
### Description of change
Fixes #1890 and #1655
Thanks for the fixes @AlexTrovato !
Be sure to leave me a message on the forum next time when it’s fixed,
3 Likes