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

Investigate why devicelist is sometimes empty #32

Closed
Dirnei opened this issue Oct 20, 2020 · 15 comments · Fixed by #65
Closed

Investigate why devicelist is sometimes empty #32

Dirnei opened this issue Oct 20, 2020 · 15 comments · Fixed by #65
Assignees
Labels
bug Something isn't working

Comments

@Dirnei
Copy link
Owner

Dirnei commented Oct 20, 2020

Quickfix: Send empty payload to "zigbee2mqtt/bridge/config/devices/get" to get a fresh device list

Sometimes a full-deploy helps also

@Dirnei Dirnei added the bug Something isn't working label Oct 20, 2020
@Dirnei Dirnei self-assigned this Oct 20, 2020
@Dirnei Dirnei added this to the Release 1.0 milestone Oct 20, 2020
@Dirnei Dirnei changed the title Investigate why devicelist im sometimes empty Investigate why devicelist is sometimes empty Oct 22, 2020
@Dirnei
Copy link
Owner Author

Dirnei commented Nov 6, 2020

I haven't seen it in a while. I guess I fixed it :)

@Dirnei Dirnei closed this as completed Nov 6, 2020
@Dirnei Dirnei reopened this Nov 6, 2020
@Dirnei
Copy link
Owner Author

Dirnei commented Nov 6, 2020

Just got a message in discord about that. MAYBE, jut MAYBE it isn't fixed.....

@Dirnei
Copy link
Owner Author

Dirnei commented Nov 10, 2020

You can configre a "base path" in the node-red settings. if it is configured it is not possible to request the device list

// By default, the Node-RED UI is available at http://localhost:1880/
// The following property can be used to specify a different root path.
// If set to false, this is disabled.
//httpAdminRoot: '/admin',
// httpAdminRoot: '/nodered',

@Dirnei
Copy link
Owner Author

Dirnei commented Nov 24, 2020

My last comment was fixed with #47. I can't see any problems anymore and @Andreas-Huber also reported no problems while testing it with his new devices I will close it once and for all :)

@Dirnei Dirnei closed this as completed Nov 24, 2020
@Andreas-Huber
Copy link
Collaborator

Did not notice it until now.

@Andreas-Huber
Copy link
Collaborator

Happened to me again with version 0.16.0 and 0.16.1 on my production system.

Steps to Reproduce the Bug:

  1. Stop Node-Red (in my case docker-compose down)

  2. Create a new flow (not entirely sure if that is necessary)

  3. Add generic lamp node (I have new not configured devices in my network)

  4. Edit the node and select a bridge.

  5. Click on the add new Zigbee device edit button

  6. Click on the devices dropdown. Device list is empty

  7. Somehow a device is selected anyway.

  8. Deploy

  9. Open device config again. The dropdown is filled.

Screencast
https://drive.google.com/file/d/1r4H_LgeblRvBTsk5FZnGZz3AtlbQKYX5/view?usp=sharing

@Andreas-Huber Andreas-Huber reopened this Nov 29, 2020
@QBANIN
Copy link

QBANIN commented Nov 30, 2020

I'm having this issue with last HA + Z2M Edge.

@Dirnei
Copy link
Owner Author

Dirnei commented Nov 30, 2020

@QBANIN I guess with HA you mean HomeAssistant? If so, there is currently no support for that. You have to open the nodered directly to get it working.

@QBANIN
Copy link

QBANIN commented Nov 30, 2020

@QBANIN I guess with HA you mean HomeAssistant? If so, there is currently no support for that. You have to open the nodered directly to get it working.

Ouch.. that's too bad :(

@Dirnei
Copy link
Owner Author

Dirnei commented Dec 1, 2020

It's not really that bad ;) You only have to open a new tab a open the node-red, basically change the port in the url to 1880. When we have time to install HA and this plugin we will have a look how we can integrate it but for now you have to do this small workaround. sorry :(

@jchmielniak
Copy link

I'm having the same problem (nodered 1.2.6, z2m 1.6.2) The other Node "node-red-contrib-zigbee2mqtt" shows the device list properly.

@Dirnei
Copy link
Owner Author

Dirnei commented Dec 11, 2020

Did you mean z2m version 1.16.2? 1.6.2 seems a bit old. Did the Quickfix from the first message worked for you?

@jchmielniak
Copy link

Sure it was a typo 1.16.2. Quickfix doesn't work.
I log following mqtt messages on node-red start:
2020-12-11T14:11:41+0100 zigbee2mqtt/bridge/config/groups 1607692301699
2020-12-11T14:11:41+0100 zigbee2mqtt/bridge/config/devices/get 1607692301700
2020-12-11T14:11:41+0100 zigbee2mqtt/bridge/log {"message":[{"ID":10,"devices":[],"friendly_name":"empty","optimistic":true}, ... ,"type":"groups"}
2020-12-11T14:11:41+0100 zigbee2mqtt/bridge/config/devices [{"dateCode":"20201113","friendly_name":"Coordinator","ieeeAddr":"0x00124b0021600033","lastSeen":1607692301703, ...

@jchmielniak
Copy link

It is a bug in z2m 1.16.2. Fixed in dev branch.
API is going to chang. Could you please implement a new API as well.
Koenkk/zigbee2mqtt#5289

@Dirnei
Copy link
Owner Author

Dirnei commented Dec 20, 2020

Thanks for the hint! I will have a look

@Dirnei Dirnei modified the milestones: Release 1.0, Release 0.18.0 Jan 8, 2021
@Dirnei Dirnei linked a pull request Jan 9, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants