Coder Social home page Coder Social logo

frankjoke / iobroker.acceptdata Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 13.58 MB

Accept Data can be used as a destination for devices which generate data and can post it to a device on a network in JSON or URL format

License: MIT License

HTML 6.61% CSS 0.03% JavaScript 93.09% Shell 0.27%
get post adapter iobroker accept html json acceptdata frankjoke

iobroker.acceptdata's Introduction

# ioBroker.acceptdata

NPM version Downloads Number of Installations (latest) Number of Installations (stable) Dependency Status Known Vulnerabilities

NPM

Tests:: Travis-CI

acceptdata adapter for ioBroker

Accept Data can be used as a destination for devices which generate data and can post it to a device on a network in JSON or URL format

Developer manual

This section is intended for the developer. It can be deleted later

Getting started

You are almost done, only a few steps left:

  1. Create a new repository on GitHub with the name ioBroker.acceptdata

  2. Push all files to the GitHub repo. The creator has already set up the local repository for you:

    git push origin master
  3. Head over to acceptdata.js and start programming!

Best Practices

We've collected some best practices regarding ioBroker development and coding in general. If you're new to ioBroker or Node.js, you should check them out. If you're already experienced, you should also take a look at them - you might learn something new :)

Scripts in package.json

Several npm scripts are predefined for your convenience. You can run them using npm run <scriptname>

Script name Description
test:js Executes the tests you defined in *.test.js files.
test:package Ensures your package.json and io-package.json are valid.
test Performs a minimal test run on package files and your tests.
lint Runs ESLint to check your code for formatting errors and potential bugs.

Writing tests

When done right, testing code is invaluable, because it gives you the confidence to change your code while knowing exactly if and when something breaks. A good read on the topic of test-driven development is https://hackernoon.com/introduction-to-test-driven-development-tdd-61a13bc92d92. Although writing tests before the code might seem strange at first, but it has very clear upsides.

The template provides you with basic tests for the adapter startup and package files. It is recommended that you add your own tests into the mix.

Publishing the adapter

To get your adapter released in ioBroker, please refer to the documentation of ioBroker.repositories.

Test the adapter manually on a local ioBroker installation

In order to install the adapter locally without publishing, the following steps are recommended:

  1. Create a tarball from your dev directory:
    npm pack
  2. Upload the resulting file to your ioBroker host
  3. Install it locally (The paths are different on Windows):
    cd /opt/iobroker
    npm i /path/to/tarball.tgz

For later updates, the above procedure is not necessary. Just do the following:

  1. Overwrite the changed files in the adapter directory (/opt/iobroker/node_modules/iobroker.acceptdata)
  2. Execute iobroker upload acceptdata on the ioBroker host

Changelog

0.0.1

  • (frankjoke) initial release

License

MIT License

