Skip to content

Commit

Permalink
Update version in io-package (#39)
Browse files Browse the repository at this point in the history
* Update verion in io-package

* Update README.md

* Updated io-package news

* Update changelog in readme

* Changed author email

* Changed eslint to devdependency

* Update README.md

* Added more explicit error messages

* Added more roles for values, deleted unnecessary functions

* Set min and max value of retrievalRate with cut-off

* Replace invalid characters

* Set axios timeout to 4 sec, added hint

* Update README.md
  • Loading branch information
pr0crstntr authored Feb 27, 2024
1 parent d51222c commit 1cbeb33
Show file tree
Hide file tree
Showing 22 changed files with 217 additions and 150 deletions.
2 changes: 1 addition & 1 deletion .create-adapter.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"es6class": "yes",
"authorName": "Katharina K.",
"authorGithub": "pr0crstntr",
"authorEmail": "katharina.kraus@student.hs-anhalt.de",
"authorEmail": "katharina.kraus@air-q.com",
"gitRemoteProtocol": "HTTPS",
"gitCommit": "yes",
"defaultBranch": "main",
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Katharina K. <katharina.kraus@student.hs-anhalt.de>
Copyright (c) 2024 Katharina K. <katharina.kraus@air-q.com>

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
69 changes: 27 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,44 +12,37 @@

## Contents
- [About](#about)
- [Installation manual](#install)
- [Prerequisites](#prereq)
- [Getting started](#start)
- [Test the adapter manually with dev-server](#testing)
- [Changelog](#change)
- [License](#license)
- [Getting started](#start)
- [Changelog](#change)
- [License](#license)


## About <a id="about"/>

This ioBroker Adapter is used in connection with our [air-Q device](https://www.air-q.com). It polls the values from our sensors and displays them for you in the ioBroker environment.
</br>
</br>

![air-Q_frontal + Seitlich_full](https://github.com/CorantGmbH/ioBroker.air-q/assets/107550719/5c38d737-9641-463f-bd07-ac62ce5f1973)

## Installation manual <a id="install" />
## Getting started <a id="start" />

### Prerequisites <a id="prereq" />
You should be able to find the adapter through the admin interface.

Please make sure to install the newest version of npm.
To install and update necessary dependencies please run
```
npm i
Otherwise you're welcome to use the ioBroker command line interface through the console. Simply direct to your ioBroker root folder and add the adapter via
```
to ensure the adapter is running properly.
For development it is recommended to use dev-server, which you can install with:
iobroker add air-q
```
npm install dev-server
```

### Getting started <a id="start" />
This installs the adapter (if it isn't installed already) and starts an instance.
In case you only want to install the adapter without creating an instance yet, use the following command:

Head to your root directory for your ioBroker system. Now you can install our adapter by using npm directly:
```
npm install iobroker.air-q
iobroker install air-q
```

Once this is done, you should be able to find the adapter through the interface. To configure your instance you simply select whether you want to connect it through the IP or the short-ID of your device.
For more information visit the ioBroker CLI documentation under https://github.com/ioBroker/ioBroker/wiki/Console-commands.

To configure your instance you simply select whether you want to connect it through the IP or the short-ID of your device.

![Screenshot 2024-02-13 103001](https://github.com/CorantGmbH/ioBroker.air-q/assets/107550719/ec878783-af56-490d-af66-43c53c27df20)

Expand All @@ -66,30 +59,25 @@ The data will be retrieved and shown in the objects-tab according to your config

***For now we have all sensors for the air-Q Pro included. Optional sensors will be included in a future patch.***

## Changelog <a id="change" />

### Test the adapter manually with dev-server <a id="testing" />
### 1.0.0

If you'd like to debug the adapter yourself you can use dev-server.
Once you installed it, run `dev-server setup`.
You can use it to run, test and debug your adapter.
* Include typescript files by @pr0crstntr in #6
* Created air-Q class by @pr0crstntr in #4
* Fix restart bug by @pr0crstntr in #7
* Update data poll by @pr0crstntr in #8
* Updated io-package by @pr0crstntr in #9
* Fixed save option for configuration by @pr0crstntr in #16
* Added clear intervals on unload by @pr0crstntr in #26
* Update README by @pr0crstntr in #37
* Changed role for temperature and added unit by @pr0crstntr in #38

You may start `dev-server` by calling from your dev directory:
```
dev-server watch
```
### 0.0.1

The ioBroker.admin interface will then be available at http://127.0.0.1:8081/

Please refer to the [`dev-server` documentation](https://github.com/ioBroker/dev-server#command-line) for more details.
* (Katharina K.) initial release

## Changelog <a id="change" />
<!--
Placeholder for the next version (at the beginning of the line):
### **WORK IN PROGRESS**
-->

### **WORK IN PROGRESS**
* (Katharina K.) initial release

## License <a id="license"/>

Expand All @@ -114,6 +102,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


Copyright (c) 2024 Corant GmbH
3 changes: 2 additions & 1 deletion admin/i18n/de/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
"shortId_txt": "Kurz-ID (erste 5 Zeichen der Seriennummer)",
"so2_txt": "Schwefeldioxid (SO<sub>2</sub>)",
"temperature_txt": "Temperatur",
"voc_txt": "Flüchtige organische Verbindungen (VOC)"
"voc_txt": "Flüchtige organische Verbindungen (VOC)",
"polling_hint_txt": "Hinweis: Erwägen Sie die Verwendung einer Abfragehäufigkeit von 5 Sekunden oder mehr, der Standardwert liegt bei 10 Sekunden."
}
1 change: 1 addition & 0 deletions admin/i18n/en/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"performance_txt": "Performance index",
"pm_txt": "Particulate matter (PM1, PM2.5, PM10)",
"poll_warning_txt": "Warning: Setting a very high polling frequency (less than 2 seconds) might slow down the air-Q smartphone app.",
"polling_hint_txt": "Hint: Consider using a polling frequency of 5 seconds or more, the default is at 10 seconds.",
"pressure_rel_txt": "Relative pressure",
"pressure_txt": "Pressure",
"radon_txt": "Radon",
Expand Down
3 changes: 2 additions & 1 deletion admin/i18n/es/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
"shortId_txt": "ID corto (los 5 primeros dígitos del número de serie)",
"so2_txt": "Dióxido de azufre (SO<sub>2</sub>)",
"temperature_txt": "Temperatura",
"voc_txt": "Compuestos orgánicos volátiles (VOC)"
"voc_txt": "Compuestos orgánicos volátiles (VOC)",
"polling_hint_txt": "Sugerencia: considere utilizar una frecuencia de sondeo de 5 segundos o más; el valor predeterminado es 10 segundos."
}
3 changes: 2 additions & 1 deletion admin/i18n/fr/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
"shortId_txt": "ID court (les 5 premiers chiffres du numéro de série)",
"so2_txt": "Dioxyde de soufre (SO<sub>2</sub>)",
"temperature_txt": "Température",
"voc_txt": "Composés organiques volatils (VOC)"
"voc_txt": "Composés organiques volatils (VOC)",
"polling_hint_txt": "Astuce : envisagez d'utiliser une fréquence d'interrogation de 5 secondes ou plus, la valeur par défaut étant de 10 secondes."
}
3 changes: 2 additions & 1 deletion admin/i18n/it/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
"shortId_txt": "ID breve (i primi 5 cifre del numero di serie)",
"so2_txt": "Solfidio (SO<sub>2</sub>)",
"temperature_txt": "Temperatura",
"voc_txt": "Composti organici volatili (VOC)"
"voc_txt": "Composti organici volatili (VOC)",
"polling_hint_txt": "Suggerimento: considerare l'utilizzo di una frequenza di polling di 5 secondi o più, il valore predefinito è 10 secondi."
}
3 changes: 2 additions & 1 deletion admin/i18n/nl/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
"shortId_txt": "Kort ID (de eerste 5 cijfers van het serienummer)",
"so2_txt": "Zwavelgolf (SO<sub>2</sub>)",
"temperature_txt": "Temperatuur",
"voc_txt": "Vervuilde organisch materiaal (VOC)"
"voc_txt": "Vervuilde organisch materiaal (VOC)",
"polling_hint_txt": "Tip: Overweeg een pollingfrequentie van 5 seconden of meer te gebruiken; de standaardwaarde is 10 seconden."
}
3 changes: 2 additions & 1 deletion admin/i18n/pl/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
"shortId_txt": "Krótki ID (pierwsze 5 cyfr numeru seryjnego)",
"so2_txt": "Dwutlenek węgla (SO<sub>2</sub>)",
"temperature_txt": "Temperatura",
"voc_txt": "Wybuchowe składniki organiczne (VOC)"
"voc_txt": "Wybuchowe składniki organiczne (VOC)",
"polling_hint_txt": "Wskazówka: rozważ użycie częstotliwości odpytywania wynoszącej 5 sekund lub więcej, wartość domyślna wynosi 10 sekund."
}
3 changes: 2 additions & 1 deletion admin/i18n/pt/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
"shortId_txt": "ID curto (os 5 primeiros dígitos do número de série)",
"so2_txt": "Dióxido de enxofre (SO<sub>2</sub>)",
"temperature_txt": "Temperatura",
"voc_txt": "Compostos orgânicos voláteis (VOC)"
"voc_txt": "Compostos orgânicos voláteis (VOC)",
"polling_hint_txt": "Dica: Considere usar uma frequência de pesquisa de 5 segundos ou mais, o padrão é 10 segundos."
}
3 changes: 2 additions & 1 deletion admin/i18n/ru/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
"shortId_txt": "Короткий ID (первые 5 цифр номера прибора)",
"so2_txt": "Диоксид серы (SO<sub>2</sub>)",
"temperature_txt": "Температура",
"voc_txt": "Вольтажные органические соединения (VOC)"
"voc_txt": "Вольтажные органические соединения (VOC)",
"polling_hint_txt": "Подсказка: рассмотрите возможность использования частоты опроса 5 секунд или более, значение по умолчанию — 10 секунд."
}
3 changes: 2 additions & 1 deletion admin/i18n/uk/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
"shortId_txt": "Короткий ідентифікатор (перші 5 цифр серійного номера)",
"so2_txt": "Діоксид сірки (SO<sub>2</sub>)",
"temperature_txt": "температура",
"voc_txt": "Летючі органічні сполуки (VOC)"
"voc_txt": "Летючі органічні сполуки (VOC)",
"polling_hint_txt": "Підказка: спробуйте використовувати частоту опитування 5 секунд або більше, за замовчуванням 10 секунд."
}
3 changes: 2 additions & 1 deletion admin/i18n/zh-cn/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
"shortId_txt": "短ID(序列号的前5位)",
"so2_txt": "硫化氢(SO<sub>2</sub>)",
"temperature_txt": "温度",
"voc_txt": "挥发性有机物(VOC)"
"voc_txt": "挥发性有机物(VOC)",
"polling_hint_txt": "提示:考虑使用 5 秒或更长的轮询频率,默认值为 10 秒。"
}
20 changes: 19 additions & 1 deletion admin/index_m.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
disableIPInput();
onChange();
});
$("#retrievalRate").on("change", () => {
limitRetrievalRate($("#retrievalRate").val());
onChange();
});
disableIPInput();
onChange(false);
if (M) M.updateTextFields();
Expand Down Expand Up @@ -70,6 +74,15 @@
obj.connectViaIP = $("#connectViaIP").prop("checked");
callback(obj);
}

function limitRetrievalRate(rate) {
if (rate < 2) {
return $("#retrievalRate").val(2);
} else if (rate > 3600) {
return $("#retrievalRate").val(3600);
}
}

</script>

<style>
Expand Down Expand Up @@ -126,7 +139,7 @@ <h6 class="title" style="background-color: #174475; font-size: 1.2rem; border-ra
<div class="row" style="padding: 4px">
<div class="input-field col s12 m6 l3">
<label for="retrievalRate" class="translate">retrieval_rate_txt</label>
<input type="number" class="value" id="retrievalRate" min="2" max="500" step="1" placeholder="10" />
<input type="number" class="value" id="retrievalRate" min="2" max="3600" step="1" placeholder="10" />
</div>
<div class="input-field col s12 m6 l3">
<select id="retrievalType" class="value">
Expand All @@ -142,6 +155,11 @@ <h6 class="title" style="background-color: #174475; font-size: 1.2rem; border-ra
style="font-size: 1rem; border-radius: 4px; margin-left: 0.5em"
class="translate">poll_warning_txt</span>
</div>
<div class="row" style="padding: 4px">
<span for="access_data" class="translate"
style="font-size: 1rem; border-radius: 4px; margin-left: 0.5em"
class="translate">polling_hint_txt</span>
</div>
</div>

</div>
Expand Down
1 change: 1 addition & 0 deletions admin/words.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1cbeb33

Please sign in to comment.