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

Priority route not visible with "star" #3492

Closed
Beer17HWAM opened this issue Dec 20, 2023 · 66 comments
Closed

Priority route not visible with "star" #3492

Beer17HWAM opened this issue Dec 20, 2023 · 66 comments
Assignees
Labels
question Further information is requested

Comments

@Beer17HWAM
Copy link

My friend and I both have the same zwave-js-ui 9.3.2 version. I can see all the Priority routes, visible with "star" in the network graph. My friend isn't seeing any "star".

How is that posible?

@Beer17HWAM Beer17HWAM added the question Further information is requested label Dec 20, 2023
@robertsLando
Copy link
Member

But did you set that priority route manually or what?
Firstly switch to latest 9.6.0

@Beer17HWAM
Copy link
Author

Beer17HWAM commented Dec 20, 2023

Yes we both added routes manually. We did mainly the same things. Just add some priority routes. I use those to have a more stable situation. Since I use priority routes it works better. My friend want those too but isn't seeing any "stars". I know that there are newer versions but my friend hasn't got any "stars" for months now. And I do. The only difference is I run a separate docker and my friend has the hassio addon. Very strange, we use the same version and the same hardware zwave dongle.

@robertsLando
Copy link
Member

This explanation alone doesn't give me enough context to tell you what's going on there, what I can think is that for some reason he did a route update and the priority route has been removed and it became a LWR route instead

@Beer17HWAM
Copy link
Author

No, the priority route isn't removed. It's still there. But I see all small "stars" in the network graph view but in his network graph no starts are visible.

@robertsLando
Copy link
Member

I dunno, if your friend has such issue he should upload nodes json so I can give it a look

@Beer17HWAM
Copy link
Author

nodes_dump.json
This is his json export.

@robertsLando
Copy link
Member

The only one with an application route set is node 22 and it has:

"lwr": {
        "protocolDataRate": 2,
        "repeaters": [
          3
        ]
 },
"nlwr": {
        "protocolDataRate": 3,
        "repeaters": [],
        "rssi": -54,
        "repeaterRSSI": []
},
"applicationRoute": {
      "repeaters": [],
      "routeSpeed": 3
    },

Does he see the star on the link from 22 to the controller? I have a feel if he doesn't it could be because the nlwr mathes the application route

@Beer17HWAM
Copy link
Author

Beer17HWAM commented Dec 21, 2023

He doesn't see any star, no stars at all. And when he sets more priority routes they don't stick. After he sets a priority route and leave the popup and click the node again the priority route is gone. Only on node 22 it stays. Setting priority routes is not going well and he doesn't see any star.

Nodes with priority:
Node 3, 5, 32, 46, 31, 45, 22 (also return)

@robertsLando
Copy link
Member

I need driver logs that show the tries of setting a priority route

@jeroen84s
Copy link

zwave-js-ui-store.zip
Are those the correct log file? If not, can you explain how to create the driver logs?

@robertsLando
Copy link
Member

Them are correct. Thanks. I need to ask @AlCalzone to review them. Anywat could you also try to upgrade to latest ? 9.6.0?

@robertsLando
Copy link
Member

I only see a successfull try in logs and no fail:

2023-12-21T10:31:23.954Z DRIVER » [REQ] [SetPriorityRoute]
                                    node ID:     24
                                    repeaters:   none
                                    route speed: 100k
2023-12-21T10:31:23.957Z SERIAL « [ACK]                                                                   (0x06)
2023-12-21T10:31:23.964Z SERIAL « 0x01050193180171                                                     (7 bytes)
2023-12-21T10:31:23.966Z SERIAL » [ACK]                                                                   (0x06)
2023-12-21T10:31:23.970Z DRIVER « [RES] [SetPriorityRoute]
                                    success: true
2023-12-21T10:31:23.975Z CNTRLR   Retrieving priority route to node 24...
2023-12-21T10:31:23.981Z SERIAL » 0x010400921871                                                       (6 bytes)
2023-12-21T10:31:23.983Z DRIVER » [REQ] [GetPriorityRoute]
                                    node ID: 24
2023-12-21T10:31:23.986Z SERIAL « [ACK]                                                                   (0x06)
2023-12-21T10:31:23.988Z SERIAL « 0x010a0192181000000000036d                                          (12 bytes)
2023-12-21T10:31:23.990Z SERIAL » [ACK]                                                                   (0x06)
2023-12-21T10:31:23.992Z DRIVER « [RES] [GetPriorityRoute]
                                    node ID:     24
                                    route kind:  Application
                                    repeaters:   none
                                    route speed: 100k

@jeroen84s
Copy link

I can't update to a newer version, because I use hassio addon

@Beer17HWAM
Copy link
Author

Again, in my opinion it has nothing to do with the version because I use the same version in a docker. I see beautiful "stars". :-)

