Zigbee2MQTT
Zigbee to MQTT bridge get rid of your proprietary Zigbee bridges
- 1Copy the script below
- 2In HexOS, open Apps, find Zigbee2MQTT and choose Custom Install
- 3Paste, then press Install — full guide with screenshots
1{
12 "version": 5,
23 "script": {
4 "version": "0.1.0",
5 "changeLog": "Auto-generated draft from TrueNAS zigbee2mqtt 1.1.25"
6 },
37 "installation_questions": [
8 {
9 "question": "Topic",
10 "type": "text",
11 "key": "topic",
12 "required": true
13 },
14 {
15 "question": "Server",
16 "type": "text",
17 "key": "server",
18 "required": true
19 },
20 {
21 "question": "User",
22 "type": "text",
23 "key": "user",
24 "required": true
25 },
26 {
27 "question": "Password",
28 "type": "password",
29 "key": "password",
30 "required": true
31 },
32 {
33 "question": "Port",
34 "type": "text",
35 "key": "port",
36 "required": true
37 },
38 {
39 "question": "Adapter",
40 "type": "select",
41 "key": "adapter",
42 "required": true,
43 "options": [
44 {"text": "zstack", "value": "zstack"},
45 {"text": "deconz", "value": "deconz"},
46 {"text": "ember", "value": "ember"},
47 {"text": "zigate", "value": "zigate"},
48 {"text": "None", "value": ""}
49 ]
50 }
51 ],
52 "requirements": {
453 "locations": ["ApplicationsPerformance"],
554 "specifications": ["2CORE"],
655 "permissions": ["READ_WRITE_LOCATIONS"],
756 "ports": [30065]
57 },
858 "ensure_directories_exists": [
59 {"path": "$LOCATION(ApplicationsPerformance)"},
60 {"path": "$LOCATION(ApplicationsPerformance)/zigbee2mqtt"},
61 {
62 "path": "$LOCATION(ApplicationsPerformance)/zigbee2mqtt/data",
63 "owner": {"user": "apps"},
64 "snapshot": {"id": "data"}
65 }
66 ],
67 "app_values": {
68 "zigbee2mqtt": {
69 "mqtt": {
970 "topic": "$QUESTION(topic)",
1071 "server": "$QUESTION(server)",
1172 "user": "$QUESTION(user)",
1273 "password": "$QUESTION(password)"
74 },
75 "serial": {
1376 "port": "$QUESTION(port)",
1477 "adapter": "$QUESTION(adapter)"
78 }
79 },
80 "storage": {
1581 "data": "$HOST_PATH($LOCATION(ApplicationsPerformance)/zigbee2mqtt/data)"
82 },
83 "network": {
1684 "web_port": {"bind_mode": "published", "port_number": 30065}
85 },
1786 "resources": {"limits": {"cpus": 2, "memory": "$MEMORY(10%, 4096)"}}
87 }
88}
What this script does
Hover or tap a box to see the lines it explains.
-
Script format
Tells HexOS this is a version 5 install script, so it knows how to read the rest.
Line 2
-
Script revision
This copy of the script is revision 0.1.0. Latest change: “Auto-generated draft from TrueNAS zigbee2mqtt 1.1.25”.
Lines 3–6
-
Questions you'll be asked
Before installing, HexOS will ask you for: Topic, Server, User, Password, Port and Adapter. Your answers are slotted into the settings further down wherever you see $QUESTION(...).
Lines 7–51
-
Storage locations it needs
The app uses these HexOS storage locations: App storage (fast). If one isn't set up yet, HexOS will ask you to pick a place for it.
Line 53
-
Minimum hardware
Recommended minimum: 2 CPU cores.
Line 54
-
Permission to use your folders
Allows the app to read and write files inside the storage locations listed above — and nowhere else.
Line 55
-
Network ports
The app needs port 30065 to be free on your server. A port is like an apartment number for your server's address.
Line 56
-
Folders created on install
Creates the folders the app needs before it starts: App storage (fast) › zigbee2mqtt and App storage (fast) › zigbee2mqtt › data. Some folders are handed to a specific system user so the app is allowed to write to them. Folders marked “snapshot” are included in HexOS snapshots, so you can roll them back.
Lines 58–66
-
Your answer: topic
Filled in with what you typed for “topic” when you installed.
Line 70
-
Your answer: server
Filled in with what you typed for “server” when you installed.
Line 71
-
Your answer: user
Filled in with what you typed for “user” when you installed.
Line 72
-
Your answer: password
Filled in with what you typed for “password” when you installed.
Line 73
-
Your answer: port
Filled in with what you typed for “port” when you installed.
Line 76
-
Your answer: adapter
Filled in with what you typed for “adapter” when you installed.
Line 77
-
Where the app's main data is saved
Where the app's main data is saved on your server: App storage (fast) › zigbee2mqtt › data.
Line 81
-
Web port: 30065
The app's web page is published on port 30065. You don't need to remember it — clicking the app's card in HexOS takes you there.
Line 84
-
Resource limits
Caps how much of your server the app can use: 2 CPU cores and 10% of your server's memory, but never more than 4 GB. This keeps one busy app from slowing everything else down.
Line 86