iobroker.megad 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/auto-merge.yml +37 -0
- package/.github/dependabot.yml +28 -0
- package/.github/workflows/automerge-dependabot.yml +37 -0
- package/.github/workflows/test-and-release.yml +113 -0
- package/.mocharc.json +5 -0
- package/CHANGELOG_OLD.md +97 -0
- package/LICENSE +1 -1
- package/README.md +143 -225
- package/admin/index.html +109 -140
- package/admin/words.js +91 -0
- package/io-package.json +35 -5
- package/lib/usedResources.js +32 -0
- package/main.js +107 -67
- package/package.json +38 -38
- package/.npmignore +0 -4
- package/lib/utils.js +0 -60
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Auto-merge configuration for Dependabot PRs
|
|
2
|
+
# This file configures which dependency updates should be merged automatically.
|
|
3
|
+
|
|
4
|
+
# Configure here which dependency updates should be merged automatically.
|
|
5
|
+
# The recommended configuration is the following:
|
|
6
|
+
- match:
|
|
7
|
+
# Merge patch updates for production dependencies
|
|
8
|
+
dependency_type: production
|
|
9
|
+
update_type: 'semver:patch'
|
|
10
|
+
- match:
|
|
11
|
+
# Merge patch and minor updates for development dependencies
|
|
12
|
+
dependency_type: development
|
|
13
|
+
update_type: 'semver:minor'
|
|
14
|
+
|
|
15
|
+
# The syntax is based on the legacy dependabot v1 automerged_updates syntax, see:
|
|
16
|
+
# https://dependabot.com/docs/config-file/#automerged_updates
|
|
17
|
+
|
|
18
|
+
# IMPORTANT: Hierarchical matching applies:
|
|
19
|
+
# - semver:patch → only patch updates (e.g., 1.0.0 → 1.0.1)
|
|
20
|
+
# - semver:minor → patch AND minor updates (e.g., 1.0.0 → 1.0.1 or 1.0.0 → 1.1.0)
|
|
21
|
+
# - semver:major → patch, minor, AND major updates (all version changes)
|
|
22
|
+
|
|
23
|
+
# Additional examples:
|
|
24
|
+
|
|
25
|
+
# Allow all patch updates only (both production and development):
|
|
26
|
+
# - match:
|
|
27
|
+
# update_type: 'semver:patch'
|
|
28
|
+
|
|
29
|
+
# Allow patch and minor updates for development dependencies:
|
|
30
|
+
# - match:
|
|
31
|
+
# dependency_type: development
|
|
32
|
+
# update_type: 'semver:minor'
|
|
33
|
+
|
|
34
|
+
# Allow all updates (patch, minor, and major) for development dependencies:
|
|
35
|
+
# - match:
|
|
36
|
+
# dependency_type: development
|
|
37
|
+
# update_type: 'semver:major'
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Dependabot configuration
|
|
2
|
+
|
|
3
|
+
version: 2
|
|
4
|
+
updates:
|
|
5
|
+
|
|
6
|
+
- package-ecosystem: 'github-actions'
|
|
7
|
+
directory: '/'
|
|
8
|
+
schedule:
|
|
9
|
+
interval: 'cron'
|
|
10
|
+
timezone: 'Europe/Berlin'
|
|
11
|
+
cronjob: '44 2 6 * *'
|
|
12
|
+
open-pull-requests-limit: 15
|
|
13
|
+
|
|
14
|
+
- package-ecosystem: 'npm'
|
|
15
|
+
directories:
|
|
16
|
+
- '**/*'
|
|
17
|
+
schedule:
|
|
18
|
+
interval: 'cron'
|
|
19
|
+
timezone: 'Europe/Berlin'
|
|
20
|
+
cronjob: '44 2 6 * *'
|
|
21
|
+
open-pull-requests-limit: 20
|
|
22
|
+
versioning-strategy: 'increase'
|
|
23
|
+
cooldown:
|
|
24
|
+
default-days: 7
|
|
25
|
+
ignore:
|
|
26
|
+
- dependency-name: '@types/node'
|
|
27
|
+
update-types:
|
|
28
|
+
- 'version-update:semver-major'
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Workflow for auto-merging Dependabot PRs
|
|
2
|
+
# This workflow uses the action-automerge-dependabot action to automatically merge
|
|
3
|
+
# Dependabot PRs based on the rules defined in .github/auto-merge.yml
|
|
4
|
+
|
|
5
|
+
name: Auto-Merge Dependabot PRs
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
# Trigger when a PR is opened or updated
|
|
9
|
+
# Normally pull_request gets a GITHUB_TOKEN with read access only.
|
|
10
|
+
# But workflows run for PRs created by dependabot get write access anyway,
|
|
11
|
+
# so the less secure 'pull_request_target' trigger is not required.
|
|
12
|
+
pull_request:
|
|
13
|
+
types: [opened, synchronize, reopened]
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
auto-merge:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
# Only run if actor is dependabot
|
|
19
|
+
if: github.actor == 'dependabot[bot]'
|
|
20
|
+
|
|
21
|
+
permissions:
|
|
22
|
+
contents: write
|
|
23
|
+
pull-requests: write
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- name: Auto-merge Dependabot PRs
|
|
27
|
+
uses: iobroker-bot-orga/action-automerge-dependabot@v1
|
|
28
|
+
with:
|
|
29
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
30
|
+
# Optional: Path to your auto-merge configuration file
|
|
31
|
+
# config-file-path: '.github/auto-merge.yml'
|
|
32
|
+
# Optional: Merge method (merge, squash, or rebase)
|
|
33
|
+
# merge-method: 'squash'
|
|
34
|
+
# Optional: Wait for other checks to complete
|
|
35
|
+
# wait-for-checks: 'true'
|
|
36
|
+
# Optional: Maximum time to wait for checks in seconds (default: 3600)
|
|
37
|
+
# max-wait-time: '3600'
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# This is a composition of lint and test scripts
|
|
2
|
+
# Make sure to update this file along with the others
|
|
3
|
+
|
|
4
|
+
name: Test and Release
|
|
5
|
+
|
|
6
|
+
# Run this job on all pushes and pull requests
|
|
7
|
+
# as well as tags with a semantic version
|
|
8
|
+
on:
|
|
9
|
+
push:
|
|
10
|
+
branches:
|
|
11
|
+
- '*'
|
|
12
|
+
tags:
|
|
13
|
+
# normal versions
|
|
14
|
+
- "v?[0-9]+.[0-9]+.[0-9]+"
|
|
15
|
+
# pre-releases
|
|
16
|
+
- "v?[0-9]+.[0-9]+.[0-9]+-**"
|
|
17
|
+
pull_request: {}
|
|
18
|
+
|
|
19
|
+
# Cancel previous PR/branch runs when a new commit is pushed
|
|
20
|
+
concurrency:
|
|
21
|
+
group: ${{ github.ref }}
|
|
22
|
+
cancel-in-progress: true
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
# Performs quick checks before the expensive test runs
|
|
26
|
+
check-and-lint:
|
|
27
|
+
if: contains(github.event.head_commit.message, '[skip ci]') == false
|
|
28
|
+
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
|
|
31
|
+
strategy:
|
|
32
|
+
matrix:
|
|
33
|
+
node-version: [22.x]
|
|
34
|
+
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v7
|
|
37
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
38
|
+
uses: actions/setup-node@v4
|
|
39
|
+
with:
|
|
40
|
+
node-version: ${{ matrix.node-version }}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
- name: Install Dependencies
|
|
44
|
+
run: npm install
|
|
45
|
+
|
|
46
|
+
# - name: Perform a type check
|
|
47
|
+
# run: npm run check:ts
|
|
48
|
+
# env:
|
|
49
|
+
# CI: true
|
|
50
|
+
# - name: Lint TypeScript code
|
|
51
|
+
# run: npm run lint
|
|
52
|
+
# - name: Test package files
|
|
53
|
+
# run: npm run test:package
|
|
54
|
+
|
|
55
|
+
# Runs adapter tests on all supported node versions and OSes
|
|
56
|
+
adapter-tests:
|
|
57
|
+
if: contains(github.event.head_commit.message, '[skip ci]') == false
|
|
58
|
+
|
|
59
|
+
needs: [check-and-lint]
|
|
60
|
+
|
|
61
|
+
runs-on: ${{ matrix.os }}
|
|
62
|
+
strategy:
|
|
63
|
+
matrix:
|
|
64
|
+
node-version: [22.x, 24.x, 26.x]
|
|
65
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
66
|
+
|
|
67
|
+
steps:
|
|
68
|
+
- uses: actions/checkout@v7
|
|
69
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
70
|
+
uses: actions/setup-node@v4
|
|
71
|
+
with:
|
|
72
|
+
node-version: ${{ matrix.node-version }}
|
|
73
|
+
|
|
74
|
+
- name: Install Dependencies
|
|
75
|
+
run: npm install
|
|
76
|
+
|
|
77
|
+
- name: Run local tests
|
|
78
|
+
run: npm test
|
|
79
|
+
# - name: Run unit tests
|
|
80
|
+
# run: npm run test:unit
|
|
81
|
+
# - name: Run integration tests # (linux/osx)
|
|
82
|
+
# if: startsWith(runner.OS, 'windows') == false
|
|
83
|
+
# run: DEBUG=testing:* npm run test:integration
|
|
84
|
+
# - name: Run integration tests # (windows)
|
|
85
|
+
# if: startsWith(runner.OS, 'windows')
|
|
86
|
+
# run: set DEBUG=testing:* & npm run test:integration
|
|
87
|
+
|
|
88
|
+
# Deploys the final package to NPM (Trusted Publishing, no NPM_TOKEN)
|
|
89
|
+
deploy:
|
|
90
|
+
needs: [check-and-lint, adapter-tests]
|
|
91
|
+
|
|
92
|
+
# Trigger this step only when a commit on any branch is tagged with a version number
|
|
93
|
+
if: |
|
|
94
|
+
contains(github.event.head_commit.message, '[skip ci]') == false &&
|
|
95
|
+
github.event_name == 'push' &&
|
|
96
|
+
startsWith(github.ref, 'refs/tags/v')
|
|
97
|
+
|
|
98
|
+
runs-on: ubuntu-latest
|
|
99
|
+
|
|
100
|
+
# Write permissions are required to create Github releases, id-token for npm trusted publishing
|
|
101
|
+
permissions:
|
|
102
|
+
contents: write
|
|
103
|
+
id-token: write
|
|
104
|
+
|
|
105
|
+
steps:
|
|
106
|
+
- uses: ioBroker/testing-action-deploy@v1
|
|
107
|
+
with:
|
|
108
|
+
node-version: '22.x'
|
|
109
|
+
install-command: 'npm install'
|
|
110
|
+
# no package-lock.json in this repository, so there is nothing to cache
|
|
111
|
+
package-cache: 'false'
|
|
112
|
+
build: false
|
|
113
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
package/.mocharc.json
ADDED
package/CHANGELOG_OLD.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Older changes
|
|
2
|
+
## 1.1.0 (2015-12-17)
|
|
3
|
+
* (bluefox) add counter for digital inputs
|
|
4
|
+
* (bluefox) fix the internal temperature sensor monitor
|
|
5
|
+
|
|
6
|
+
## 1.0.6 (2015-11-13)
|
|
7
|
+
* (bluefox) fix short press
|
|
8
|
+
|
|
9
|
+
## 1.0.5 (2015-11-11)
|
|
10
|
+
* (bluefox) fix small errors
|
|
11
|
+
|
|
12
|
+
## 1.0.4 (2015-11-10)
|
|
13
|
+
* (bluefox) fix errors after optimization
|
|
14
|
+
|
|
15
|
+
## 1.0.3 (2015-11-06)
|
|
16
|
+
* (bluefox) if 1wire sensor not connected, NA value will be received
|
|
17
|
+
|
|
18
|
+
## 1.0.2 (2015-11-04)
|
|
19
|
+
* (bluefox) fix using of more than one megad
|
|
20
|
+
|
|
21
|
+
## 1.0.1 (2015-10-03)
|
|
22
|
+
* (bluefox) support of iButton
|
|
23
|
+
|
|
24
|
+
## 1.0.0 (2015-10-03)
|
|
25
|
+
* (bluefox) Fix small error with 1-Wire and threshold mode
|
|
26
|
+
|
|
27
|
+
## 0.2.14 (2015-09-30)
|
|
28
|
+
* (bluefox) fix discover function
|
|
29
|
+
|
|
30
|
+
## 0.2.13 (2015-09-29)
|
|
31
|
+
* (bluefox) add link to admin (only with admin version >= 0.5.14)
|
|
32
|
+
* (bluefox) use misc flag
|
|
33
|
+
* (bluefox) enable pwm only for ports 10,12,13
|
|
34
|
+
* (bluefox) disable action for DHT11/22
|
|
35
|
+
|
|
36
|
+
## 0.2.12 (2015-09-29)
|
|
37
|
+
* (bluefox) fix discover function
|
|
38
|
+
* (bluefox) generate true and false for simple clicks
|
|
39
|
+
|
|
40
|
+
## 0.2.11 (2015-09-28)
|
|
41
|
+
* (bluefox) disable discover button if adapter disabled
|
|
42
|
+
* (bluefox) fix discover function
|
|
43
|
+
* (bluefox) write for inputs misc=1 and add de-bounce parameter
|
|
44
|
+
|
|
45
|
+
## 0.2.10 (2015-09-26)
|
|
46
|
+
* (bluefox) return "OK" and not "OK->" to other than 0 instances
|
|
47
|
+
|
|
48
|
+
## 0.2.9 (2015-09-20)
|
|
49
|
+
* (bluefox) change server script from "/0/" to "0/"
|
|
50
|
+
|
|
51
|
+
## 0.2.8 (2015-09-19)
|
|
52
|
+
* (bluefox) fix PWM output
|
|
53
|
+
|
|
54
|
+
## 0.2.6 (2015-09-18)
|
|
55
|
+
* (bluefox) tuning on settings for ports: Ports 14 and 15 are always ADC. Threshold are shown only for 1-wire if digital sensor.
|
|
56
|
+
|
|
57
|
+
## 0.2.5 (2015-09-17)
|
|
58
|
+
* (bluefox) fix settings for digital sensors
|
|
59
|
+
|
|
60
|
+
## 0.2.4 (2015-09-11)
|
|
61
|
+
* (bluefox) fix read of analog inputs (0-1023)
|
|
62
|
+
|
|
63
|
+
## 0.2.3 (2015-09-09)
|
|
64
|
+
* (bluefox) fix read of PWM values
|
|
65
|
+
|
|
66
|
+
## 0.2.2 (2015-09-07)
|
|
67
|
+
* (bluefox) fix write outputs
|
|
68
|
+
* (bluefox) implement discover function
|
|
69
|
+
|
|
70
|
+
## 0.2.1 (2015-08-27)
|
|
71
|
+
* (bluefox) works only with latest firmware.
|
|
72
|
+
For Digital Sensor the meaning of attribute m was changed from "sensor type" to "threshold detection"
|
|
73
|
+
Sensor type is "d"
|
|
74
|
+
* (bluefox) support of digital sensors 1W and iB
|
|
75
|
+
|
|
76
|
+
## 0.2.0 (2015-08-19)
|
|
77
|
+
* (bluefox) completely rewrite adapter
|
|
78
|
+
|
|
79
|
+
## 0.1.2 (2015-06-29)
|
|
80
|
+
* (bluefox) add tests
|
|
81
|
+
|
|
82
|
+
## 0.1.1 (2015-05-24)
|
|
83
|
+
* (bluefox) add 14,15 ports
|
|
84
|
+
* (bluefox) add settings for port 3
|
|
85
|
+
|
|
86
|
+
## 0.1.0 (2015-05-22)
|
|
87
|
+
* (bluefox) fix error if no configuration for ports
|
|
88
|
+
|
|
89
|
+
## 0.0.3 (2015-03-14)
|
|
90
|
+
* (bluefox) double click&long click
|
|
91
|
+
* (bluefox) fix error with read all ports together
|
|
92
|
+
|
|
93
|
+
## 0.0.2 (2015-03-14)
|
|
94
|
+
* (bluefox) read status off all ports together
|
|
95
|
+
|
|
96
|
+
## 0.0.1 (2015-03-05)
|
|
97
|
+
* (bluefox) make socket usable as module
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2014-
|
|
3
|
+
Copyright (c) 2014-2026 Bluefox<dogafox@gmail.com>
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|