@AlCalzone
Copy link
Member

AlCalzone commented Dec 21, 2023

@robertsLando how are the stars drawn? Are they text/emojis or SVG?

Can we somehow confirm whether Z-UI sees the routes as priority routes? In other words, can we confirm whether this is a pure display issue?

@Beer17HWAM
Copy link
Author

Beer17HWAM commented Dec 21, 2023

networkgraph
See jpg. This is mine. The network graph of @jeroen84s isn't displaying any "star".

@Beer17HWAM
Copy link
Author

@robertsLando how are the stars drawn? Are they text/emojis or SVG?

Can we somehow confirm whether Z-UI sees the routes as priority routes? In other words, can we confirm whether this is a pure display issue?

It's not only a display issue. The priority routes @jeroen84s is making are not saved. He can set a route (and back) but after closing the node and opening the node the priority route is gone.

@AlCalzone
Copy link
Member

Ok I'll try to look at the logs tonight. Maybe I'll see something.

@robertsLando
Copy link
Member

@AlCalzone them are SVG and as said I don't see any error in the logs he uploaded above. Anyway IMO this seems to me a display issue but I may be wrong

@Beer17HWAM
Copy link
Author

Not only a display issue!! I already said:
The priority routes @jeroen84s is making are not saved. He can set a route (and back) but after closing the node and opening the node the priority route is gone.

@AlCalzone
Copy link
Member

@jeroen84s is showing that several communication attempts succeed using the priority routes, e.g.

2023-12-21T10:30:05.168Z DRIVER « [REQ] [SendData]
                                    callback id:            1
                                    transmit status:        OK, took 90 ms
                                    routing attempts:       3
                                    protocol & route speed: Z-Wave, 40 kbit/s
                                    routing scheme:         Priority Route
                                    ACK RSSI:               -68 dBm
                                    ACK channel no.:        1
                                    TX channel no.:         1

and that several priority routes are known, e.g.:

2023-12-21T10:30:07.275Z DRIVER « [RES] [GetPriorityRoute]
                                    node ID:     46
                                    route kind:  Application
                                    repeaters:   5
                                    route speed: 100k

Also, assigning the routes works too:

2023-12-21T10:31:23.940Z CNTRLR   Setting priority route to node 24...
2023-12-21T10:31:23.944Z DRIVER   all queues busy
2023-12-21T10:31:23.952Z SERIAL » 0x010900931800000000037e                                            (11 bytes)
2023-12-21T10:31:23.954Z DRIVER » [REQ] [SetPriorityRoute]
                                    node ID:     24
                                    repeaters:   none
                                    route speed: 100k
2023-12-21T10:31:23.957Z SERIAL « [ACK]                                                                   (0x06)
2023-12-21T10:31:23.964Z SERIAL « 0x01050193180171                                                     (7 bytes)
2023-12-21T10:31:23.966Z SERIAL » [ACK]                                                                   (0x06)
2023-12-21T10:31:23.970Z DRIVER « [RES] [SetPriorityRoute]
                                    success: true
2023-12-21T10:31:23.975Z CNTRLR   Retrieving priority route to node 24...
2023-12-21T10:31:23.981Z SERIAL » 0x010400921871                                                       (6 bytes)
2023-12-21T10:31:23.983Z DRIVER » [REQ] [GetPriorityRoute]
                                    node ID: 24
2023-12-21T10:31:23.986Z SERIAL « [ACK]                                                                   (0x06)
2023-12-21T10:31:23.988Z SERIAL « 0x010a0192181000000000036d                                          (12 bytes)
2023-12-21T10:31:23.990Z SERIAL » [ACK]                                                                   (0x06)
2023-12-21T10:31:23.992Z DRIVER « [RES] [GetPriorityRoute]
                                    node ID:     24
                                    route kind:  Application
                                    repeaters:   none
                                    route speed: 100k

What might be happening: This node is a sleeping node, so there are no route statistics yet to draw the route. I think Z-UI isn't handling the case where there are no statistics, but the priority route is known. @robertsLando

@Beer17HWAM
Copy link
Author

Beer17HWAM commented Dec 22, 2023

@AlCalzone Can you see the routes back also? The route back isn't shown in the Node when you open it again in the Network Graph after setting it. And why do I see "stars" and @jeroen84s not? I think it's all very strange. Why this complete other reaction than I have. I also set priority routes with sleeping Nodes. Also setting prio routes between Nodes with power (non sleeping Nodes) isn't displaying any "star". Am I the only one with visible "stars"? Lucky guy I am. ;-)

@AlCalzone
Copy link
Member

The routes back require communication with the node, which doesn't happen when the node is asleep. It has to be woken up for the return route to actually be saved.
After that there has been communication with the node, which means there are routing statistics, which means this display bug in Z-Wave JS UI probably won't trigger anymore for that node.

