Zwave JS UI updated it's requirements to include ENV variables. #43

Closed
opened 2025-11-20 04:42:54 -05:00 by saavagebueno · 10 comments
Owner

Originally created by @zmcnaney on GitHub (Nov 12, 2024).

Originally assigned to: @MickLesk on GitHub.

Please verify that you have read and understood the guidelines.

yes

A clear and concise description of the issue.

ZWave JS upgraded to version 14 of the node-zwave-js. When doing so, they changed the requirements and now require enviornment variables to be set and don't default. This change occured today with the update to tag 9.21.1. With the variables

The variables that must be set are ZWAVEJS_EXTERNAL_CONFIG and STORE_DIR. If those are not configured, all the devices lose their manufacturer, product, and product code in the UI. image

If you update the service entry being created in https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/zwave-js-ui.sh to include the variables - everything works as expected.

What settings are you currently utilizing?

Default Settings

Which Linux distribution are you employing?

Debian 12

If relevant, including screenshots or a code block can be helpful in clarifying the issue.

Old

[Unit]
  Description=zwave-js-ui
  Wants=network-online.target
  After=network-online.target
  [Service]
  User=root
  WorkingDirectory=/opt/zwave-js-ui
  ExecStart=/opt/zwave-js-ui/zwave-js-ui-linux
  [Install]
  WantedBy=multi-user.target

New

[Unit]
  Description=zwave-js-ui
  Wants=network-online.target
  After=network-online.target
  [Service]
  Environment="ZWAVEJS_EXTERNAL_CONFIG=/opt/zwave-js-ui/.config-db"
  Environment="STORE_DIR=/opt/zwave-js-ui/store"
  User=root
  WorkingDirectory=/opt/zwave-js-ui
  ExecStart=/opt/zwave-js-ui/zwave-js-ui-linux
  [Install]
  WantedBy=multi-user.target

Please provide detailed steps to reproduce the issue.

Update ZWAVE JS UI using the update script to version 9.21.0 or higher.

Originally created by @zmcnaney on GitHub (Nov 12, 2024). Originally assigned to: @MickLesk on GitHub. ### Please verify that you have read and understood the guidelines. yes ### A clear and concise description of the issue. ZWave JS upgraded to version 14 of the node-zwave-js. When doing so, they changed the requirements and now require enviornment variables to be set and don't default. This change occured today with the update to tag 9.21.1. With the variables The variables that must be set are ZWAVEJS_EXTERNAL_CONFIG and STORE_DIR. If those are not configured, all the devices lose their manufacturer, product, and product code in the UI. ![image](https://github.com/user-attachments/assets/aa074a4b-d67a-4c7e-92f5-5b946cbcc695) If you update the service entry being created in https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/zwave-js-ui.sh to include the variables - everything works as expected. ### What settings are you currently utilizing? Default Settings ### Which Linux distribution are you employing? Debian 12 ### If relevant, including screenshots or a code block can be helpful in clarifying the issue. Old ``` [Unit] Description=zwave-js-ui Wants=network-online.target After=network-online.target [Service] User=root WorkingDirectory=/opt/zwave-js-ui ExecStart=/opt/zwave-js-ui/zwave-js-ui-linux [Install] WantedBy=multi-user.target ``` New ``` [Unit] Description=zwave-js-ui Wants=network-online.target After=network-online.target [Service] Environment="ZWAVEJS_EXTERNAL_CONFIG=/opt/zwave-js-ui/.config-db" Environment="STORE_DIR=/opt/zwave-js-ui/store" User=root WorkingDirectory=/opt/zwave-js-ui ExecStart=/opt/zwave-js-ui/zwave-js-ui-linux [Install] WantedBy=multi-user.target ``` ### Please provide detailed steps to reproduce the issue. Update ZWAVE JS UI using the update script to version 9.21.0 or higher.
saavagebueno added the questionbug labels 2025-11-20 04:42:54 -05:00
Author
Owner

@newzealandpaul commented on GitHub (Nov 12, 2024):

Thanks for the detailed issue with a fix.

I don't have zwave devices so I cannot test this, @zmcnaney can you please try this script:

bash -c "$(wget -qLO - https://raw.githubusercontent.com/newzealandpaul/ProxmoxVE/refs/heads/newzealandpaul-zwave1/ct/zwave-js-ui.sh)"

And let me know if that works. This will create a new container just FYI.