Copyright (c) 2020 frankjoke [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 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.

iobroker.acceptdata's People

Contributors

frankjoke avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

iobroker.acceptdata's Issues

Compatibility check to js-controller 3.3 and Admin5 React UI

Dear Adapter developer,

with js-controller 3.2 and js-controller 3.3 some additional checks were added to make sure that created objects match to the specifications and also written state values match to the object definition.

If something is not correct this is logged as 'warning' or 'info' log.

Please take the time to verify your adapter by ideally starting with a fresh instance and do some actions and verify the log. If you see a warn log there from these checks please adjust the adapter and fix the relevant cases.

For questions please refer to ioBroker/ioBroker.js-controller#1301

Additionally we are preparing Admin 5 which will have a completely rewritten UI. Please install Admin 5, activate that new UI and verify that the configuration of you adapter works as expected also there.

More informations on Admin 5 can be found in Forum https://forum.iobroker.net/topic/44282/test-adapter-admin-5-0-x-alpha-der-neuen-ui

Please close the issue after you checked it.

Thank you very much for your support!

Think about to fix the issues found by adapter checker

I am an automatic service that looks for possible errors in ioBroker and creates an issue for it. The link below leads directly to the test:

https://adapter-check.iobroker.in/?q=https://raw.githubusercontent.com/frankjoke/ioBroker.acceptdata

  • [E114] No adapter are allowed in the repo without admin3 support
  • [E154] common.dependencies must contain {"js-controller": ">=2.0.0"} or {"js-controller": ">=3.0.0"}
  • [E140] width and height of logo are not equal
  • [E200] Not found on npm. Please publish
  • [E301] Tests on Travis-ci.org are broken. Please fix.
  • [E605] No actual year found in copyright. Please add "Copyright (c) 2022 frankjoke [email protected]" at the end of README.md
  • [E701] No actual year found in LICENSE. Please add "Copyright (c) 2022 frankjoke [email protected]" at the start of LICENSE

I have also found warnings that may be fixed if possible.

  • [W113] Adapter should support compact mode
  • [W400] Cannot find "acceptdata" in latest repository

Thanks,
your automatic adapter checker.

P.S.: There is a community in Github, which supports the maintenance and further development of adapters. There you will find many experienced developers who are always ready to assist anyone. New developers are always welcome there. For more informations visit: https://github.com/iobroker-community-adapters/info

Think about to fix the issues found by adapter checker

I am an automatic service that looks for possible errors in ioBroker and creates an issue for it. The link below leads directly to the test:

https://adapter-check.iobroker.in/?q=https://raw.githubusercontent.com/frankjoke/ioBroker.acceptdata

  • [E114] No adapter are allowed in the repo without admin support (set "common.noConfig = true" and "common.adminUI.config = none" if adapter has no configuration)
  • [E154] common.dependencies must contain [{"js-controller": ">=2.0.0"}] or later - recommended: [{"js-controller": ">=5.0.11"}]
  • [E140] width and height of logo are not equal
  • [E200] Not found on npm. Please publish

I have also found warnings that may be fixed if possible.

  • [W171] "common.title" is deprecated in io-package.json
  • [W105] "common.titleLang" should be translated into all supported languages (en, de, ru, pt, nl, fr, it, es, pl, uk, zh-cn)
  • [W109] "common.desc" should be translated into all supported languages (en, de, ru, pt, nl, fr, it, es, pl, uk, zh-cn)
  • [W113] Adapter should support compact mode\r\n- [ ] [W156] Adapter should support admin 5 UI (jsonConfig) if you do not use a React based UI
  • [W145] Each "common.news" should be translated into all supported languages (en, de, ru, pt, nl, fr, it, es, pl, uk, zh-cn
  • [W400] Cannot find "acceptdata" in latest repository
  • [W513] "gulpfile.js" found in repo! Think about migrating to @iobroker/adapter-dev package

Thanks,
your automatic adapter checker.

P.S.: There is a community in Github, which supports the maintenance and further development of adapters. There you will find many experienced developers who are always ready to assist anyone. New developers are always welcome there. For more informations visit: https://github.com/iobroker-community-adapters/info

Compatibility check to js-controller 4.0

Dear Adapter developer,

with js-controller 4.0 object definitions are now also checked that min/max in only provided for number/mixed objects and that the type of the default value matches to the object type.

If something is not correct this is logged as 'warning' or 'info' log.

Please also make sure to update to the lastest @iobroker/testing dependency 2.5.4 or to accept the PR from Apollon77 for legacy testing!

Please spent some time to verify your adapter by ideally starting with a fresh instance and do some actions and verify the log. If you see a warn or info log there from these checks please adjust the adapter and fix the relevant cases.

For questions please refer to ioBroker/ioBroker.js-controller#1749

Please close the issue after you checked it.

Thank you very much for your support to get the best experience for the growing numbers of ioBroker users!

Compatibility check and testing for Node.js 14 and 16

Dear Adapter developer,

Node.js 14 is now available for a year and Node.js 16 was release just some days ago and will become LTS by October 2021. We plan to update the ioBroker Node.js recommendation (currently 12.x) to 14.x later this year.

Please check your adapter with Node.js 14 especially, and ideally also directly with Node.js 16

Please add both versions to the adapter testing which is executed on commits.

If your adapter requires a certain minimum version of Node.js please set the 'engine' setting in package.json accordingly! Please also do this if the adapter is not able to work in certain Node.js versions, so that ioBroker can prevent users from installing te adapter if not compatible!

On questions please talk to us at ioBroker/ioBroker.js-controller#1138

Please close the issue after you checked it.

Thank you very much for your support!

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.