As for routes to and from powered nodes: I need to see a log of that.

@jeroen84s
Copy link

Your vision about the sleeping nodes looks correct. Both wall plugs has a priority route (also return route). And the star in is not showing up in the graphic

@Beer17HWAM
Copy link
Author

Your vision about the sleeping nodes looks correct. Both wall plugs has a priority route (also return route). And the star in is not showing up in the graphic

No stars. Maybe with Christmas. Just wait. ;-)

@nmpu
Copy link

nmpu commented Jan 23, 2024

I've never seen stars either. I saw the legend, but never knew what I was missing. My priority routes are still there when I drill down and the diagram has changed-- just no stars. All my priority routes involve powered devices. This is one of those features that is probably rarely used or missed. BTW, the 'Node properties' popup gets clipped by Daniel's donation footer. The [Ping] button is obscured.

@robertsLando
Copy link
Member

@nmpu can't you just drag the dialog a bit higher? it can be moved where you want

@nmpu
Copy link

nmpu commented Jan 23, 2024

@robertsLando yes, that does work. I'm not used to web dialogs being moveable. Pretty fancy. Once you know there's a [Ping] button, you can blindly click on the top edge.

Should I also see stars in the app? I don't.

The 'Show return routes' and 'Show priority routes' checkboxes get disabled in the global view, but are enabled in the node view. However, the previous state remains when grayed. Is that how it's supposed to work?

@Beer17HWAM
Copy link
Author

The https://github.com/zwave-js/zwave-js-ui version has a star:

WhatsApp Image 2024-01-23 at 15 51 50

@robertsLando
Copy link
Member

robertsLando commented Jan 23, 2024

star should be in dist/star.svg and that dist folder is only created during the build step. I think it is there but for some reason the addon proxy doens't serve it correctly

Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label

@github-actions github-actions bot added the Stale label Apr 23, 2024
@Beer17HWAM
Copy link
Author

It's still not fixed in the latest release. Please fix.

@robertsLando
Copy link
Member

I sincerly have no clue how to fix this as it's working on all my instances

@Beer17HWAM
Copy link
Author

The star.svg is not available in his environment. How can he fix this?

@robertsLando
Copy link
Member

I cannot help so much as the error seems to be on addon side, only @frenck could help here and I already tagged him

@github-actions github-actions bot removed the Stale label Apr 24, 2024
Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label

@github-actions github-actions bot added the Stale label Jul 23, 2024
@Beer17HWAM
Copy link
Author

Please help us with this problem. @frenck isn't available???

@AlCalzone
Copy link
Member

@Beer17HWAM
Copy link
Author

Beer17HWAM commented Jul 23, 2024

I give up. My separate zwave docker is working fine. I see stars. My friend doesn't have stars in his HA zwave addon. If the developers of zwave and the HA addon are not able to fix it, I give up.
See hassio-addons/addon-zwave-js-ui#692

@TheDK
Copy link

TheDK commented Jul 23, 2024

@frenck says:

The file is simply not available!!

Correct, as the path is not right. The X-External-Path isn't honored by upstream. That is not an add-on issue.

../Frenck

I can confirm that it does not work when packaged as the HA Add-on.

@robertsLando
Copy link
Member

robertsLando commented Jul 23, 2024

The star svg path is passed in this way:

starSvg: '/star.svg',

Same for the logo you see in top left corner:

src="/logo.svg"

The logo is working and the star is not.

So sincerly I dunno why the star request doesn't respect the X-External-Path. It could be that for some reason vis-network is loading it in a wrong way?

@AlCalzone
Copy link
Member

Looks like vis-network is doing the request itself. Can you filter/redirect it using the service worker maybe?

@hugo-leij
Copy link

it will be great if we can see the stars :-)

@Beer17HWAM
Copy link
Author

I guess nobody is going to fix this for the HA addin users. Just run zwave separate in a docker and you can see beautiful stars. :-)

@github-actions github-actions bot removed the Stale label Jul 24, 2024
@robertsLando
Copy link
Member

@AlCalzone I was looking at vis-network code, wondering if using https://github.com/visjs/vis-network/blob/master/lib/network/CachedImage.js#L7 cold work. Let me try

@robertsLando
Copy link
Member

Works 🎉

@Beer17HWAM
Copy link
Author

Works!!! Thanks!!
image

@hugo-leij
Copy link

Nice! i'm still waiting for an update via hassio add-on

@Beer17HWAM
Copy link
Author

Beer17HWAM commented Aug 6, 2024 via email

@hugo-leij
Copy link

I see! uhm, the update is not (yet) available via home assistant. Hopefully, tomorrow

@hugo-leij
Copy link

Yea!
IMG_5878

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

7 participants