snapcraft.yaml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. name: zwavejs2mqtt
  2. base: core20
  3. version: 'v2.4.0'
  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. assumes:
  18. - command-chain
  19. architectures:
  20. - build-on: amd64
  21. - build-on: arm64
  22. - build-on: armhf
  23. apps:
  24. zwavejs2mqtt:
  25. daemon: simple
  26. restart-condition: always
  27. environment:
  28. STORE_DIR: $SNAP_DATA
  29. DAEMONIZED: 1
  30. command: usr/lib/zwavejs2mqtt/bin/www
  31. command-chain:
  32. - helper/env-wrapper
  33. plugs:
  34. - network
  35. - network-bind
  36. - raw-usb
  37. - hardware-observe
  38. exec:
  39. environment:
  40. STORE_DIR: $SNAP_DATA
  41. command: usr/lib/zwavejs2mqtt/bin/www
  42. command-chain:
  43. - helper/env-wrapper
  44. plugs:
  45. - network
  46. - network-bind
  47. - raw-usb
  48. - hardware-observe
  49. help:
  50. command: helper/env-wrapper --help
  51. enable:
  52. command: bin/daemonize
  53. disable:
  54. command: bin/de-daemonize
  55. restart:
  56. command: bin/restart
  57. layout:
  58. $SNAP/usr/lib/zwavejs2mqtt/node_modules/@zwave-js/config/config:
  59. bind: $SNAP/usr/lib/zwavejs2mqtt/node_modules/@zwave-js/config/config
  60. parts:
  61. zwavejs2mqtt:
  62. after: [nodejs]
  63. plugin: npm
  64. source: https://github.com/zwave-js/zwavejs2mqtt.git
  65. source-tag: $SNAPCRAFT_PROJECT_VERSION
  66. npm-node-version: '12.20.0'
  67. build-packages:
  68. - gcc
  69. - build-essential
  70. stage-snaps:
  71. - jq
  72. stage-packages:
  73. - git
  74. - udev
  75. - rsync
  76. override-build: |
  77. set -ex
  78. npm config set unsafe-perm true
  79. npm install detect-libc
  80. npm run build
  81. chmod +x $SNAPCRAFT_PART_BUILD/bin/www
  82. cp -rf $SNAPCRAFT_PART_BUILD $SNAPCRAFT_PART_INSTALL/usr/lib/zwavejs2mqtt
  83. stage:
  84. - -usr/lib/zwavejs2mqtt/kubernetes
  85. - -usr/lib/zwavejs2mqtt/kustomization.yaml
  86. - -usr/lib/zwavejs2mqtt/docker
  87. - -usr/lib/zwavejs2mqtt/.dockerignore
  88. - -usr/lib/zwavejs2mqtt/.markdown*
  89. organize:
  90. usr/lib/zwavejs2mqtt/node_modules/@zwave-js/config/config: snap/zwave-js/config
  91. nodejs:
  92. plugin: dump
  93. source:
  94. - on amd64: https://nodejs.org/dist/v12.20.0/node-v12.20.0-linux-x64.tar.gz
  95. - on arm64: https://nodejs.org/dist/v12.20.0/node-v12.20.0-linux-arm64.tar.gz
  96. - on armhf: https://nodejs.org/dist/v12.20.0/node-v12.20.0-linux-armv7l.tar.gz
  97. stage-packages:
  98. - on armhf:
  99. - libatomic1
  100. organize:
  101. '*.md' : nodejs/
  102. LICENSE : nodejs/
  103. prime:
  104. - -include
  105. - -share
  106. local:
  107. plugin: dump
  108. source: src/
  109. stage-packages:
  110. - uuid
  111. organize:
  112. hooks: snap/hooks