@newzealandpaul commented on GitHub (Nov 12, 2024): Thanks for the detailed issue with a fix. I don't have zwave devices so I cannot test this, @zmcnaney can you please try this script: bash -c "$(wget -qLO - https://raw.githubusercontent.com/newzealandpaul/ProxmoxVE/refs/heads/newzealandpaul-zwave1/ct/zwave-js-ui.sh)" And let me know if that works. This will create a new container just FYI.
Author
Owner

@zmcnaney commented on GitHub (Nov 13, 2024):

So, your script didn't work, but I believe that's due to it referencing a direct link to the build.func file, not the raw.githubusercontent.com link.

Your script references: https://github.com/newzealandpaul/ProxmoxVE/blob/newzealandpaul-zwave1/misc/build.func

Should it reference: https://raw.githubusercontent.com/newzealandpaul/ProxmoxVE/refs/heads/newzealandpaul-zwave1/misc/build.func since you're trying to run it?

Also, should it be referencing a different repository?

From what I can tell there are a number of changes in the .func file, but the update_script() function matches what I changed locally to get it working. I didn't go through the .func file to compare the differences but I expect they're correct and used in a number of other places.

When I attemtped to run it as is, I got an error - again, likely due to the function file failing to load:

root@pve1:~# bash -c "$(wget -qLO - https://raw.githubusercontent.com/newzealandpaul/ProxmoxVE/refs/heads/newzealandpaul-zwave1/ct/zwave-js-ui.sh)"

 _____                                  _______    __  ______
/__  /_      ______ __   _____         / / ___/   / / / /  _/
  / /| | /| / / __ `/ | / / _ \   __  / /\__ \   / / / // /  
 / /_| |/ |/ / /_/ /| |/ /  __/  / /_/ /___/ /  / /_/ // /   
/____/__/|__/\__,_/ |___/\___/   \____//____/   \____/___/   
                                                             
Loading...
bash: line 27: variables: command not found
bash: line 28: color: command not found
bash: line 29: catch_errors: command not found
bash: line 96: start: command not found
bash: line 97: build_container: command not found
bash: line 98: description: command not found
Zwave-JS-UI should be reachable by going to the following URL.
         http://:8091 
@zmcnaney commented on GitHub (Nov 13, 2024): So, your script didn't work, but I believe that's due to it referencing a direct link to the build.func file, not the raw.githubusercontent.com link. Your script references: https://github.com/newzealandpaul/ProxmoxVE/blob/newzealandpaul-zwave1/misc/build.func Should it reference: https://raw.githubusercontent.com/newzealandpaul/ProxmoxVE/refs/heads/newzealandpaul-zwave1/misc/build.func since you're trying to run it? Also, should it be referencing a different repository? From what I can tell there are a number of changes in the .func file, but the update_script() function matches what I changed locally to get it working. I didn't go through the .func file to compare the differences but I expect they're correct and used in a number of other places. When I attemtped to run it as is, I got an error - again, likely due to the function file failing to load: ```root@pve1:~# bash -c "$(wget -qLO - https://raw.githubusercontent.com/newzealandpaul/ProxmoxVE/refs/heads/newzealandpaul-zwave1/ct/zwave-js-ui.sh)"``` ``` _____ _______ __ ______ /__ /_ ______ __ _____ / / ___/ / / / / _/ / /| | /| / / __ `/ | / / _ \ __ / /\__ \ / / / // / / /_| |/ |/ / /_/ /| |/ / __/ / /_/ /___/ / / /_/ // / /____/__/|__/\__,_/ |___/\___/ \____//____/ \____/___/ Loading... bash: line 27: variables: command not found bash: line 28: color: command not found bash: line 29: catch_errors: command not found bash: line 96: start: command not found bash: line 97: build_container: command not found bash: line 98: description: command not found Zwave-JS-UI should be reachable by going to the following URL. http://:8091 ```
Author
Owner

@newzealandpaul commented on GitHub (Nov 13, 2024):

Sorry about that, I will take another look at it. Thanks for trying it.

@newzealandpaul commented on GitHub (Nov 13, 2024): Sorry about that, I will take another look at it. Thanks for trying it.
Author
Owner

@MickLesk commented on GitHub (Nov 19, 2024):

