Skip to content

Commit

Permalink
Merge pull request #1 from node-red-contrib/development
Browse files Browse the repository at this point in the history
Release 1.0
  • Loading branch information
konne authored Dec 3, 2020
2 parents efa4a11 + 2c9faa2 commit 8151e86
Show file tree
Hide file tree
Showing 24 changed files with 6,639 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: konne
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Version (please complete the following information):**

- OS: [e.g. iOS]
- Browser: [e.g. chrome, safari]
- Node-Red: [e.g. 1.x]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
11 changes: 11 additions & 0 deletions .github/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- match:
dependency_type: development
update_type: all

- match:
dependency_type: production
update_type: security:minor

- match:
dependency_type: production
update_type: semver:minor
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "08:00"
timezone: Europe/Berlin
open-pull-requests-limit: 10
target-branch: development
30 changes: 30 additions & 0 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: compile

on:
push:
branches: [ master, development ]
paths:
- 'src/**'
- '.github/workflows/compile.yml'

pull_request:
branches: [ master, development ]
paths:
- 'src/**'
- '.github/workflows/compile.yml'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 15.x
- name: compile
run: |
npm ci
npm run build --if-present
46 changes: 46 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish

on:
release:
types: [ published ]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: '14.x'

- name: npm install & set Version
run: |
npm ci
npm config set git-tag-version false
npm version ${{ github.event.release.tag_name }}
- name: build & pack
run: |
npm run build --if-present
npm pack
- uses: JS-DevTools/npm-publish@v1
if: "!github.event.release.prerelease"
with:
token: ${{ secrets.NPM_TOKEN }}

- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: '${{ github.event.release.upload_url }}'
asset_path: ./${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.tgz
asset_name: ${{ github.event.repository.name }}-${{ github.event.release.tag_name }}.tgz
asset_content_type: application/zip

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
nodes/
.DS_Store
*.tgz
7 changes: 7 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules/
src/
tool/
docs/
tsconfig.json
.*/
*.tgz
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/*.js": {
"when": "$(basename).ts"
},
"**/*.js.map": {
"when": "$(basename)"
}
},
"typescript.tsdk": "./node_modules/typescript/lib"
}
85 changes: 84 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,84 @@
# node-red-contrib-bsb-lan
[![CLA assistant](https://cla-assistant.io/readme/badge/node-red-contrib/node-red-contrib-bsb-lan)](https://cla-assistant.io/node-red-contrib/node-red-contrib-bsb-lan)
![compile](https://github.com/node-red-contrib/node-red-contrib-bsb-lan/workflows/compile/badge.svg)
[![CodeFactor](https://www.codefactor.io/repository/github/node-red-contrib/node-red-contrib-bsb-lan/badge)](https://www.codefactor.io/repository/github/node-red-contrib/node-red-contrib-bsb-lan)
[![npm version](https://badge.fury.io/js/node-red-contrib-bsb-lan.svg)](https://badge.fury.io/js/node-red-contrib-bsb-lan)

# node-red-contrib-bsb-lan a BSB-LAN node for Node-RED

Provides functionality to retrieve data from the [BSB-LAN](https://1coderookie.github.io/BSB-LPB-LAN/) adapter.

When triggered, the node will login and make the configured request.

This is an sample request of fetching (GET) two parameters:

``` json
{
"_msgid": "...",
"payload": {
"700": {
"name": "Betriebsart",
"error": 0,
"value": "1",
"desc": "Automatik",
"dataType": 1,
"readonly": 0,
"unit": ""
},
"710": {
"name": "Komfortsollwert",
"error": 0,
"value": "22.0",
"desc": "",
"dataType": 0,
"readonly": 0,
"unit": "°C"
}
}
}
```

# Install

Install via the palette manage in the Node-RED admin ui (no restart needed).

Alternatively run the following command in your Node-RED user directory (typically `~/.node-red`):

```sh
npm install node-red-contrib-bsb-lan
```

then restart Node-RED and add an instance of the bsb-lan node.

# Usage

Just add the connection settings and select what type of request you want to sent.

You can also override the configuration settings with properties that are injected
into the incomig message.

property | type | example
------------|-----------------|--------
requesttype | GET / SET / INF | GET
parameters | [] | [700,710] (fetched in GET the parameter 700 & 710)
value | number | 22.0 (only valid for requesttype SET / INF)

## GET

With the GET you can fetch multiple parameters in on request.
Just select in the parameters tree the parameter that you like to
fetch and inject a message.

![config](docs/config.png)

The payload will be filled with the values.

## SET / INF

You can even change the configuration of your device but you have to
first enable in the BSB-LAN the write functionality
[see Chapter 5](https://1coderookie.github.io/BSB-LPB-LAN_EN/chap05.html)

Select the right request type and now you can select only one
value from the parameter list.
Fill in the value that you want to write into the parameter and
inject a message.
Binary file added docs/config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8151e86

Please sign in to comment.