name: zwavejs2mqtt base: core20 version: 'v7.1.0-SEL-CC' summary: Fully configurable Zwave to MQTT Gateway and Control Panel. description: "** Fully configurable Zwave to MQTT Gateway and Control Panel**\n\n- Zwave to Mqtt Gateway: Configure how nodes and nodes values are \n mapped between the two protocols\n- Secured: Supports HTTPS and users authentication\n- Control Panel UI: Directly control all your nodes and their \n values from the UI, some of control panel features:\n - Nodes management: check all nodes discovered in the z-wave \n network and manage their values\n - Firmware updates: update devices firmware, just select the \n controller action _Begin Firmware Update_ and upload the \n firmware file\n - Groups associations: add/edit nodes associations\n - Full zwave-js APIs support\n- Custom scenes management: create scenes and trigger them by using\n MQTT apis (also supports timeouts)\n- Log debug in UI: See debug logs directly from the UI\n- Store directory management: all files are stored in store folder, \n you can download/edit files inside this folder directly from the UI\n- Network graph: see how nodes are communicating with the controller,\n useful for diagnostics purposes\n- Home Assistant integration: you can use official Zwavejs integration \n by enabling zwavejs server or use integrated MQTT discovery integration\n\n**Channels in `latest`**\n\nThis is how we use the different of channels in the `latest` track, \nto give the user a chance to choose how often they want updates.\n\n- `latest/stable`: Latest version of the last *major* release. Will\n only update once per major release and most likely by the end of\n that release cycle. E.g when there is a new version `b.a.a` then\n version `a.b.c` will be will be available.\n\n- `latest/candidate`: Latest minor or patch release of latest major\n release. E.g when version `a.b.c` changes to `a.b.d` or `a.c.a`, then\n version `a.b.d` or `a.c.a` will be available. Consider this rolling\n releases.\n\n- `latest/edge` and `latest/edge/dev`: Every build (including tests) \\n might be pushed to these channels.\n" grade: stable confinement: strict license: MIT assumes: - command-chain architectures: - build-on: amd64 - build-on: arm64 - build-on: armhf apps: zwavejs2mqtt: daemon: simple restart-condition: always environment: STORE_DIR: $SNAP_DATA ZWAVEJS_EXTERNAL_CONFIG: $SNAP_DATA/.ext-config DAEMONIZED: 1 command: bin/yarn start command-chain: - helper/env-wrapper plugs: - network - network-bind - raw-usb - serial-port - hardware-observe - log-observe exec: environment: STORE_DIR: $SNAP_DATA ZWAVEJS_EXTERNAL_CONFIG: $SNAP_DATA/.ext-config command: bin/yarn start command-chain: - helper/env-wrapper plugs: - network - network-bind - raw-usb - serial-port - hardware-observe help: command: helper/env-wrapper --help enable: command: bin/daemonize disable: command: bin/de-daemonize restart: command: bin/restart layout: /usr/local/share/.cache/yarn: bind: $SNAP/.cache/yarn /usr/local/share/.yarn: symlink: $SNAP/lib/node_modules parts: zwavejs2mqtt: after: [nodejs, dependencies] plugin: dump source: https://github.com/zwave-js/zwavejs2mqtt.git #source-branch: "master" source-tag: "v7.1.0" #source-tag: $SNAPCRAFT_PROJECT_VERSION build-packages: - gcc - build-essential build-environment: - LD_LIBRARY_PATH: "${LD_LIBRARY_PATH}:$(dirname $(find ${SNAPCRAFT_STAGE} -name libonig.so.2 -print0))" - PATH: "${PATH}:${SNAPCRAFT_PART_BUILD}/bin" override-build: | # Used when testing an unreleased version of Z-wavejs # sed -i 's/"zwave-js".*$/"zwave-js"\: "10.0.5-0-pr-4836-ed10b36"/g' ${SNAPCRAFT_PART_BUILD}/package.json # Link the bundled yarn cd "${SNAPCRAFT_PART_BUILD}/bin" YARN="$(find ${SNAPCRAFT_PART_BUILD} -name yarn-*.cjs -print0)" ln -s "../${YARN:${#SNAPCRAFT_PART_BUILD}+1}" ./yarn chmod +x ./yarn cd "${SNAPCRAFT_PART_BUILD}" # Necessary for the remote build; sometimes. if [ -n "${http_proxy-}" ]; then yarn config set httpProxy "${http_proxy}" fi if [ -n "${https_proxy-}" ]; then yarn config set httpsProxy "${https_proxy}" fi yarn install yarn build:server yarn build:ui yarn remove $(cat "${SNAPCRAFT_PART_BUILD}/package.json" | jq -r '.devDependencies | keys | join(" ")') # Copy built version into install directory mkdir -p "${SNAPCRAFT_PART_INSTALL}/lib/" \ && cp --archive --link --no-dereference "${SNAPCRAFT_PART_BUILD}" \ "${SNAPCRAFT_PART_INSTALL}/lib/zwavejs2mqtt" # Link yarn in install directory mkdir "${SNAPCRAFT_PART_INSTALL}/bin" \ && cd "${SNAPCRAFT_PART_INSTALL}/bin" \ && ln -s "../lib/zwavejs2mqtt/bin/yarn" "yarn" filesets: zwavejs2mqtt-include: - bin - lib/zwavejs2mqtt/.git - lib/zwavejs2mqtt/*.md - lib/zwavejs2mqtt/bin/yarn - lib/zwavejs2mqtt/dist - lib/zwavejs2mqtt/hass - lib/zwavejs2mqtt/node_modules - lib/zwavejs2mqtt/server - lib/zwavejs2mqtt/snippets - lib/zwavejs2mqtt/package.json - lib/zwavejs2mqtt/views - lib/zwavejs2mqtt/.yarn - lib/zwavejs2mqtt/yarn.lock - lib/zwavejs2mqtt/.yarnrc.yml - lib/zwavejs2mqtt/LICENSE stage: - $zwavejs2mqtt-include dependencies: plugin: nil stage-snaps: - jq - yq stage-packages: - git - udev - iproute2 nodejs: plugin: dump source: - on amd64: https://nodejs.org/dist/v16.13.0/node-v16.13.0-linux-x64.tar.gz - on arm64: https://nodejs.org/dist/v16.13.0/node-v16.13.0-linux-arm64.tar.gz - on armhf: https://nodejs.org/dist/v16.13.0/node-v16.13.0-linux-armv7l.tar.gz stage-packages: - on armhf: - libatomic1 organize: '*.md': nodejs/ LICENSE: nodejs/ prime: - -include - -share - -lib/node_modules - -bin/npm - -bin/npx - -bin/corepack override-stage: | corepack disable snapcraftctl stage local: plugin: dump source: src/ stage-packages: - uuid organize: hooks: snap/hooks