Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Aug 26, 2024
1 parent 1c38678 commit f37795c
Show file tree
Hide file tree
Showing 9 changed files with 281 additions and 496 deletions.
13 changes: 0 additions & 13 deletions .npmignore

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015-2022, bluefox <[email protected]>
Copyright (c) 2015-2024, bluefox <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
41 changes: 16 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,22 @@ This adapter uses the owfs library from https://www.npmjs.com/package/owjs and a

## Install OWFS Linux

```sudo apt-get install owfs```
`sudo apt-get install owfs`

Sometimes you need write following steps:
- To start the the server to communicate over serial interface with 1wire sensors
Sometimes you need to write the following steps:
- To start the server to communicate over serial interface with 1wire sensors

```
owserver -d "/dev/ttyUSB0" --nozero
```
`owserver -d "/dev/ttyUSB0" --nozero`

*/dev/ttyUSB0* is the name of your serial device. Here was USB stick used for that.
`/dev/ttyUSB0` is the name of your serial device. Here was a USB stick used for that.

This command starts the 1wire server on local port 4304.

- To show the data from the local 1wire server in the file system call following command:
- To show the data from the local 1wire server in the file system, call the following command:

```
owfs -C -m /mnt/1wire --allow_other
```
Before you must create the directroy */mnt/1wire* with command `mkdir /mnt/1wire`
`owfs -C -m /mnt/1wire --allow_other`

Before you must create the directory */mnt/1wire* with command `mkdir /mnt/1wire`

## Install OWFS windows
http://sourceforge.net/projects/owfs/
Expand All @@ -55,12 +52,12 @@ http://sourceforge.net/projects/owfs/
* (INgo Rah) Added the alarm state handling

### 0.6.2 (2019-10-29)
* (RustyThePropellerHead) Improved data integrity when reading from local OWFS via file system
* (RustyThePropellerHead) Improved data integrity when reading from local OWFS via a file system

### 0.6.1 (2018-07-11)
* (bluefox) compact mode supported
* (lvogt) Added data points counter.A/.B/.ALL from DS2423 to config page
* (lvogt) Add option to not log faulty readouts
* (lvogt) Added option to not log faulty readouts

### 0.5.0 (2018-03-16)
* (bluefox) Ready for Admin3
Expand All @@ -78,17 +75,17 @@ http://sourceforge.net/projects/owfs/
* (bluefox) custom poll interval for every sensor

### 0.3.2 (2016-08-24)
* (bluefox) support of local OWFS via file system
* (bluefox) support of local OWFS via a file system

### 0.2.2 (2016-07-29)
* (bluefox) add new datapoints: pressure, volts, ...
* (bluefox) add new data points: pressure, volts, ...

### 0.2.1 (2016-07-28)
* (bluefox) fixes of write
* (bluefox) fixes of writing

### 0.2.0 (2016-07-27)
* (bluefox) discover sensors
* (bluefox) use other npm library to fix write
* (bluefox) used another npm library to fix writing

### 0.1.1 (2016-07-25)
* (bluefox) check configuration
Expand All @@ -102,17 +99,11 @@ http://sourceforge.net/projects/owfs/
### 0.0.1 (2014-11-02)
* (bluefox) support of server (actual no authentication)

## Install

```node iobroker.js add owfs```

## Configuration

## License

The MIT License (MIT)

Copyright (c) 2015-2022, bluefox <[email protected]>
Copyright (c) 2015-2024, bluefox <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion admin/index_m.html
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
</div>
<div class="col s12 m4">
<input class="value" id="alarmInterval" min="0" max="100000"/>
<label class="translate" for="interval">Alarm poll interval(msec, 0 = off)</label>
<label class="translate" for="alarmInterval">Alarm poll interval(msec, 0 = off)</label>
</div>
<div class="col s12 m4">
<input class="value" id="noStateChangeOnError" type="checkbox"/>
Expand Down
123 changes: 123 additions & 0 deletions admin/jsonConfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"type": "tabs",
"i18n": true,
"items": {
"_main": {
"type": "panel",
"label": "OWFS server settings",
"items": {
"local": {
"type": "checkbox",
"label": "Use local OWFS",
"sm": 12,
"md": 4
},
"path": {
"newLine": true,
"type": "text",
"label": "Path to OWFS mount",
"sm": 12,
"md": 4
},
"ip": {
"newLine": true,
"type": "text",
"label": "IP Address of OWFS Server",
"sm": 12,
"md": 4
},
"port": {
"type": "number",
"min": 1,
"max": 65535,
"label": "Port of OWFS Server",
"sm": 12,
"md": 4
},
"interval": {
"newLine": true,
"type": "number",
"min": 0,
"max": 100000,
"label": "Poll interval",
"help": "seconds",
"sm": 12,
"md": 4
},
"alarmInterval": {
"type": "number",
"min": 0,
"max": 100000,
"label": "Alarm poll interval",
"help": "milliseconds, 0 = off",
"sm": 12,
"md": 4
},
"noStateChangeOnError": {
"newLine": true,
"type": "checkbox",
"label": "No state change on error",
"sm": 12,
"md": 4
},
"noStateChangeOn85C": {
"type": "checkbox",
"label": "No state change on 85°C reading",
"help": "Initial state of DS18B20 in case of power failure",
"sm": 12,
"md": 4
}
}
},
"_addresses": {
"type": "panel",
"label": "Wires addresses",
"items": {
"_readAddresses": {
"type": "sendTo",
"command": "readdir",
"label": "refresh",
"jsonData": "{ \"local\": ${!!data.local}, \"path\": \"${data.path}\", \"ip\": \"${data.ip}\", \"port\": ${data.port} }"
},
"wires": {
"type": "table",
"showSecondAddAt": 10,
"export": true,
"import": true,
"items": [
{
"type": "text",
"attr": "name",
"label": "Name"
},
{
"type": "text",
"attr": "id",
"label": "ID",
"width": "20%"
},
{
"type": "text",
"attr": "property",
"label": "Property",
"width": 120
},
{
"type": "checkbox",
"attr": "iButton",
"label": "iButton",
"width": 60
},
{
"type": "number",
"attr": "interval",
"label": "Interval (sec)",
"title": "in seconds",
"width": 80
}
]
}
}
}
}
}
Loading

0 comments on commit f37795c

Please sign in to comment.