snapcraft.yaml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. name: zwavejs2mqtt
  2. base: core20
  3. version: 'v1.0.5'
  4. summary: Fully configurable Zwave to MQTT Gateway and Control Panel.
  5. description: |
  6. - Configurable Zwave to Mqtt Gateway
  7. - Home Assistant integration (beta)
  8. - Zwave Control Panel:
  9. - Nodes management: check all nodes discovered in the z-wave network, send/receive nodes values updates directly from the UI and send action to the nodes and controller for diagnostics and network heal Custom Node naming and Location: Starting from v1.3.0 nodes name and location are stored in a JSON file named nodes.json. This because not all nodes have native support for naming and location features (#45). This change is back compatible with older versions of this package: on startup it will get all nodes names and location from the zwcfg_homeHEX.xml file (if present) and create the new nodes.json file based on that. This file can be imported/exported from the UI control panel with the import/export buttons placed on the top of nodes table, on the right of controller actions select.
  10. - Firmware updates: You are able to send firmware updates to your devices using the UI, just select the controller action Begin Firmware Update
  11. - Groups associations: create associations between nodes (also supports multi-instance associations, need to use last version of zwave-js)
  12. - Custom scenes management
  13. - Log debug in UI
  14. - Mesh graph showing devices neighbors
  15. grade: stable # must be 'stable' to release into candidate/stable channels
  16. confinement: strict # use 'strict' once you have the right plugs and slots
  17. apps:
  18. zwavejs2mqtt:
  19. daemon: simple
  20. restart-condition: always
  21. environment:
  22. STORE_DIR: $SNAP_DATA
  23. DAEMONIZED: 1
  24. command: usr/lib/zwavejs2mqtt/bin/www
  25. command-chain:
  26. - bin/env-wrapper
  27. plugs:
  28. - network
  29. - network-bind
  30. - raw-usb
  31. - serial-port
  32. exec:
  33. environment:
  34. STORE_DIR: $SNAP_DATA
  35. command: usr/lib/zwavejs2mqtt/bin/www
  36. command-chain:
  37. - bin/env-wrapper
  38. plugs:
  39. - network
  40. - network-bind
  41. - raw-usb
  42. - serial-port
  43. - hardware-observe
  44. help:
  45. command: bin/env-wrapper --help
  46. enable:
  47. command: bin/daemonize
  48. disable:
  49. command: bin/de-daemonize
  50. restart:
  51. command: bin/restart
  52. layout:
  53. /usr/src/app/store:
  54. bind: $SNAP_DATA/zwavejs2mqtt/store
  55. /usr/config/devices/index.json:
  56. bind-file: $SNAP_DATA/config/devices/index.json
  57. parts:
  58. zwavejs2mqtt:
  59. after: [nodejs]
  60. plugin: npm
  61. source: https://github.com/zwave-js/zwavejs2mqtt.git
  62. source-tag: $SNAPCRAFT_PROJECT_VERSION
  63. npm-node-version: '12.20.0'
  64. build-packages:
  65. - gcc
  66. - build-essential
  67. stage-snaps:
  68. - jq
  69. stage-packages:
  70. - git
  71. - udev
  72. override-build: |
  73. set -ex
  74. npm config set unsafe-perm true
  75. npm install detect-libc
  76. npm run build
  77. chmod +x $SNAPCRAFT_PART_BUILD/bin/www
  78. ln -s /usr/config/devices/index.json $SNAPCRAFT_PART_BUILD/node_modules/\@zwave-js/config/config/devices/index.json
  79. cp -rf $SNAPCRAFT_PART_BUILD $SNAPCRAFT_PART_INSTALL/usr/lib/zwavejs2mqtt
  80. stage:
  81. - -usr/lib/zwavejs2mqtt/kubernetes
  82. - -usr/lib/zwavejs2mqtt/kustomization.yaml
  83. - -usr/lib/zwavejs2mqtt/docker
  84. - -usr/lib/zwavejs2mqtt/.dockerignore
  85. - -usr/lib/zwavejs2mqtt/.markdown*
  86. nodejs:
  87. plugin: dump
  88. source:
  89. - on amd64: https://nodejs.org/dist/v12.20.0/node-v12.20.0-linux-x64.tar.gz
  90. - on arm64: https://nodejs.org/dist/v12.20.0/node-v12.20.0-linux-arm64.tar.gz
  91. - on armhf: https://nodejs.org/dist/v12.20.0/node-v12.20.0-linux-armv7l.tar.gz
  92. organize:
  93. '*.md' : nodejs/
  94. LICENSE : nodejs/
  95. prime:
  96. - -include
  97. - -share
  98. local:
  99. plugin: dump
  100. source: src/
  101. organize:
  102. hooks: snap/hooks