Giter Club home page Giter Club logo

adapter-dev's Introduction

Logo

ioBroker (windows installer)

NPM version Downloads

NPM

Automate your life!

To install on Linux, just run: npx @iobroker/install

To install on Windows: mkdir C:\iobroker && cd C:\iobroker && npx @iobroker/install or use installer

See ioBroker documentation for more information

ioBroker is an integration platform for the Internet of Things, focused on Building Automation, Smart Metering, Ambient Assisted Living, Process Automation, Visualization and Data Logging.

Concept

ioBroker is not just an application, it's more of a concept and a database schema. It offers a very easy way for systems to interoperate. ioBroker defines some common rules for a pair of databases used to exchange data and publish events between different systems.

architecture

Databases

ioBroker uses "in memory" database to hold the data and saves it on disk with reasonable intervals. There are two types of storage:

  • objects (meta/configuration information)
  • states (values)

Objects and states can be stored in "in memory" or in Redis.

Redis is an in-memory key-value data store and also a message broker with publish/subscribe pattern.

It's used to maintain and publish all states of connected systems.

Adapters

Systems are attached to ioBrokers databases via so-called adapters, technically processes running anywhere in the network and connecting all kinds of systems to ioBrokers databases. A connection to ioBrokers databases can be implemented in nearly any programming language on nearly any platform, and an adapter can run on any host that is able to reach the databases via ip networking.

See the actual list of adapters on iobroker.net

Security

ioBroker is designed to be accessed by trusted adapters inside trusted networks. This means that usually it is not a good idea to expose the ioBroker databases, adapters or any smart home devices directly to the internet or, in general, to an environment where untrusted clients can directly access these network services. Adapters that offer services supposed to be exposed to the internet should be handled with care. You should always activate HTTPS and use valid certificates for web, admin if open it for internet or for example, use it with additional security measures like VPN, VLAN and reverse proxies.

Getting Started

Operating System and Hardware

ioBroker.js-controller should run on any hardware and OS that runs Node.js (ARM, x86, Windows, Linux, OSX).

ioBroker spawns a new Node.js process for every adapter instance, so RAM becomes a limiting factor. A single adapter's memory fingerprint is roundabout 10 to 60 MB.

Installation and first steps

Community support

Logos and pictures

All logos are protected by copyright and may not be used without permission.

Please request permission via [email protected]

Logos

License

This module is distributor under the MIT License (MIT). Please notice that other ioBroker adapters can have different licenses.

The MIT License (MIT)

Copyright (c) 2014-2024 bluefox [email protected], Copyright (c) 2014 hobbyquaker

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 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.

adapter-dev's People

Contributors

alcalzone avatar apollon77 avatar dependabot[bot] avatar foxriver76 avatar germanbluefox avatar grizzelbee avatar klein0r avatar steiger04 avatar unclesamswiss avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

adapter-dev's Issues

translate command only translates the first sentence

When running npm run translate to tanslate the i18n json files, only the first sentence of each string gets translated.
Any further sentence is dropped from the translation.

Especially for the help texts in jsonConfig, sometimes multiple sentences in one string are required.

Example:
en (source)

"Emoji to react with on mentions. Default is 👍.": "Emoji to react with on mentions. Default is 👍.",

de (tranlated)

"Emoji to react with on mentions. Default is 👍.": "Emoji zum Reagieren auf Erwähnungen. ",

(note the space at the end)

Prevent eslint quote errors in words.js

This could be done the easy way, just add /* eslint quotes: off */ at the top of the file.

Or detect quote settings of eslint and respect them in words.js file.

Currently, if words.js is recreated, you have to add the eslint directive to the file again to not have linting fail.

[FEATURE] translate should update target if source record is changed

a) Currently npm run translate writes translated text records into the target files only if the corresponding record does not exist there.

npm run translate should keep a record of the source file (i18n/en/translate,json) and hence detect if a text has been changed. In this case the target records should be replaced with the new translations too. Note: npm run traslate MUST NOT write the full target file if no change in source json is detected as this would override manual corrections.

b) at least optionally npm translate should remove outdated record from the target files. Outdated records should be defined as records no longer exist in source file.

[FEATURE]: To remove/change a translation to all files

Hi,
might it be possible, to add an option "--r Word" for example, which removes the translation for a word in all translation files as well as the word.js.

The background/idea behind that is, if you change or extend a translation to another word, you need to open all the files, remove this particular translation and then change it inside the en directory, to get it translated again into the new/changed word/sentence.

Thanks!

Only change the pure translation in word.js

I just switched from Gulp to @iobroker/adapter-dev in Backitup and ran into a problem.

Due to felxible translations within the code, the word.js is non-standard and contains "module.exports"

If I now update the word.js via npm run translate adminLanguages2words, the complete content is overwritten.

Is it possible that only the actual translation is overwritten and everything else remains in its original state?

Provide shared tsconfig files

Like we have it already in this project, we should provide tsconfig files for all adapters that contain all (or almost all) configs.

Different files should be provided for:

  • JS adapter
  • TS adapter
  • HTML/JS admin GUI
  • React admin GUI
    • JS
    • TS

I would suggest having a folder tsconfig/ with the different configs, so one could for example write:

{
    "extends": "@iobroker/adapter-dev/tsconfig/adapter-js.json",
    ...
}

Enhance error "Could not translate to "de": TypeError: Cannot read properties of null (reading 'map')"

npm run translate all issues the following errors is any key has an empty value:

Using Legacy Google Translate
Could not translate to "de": TypeError: Cannot read properties of null (reading 'map')

Could not translate to "de": TypeError: Cannot read properties of null (reading 'map')

Could not translate to "de": TypeError: Cannot read properties of null (reading 'map')

incorrect source example:

    "lblOptNoRawStates": "",
    "lblOptNoValStates": "",

It would be good to add the json key (i.e. lblOpNoRawStates) to the error message. This woul help locating the empty string.

Long translations are not accepted

Hi,
if you have a translation like this in the json file
"ex_custom_circle_icon":"How to get the Icon? Visit <a href='_top'>https://materialdesignicons.com</a> and search for an icon. Click the Icon and in the below row click '</>', choose 'View SVG' and copy only the text inside <b>d</b>",
It will be cut after: How to get the Icon?

npm translate - error message if source string is empty (low prio)

If the source json file (i18n/en/translate.json) contains an empty string, i.e.

    "lblDevsEnable":     "",

the command npm run translate issues an error message:

Could not translate to "pl": TypeError: Cannot read property '0' of null

In some situations is useful to replace the test in jsonConfig.json to an empty string (i.e. if you want to remove a text without changing jsonConfig or if you want to add the text to some languages only).

npm run translate should simply "translate" the empty string to an empty string.

[Feature request] Support Line breaks in io-package news

Currently only 1 line of translations is handled, separation by /n are cut off.
Example:

"0.2.0": {
    "en": "Initialization error for Nano V1 solved\nError logging and reporting improved\nAdapter rebuild to TypeScript\nTest & Release workflow updated\nAdded indicator for connection status\nReconnecting to offline devices improved\nEnsure support of all WLANThermo-Nano Devices",
    "de": "Unterstützt mehrere Geräte"
}

Expected outcome:

"0.2.0": {
    "en": "Initialization error for Nano V1 solved\nError logging and reporting improved\nAdapter rebuild to TypeScript\nTest & Release workflow updated\nAdded indicator for connection status\nReconnecting to offline devices improved\nEnsure support of all WLANThermo-Nano Devices",
    "de": "Unterstützt mehrere Geräte\nFehler-/Debug-Protokollierung Verbessert\nUmbau des Adapters auf TypeScript\nTest- und Release-Workflow aktualisiert\nIndikator für den Verbindungsstatus hinzugefügt\nWiederverbinden mit Offline-Geräten verbessert\nStellen Sie sicher, dass alle WLANThermo-Nano-Geräte unterstützt werden",
    "ru": "Поддержка нескольких устройств\nВедение журнала ошибок/отладки Улучшено\nАдаптер пересобран на TypeScript\nОбновлен рабочий процесс тестирования и выпуска\nДобавлен индикатор состояния соединения\nУлучшено повторное подключение к автономным устройствам.\nОбеспечьте поддержку всех устройств WLANThermo-Nano",
    "pt": "Suporta vários dispositivos\nRegistro de erros/depuração aprimorado\nReconstrução do adaptador para TypeScript\nFluxo de trabalho de teste e lançamento atualizado\nIndicador adicionado para o status da conexão\nReconectando-se a dispositivos off-line aprimorado\nGaranta o suporte de todos os dispositivos WLANThermo-Nano",
    "nl": "Ondersteuning voor meerdere apparaten\nLogboekregistratie van fouten/foutopsporing Verbeterd\nAdapter opnieuw opbouwen naar TypeScript\nTest & Release-workflow bijgewerkt\nIndicator toegevoegd voor verbindingsstatus\nOpnieuw verbinding maken met offline apparaten verbeterd\nZorg voor ondersteuning van alle WLANThermo-Nano-apparaten",
    "fr": "Prend en charge plusieurs appareils\nJournalisation des erreurs/débogages Amélioré\nReconstruction de l'adaptateur vers TypeScript\nFlux de travail de test et de publication mis à jour\nIndicateur ajouté pour l'état de la connexion\nReconnexion à des appareils hors ligne améliorée\nAssurer la prise en charge de tous les périphériques WLANThermo-Nano",
    "it": "Supporta più dispositivi\nRegistrazione errori/debug Migliorata\nRicostruzione dell'adattatore in TypeScript\nFlusso di lavoro di test e rilascio aggiornato\nAggiunto indicatore per lo stato della connessione\nRiconnessione ai dispositivi offline migliorata\nGarantire il supporto di tutti i dispositivi WLANThermo-Nano",
    "es": "Soporta múltiples dispositivos\nRegistro de error/depuración Mejorado\nReconstrucción del adaptador a TypeScript\nFlujo de trabajo de prueba y lanzamiento actualizado\nIndicador agregado para el estado de la conexión.\nSe mejoró la reconexión a dispositivos sin conexión\nAsegurar el soporte de todos los dispositivos WLANThermo-Nano",
    "pl": "Obsługa wielu urządzeń\nRejestrowanie błędów/debugów Ulepszone\nOdbudowa adaptera do TypeScript\nZaktualizowano przepływ pracy Test & Release\nDodano wskaźnik statusu połączenia\nUlepszone ponowne łączenie z urządzeniami offline\nZapewnij obsługę wszystkich urządzeń WLANThermo-Nano",
    "zh-cn": "支持多种设备\n错误/调试日志记录改进\n适配器重建到 TypeScript\n测试和发布工作流程更新\n添加了连接状态指示器\n重新连接到离线设备得到改进\n确保支持所有 WLANThermo-Nano 设备"
},

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.