I'm not sure what else might be missing here or if it affects us at all, but the file “/opt/zwave-js-ui/.config-db” does not exist.
There are also 2-3 other WARN's here. Unfortunately I don't have Zwave to test anything.

image
@MickLesk commented on GitHub (Nov 19, 2024): I'm not sure what else might be missing here or if it affects us at all, but the file “/opt/zwave-js-ui/.config-db” does not exist. There are also 2-3 other WARN's here. Unfortunately I don't have Zwave to test anything. <img width="669" alt="image" src="https://github.com/user-attachments/assets/ac16987a-b230-41fb-8fe4-ed0725979c41">
Author
Owner

@zmcnaney commented on GitHub (Nov 22, 2024):

“/opt/zwave-js-ui/.config-db" doesn't need to exist. It's created by the application upon boot. It's a new file.

The other warnings are because there is no devices yet. Otherwise that doesn't look like problematic warnings. Backups aren't enabled by default, I believe they have to be enabled later.

https://discord.com/channels/1111193770935996459/1111193771820974112/1306160295290470420

If you want to, you can see where they mentioend it's a "breaking" change in that it's now required for the SEA - but it's being set by default in their docker release image.

@zmcnaney commented on GitHub (Nov 22, 2024): “/opt/zwave-js-ui/.config-db" doesn't need to exist. It's created by the application upon boot. It's a new file. The other warnings are because there is no devices yet. Otherwise that doesn't look like problematic warnings. Backups aren't enabled by default, I believe they have to be enabled later. https://discord.com/channels/1111193770935996459/1111193771820974112/1306160295290470420 If you want to, you can see where they mentioend it's a "breaking" change in that it's now required for the SEA - but it's being set by default in their docker release image.
Author
Owner

@MickLesk commented on GitHub (Nov 22, 2024):

okay, then do you think, its enough, if we add an .env file and starting this with systemctl service? I think thats enough and helped @ homebox script

you can check it - then i push it into an PR:

cat <<EOF >/opt/.env
ZWAVEJS_EXTERNAL_CONFIG=/opt/zwave-js-ui/.config-db
STORE_DIR=/opt/zwave-js-ui/store
EOF
nano /etc/systemd/system/zwave-js-ui.service

Add follwing line after: ExecStart=/opt/zwave-js-ui/zwave-js-ui-linux

EnvironmentFile=/opt/.env

then:

systemctl daemon-reload
systemctl restart zwave-js-ui
@MickLesk commented on GitHub (Nov 22, 2024): okay, then do you think, its enough, if we add an .env file and starting this with systemctl service? I think thats enough and helped @ homebox script you can check it - then i push it into an PR: ```bash cat <<EOF >/opt/.env ZWAVEJS_EXTERNAL_CONFIG=/opt/zwave-js-ui/.config-db STORE_DIR=/opt/zwave-js-ui/store EOF ``` ```bash nano /etc/systemd/system/zwave-js-ui.service ``` Add follwing line **after**: ExecStart=/opt/zwave-js-ui/zwave-js-ui-linux ```bash EnvironmentFile=/opt/.env ``` then: ```bash systemctl daemon-reload systemctl restart zwave-js-ui ```
Author
Owner

@MickLesk commented on GitHub (Nov 22, 2024):

Would be great if you can test this, as I already said I don't have a ZWave device and could only fix it blindly 😄

@MickLesk commented on GitHub (Nov 22, 2024): Would be great if you can test this, as I already said I don't have a ZWave device and could only fix it blindly :smile:
Author
Owner

@zmcnaney commented on GitHub (Nov 25, 2024):

Sorry, I have been out for the weekend. I can test this later tonight! (Eastern Hours). However, that sounds like it would solve the problem.

@zmcnaney commented on GitHub (Nov 25, 2024): Sorry, I have been out for the weekend. I can test this later tonight! (Eastern Hours). However, that sounds like it would solve the problem.
Author
Owner

@zmcnaney commented on GitHub (Nov 26, 2024):

@MickLesk Works just fine. Thanks for the fix and good to know the preferred method in the future.

@zmcnaney commented on GitHub (Nov 26, 2024): @MickLesk Works just fine. Thanks for the fix and good to know the preferred method in the future.
Author
Owner

@MickLesk commented on GitHub (Nov 26, 2024):

Okay, then i create an PR with the fix asap 😄

@MickLesk commented on GitHub (Nov 26, 2024): Okay, then i create an PR with the fix asap :smile:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#43