Giter Site home page Giter Site logo

iobroker.xterm's Introduction

Logo

ioBroker.xterm

Number of Installations Number of Installations NPM version

Test and Release Translation status Downloads

This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers. For more details and for information how to disable the error reporting see Sentry-Plugin Documentation! Sentry reporting is used starting with js-controller 3.0.

xterm adapter for ioBroker

This adapter allows executing shell commands on ioBroker host. It replaces the ioBroker.terminal adapter.

Terminal server to open command line interface. Please use it only for administration purposes.

Based on xterm.js and node-pty packages.

If the authentication is enabled, only ioBroker "admin" user can log in.

Usage

Adapter support 2 modes:

  • Starts cmd.exe(windows) or bash(linux). On Linux the bash runs under iobroker user, and maybe you should switch to other user with more privilegs (via su USER).
  • Or simulate shell with node.js (You can activate this option if the first option does not work)

Note: Some terminal commands with interactivity do not work. E.g. nano and some others.

TODO

  • Simulation: Ctrl + R (History)
  • Simulation: More encoding pages. If you find code page that suits to your system, please create an issue. Possible coding pages could be found here.
  • Support more than one session (Tabs)

Changelog

2.0.1 (2023-09-18)

  • (bluefox) xterm library updated
  • (bluefox) Move Lets encrypt settings to acme adapter
  • (bluefox) Minimal supported node.js version is 16

1.1.0 (2022-10-08)

  • (Apollon77) Update xterm library
  • (Apollon77) Prepare for future js-controller versions

1.0.0 (2022-08-29)

  • (bluefox) Check only port of the interface and not of all interfaces

0.3.2 (2022-03-29)

  • (Apollon77) Fix crash cases reported by Sentry

0.3.1 (2022-03-18)

  • (Apollon77) Fix a crash case reported by Sentry

0.3.0 (2022-03-12)

  • (Apollon77) Prevent some warnings in js-controller 3+
  • (Apollon77) Add Fallback to simulated shell if bash/cmd.exe is selected by node-pty was not installed correctly!
  • (Apollon77) Rework info.connection status to show that server is connected also as green by using "none" to show that no one is connected
  • (Apollon77) Update all dependencies
  • (Apollon77) Add sentry for crash reporting

0.2.0 (2021-09-18)

  • (bluefox) Added the real terminal (bash or cmd.exe) to simulated one

0.1.0 (2021-09-18)

  • (bluefox) changed type of the connection state to "string"

0.0.3 (2021-09-16)

  • (ioBroker) first working release

0.0.1

  • (ioBroker) initial release

License

MIT License

Copyright (c) 2021-2023 ioBroker [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.xterm's People

Contributors

apollon77 avatar caliber65 avatar dependabot[bot] avatar germanbluefox avatar mcm1957 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

iobroker.xterm's Issues

"Let's encrypt" module import is deprecated

Adapter Version: 1.1.0
NodeJS: 18.16.1
NPM: 9.5.1
JS-Controller: 5.0.5

when starting the instance i get the following warning:

Information for Developer: Using the direct "Let's encrypt" module import is deprecated and will be removed in the next js-controller version, use @iobroker/webserver instead

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/ioBroker/ioBroker.xterm

  • [E114] No adapter are allowed in the repo without admin3 support
  • [E150] No common.connectionType found in io-package.json
  • [E152] No common.dataSource found in io-package.json
  • [E154] common.dependencies must contain {"js-controller": ">=2.0.0"} or {"js-controller": ">=3.0.0"}
  • [E802] No topics found in the repository. Please go to "https://github.com/ioBroker/ioBroker.xterm", press the settings button beside the about title and add some topics.

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

  • [W505] setTimeout found in "main.js", but no clearTimeout detected

Thanks,
your automatic adapter checker.

not working in docker

Describe the bug
adapter does not start
To Reproduce
Steps to reproduce the behavior:

  1. install adapter in docker
  2. See error

Expected behavior
it must work

Screenshots & Logfiles

xterm.0 2021-11-08 00:47:19.894 debug XTerm is listening on 7099
xterm.0 2021-11-08 00:47:19.892 debug Using http createServer
xterm.0 2021-11-08 00:47:19.853 info starting. Version 0.2.0 in /opt/iobroker/node_modules/iobroker.xterm, node: v12.22.5, js-controller: 3.3.18
xterm.0 2021-11-08 00:47:19.127 debug Plugin sentry Initialize Plugin (enabled=true)
host.iobroker 2021-11-08 00:47:17.065 info instance system.adapter.xterm.0 started with pid 6667
**Versions:** - Adapter version: 0.2.0 - JS-Controller version: 3.3.18 - Node version: v12.22.5 - Operating system: docker 5.1.0

Additional context
and when the port changes, the cursor 'jumps' to the end. Also, there is no way to press the save and save and close button.

Update stable version in repo from 1.1.0 to 2.0.1

Think about update stable version to 2.0.1

Version: stable=1.1.0 (360 days old) => latest=2.0.1 (15 days old)
Installs: stable=417 (81.13%), latest=41 (7.98%), total=514

Click to use developer portal
Click to edit

Note: This is an automatically generated message and not personally authored by bluefox!

Cannot find module node-pty

Hallo,

Fehler in Version 0.2.0 , Adapter Rot.

`

host.MedionHome) 2021-09-19 11:04:20.486 error host.Medion(Home) instance system.adapter.xterm.0 terminated with code 1 (JS_CONTROLLER_STOPPED)
host.MedionHome) 2021-09-19 11:04:20.486 error host.Medion(Home) Caught by controller[0]: }
host.MedionHome) 2021-09-19 11:04:20.485 error host.Medion(Home) Caught by controller[0]: ]
host.MedionHome) 2021-09-19 11:04:20.485 error host.Medion(Home) Caught by controller[0]: 'C:\Program Files\iobroker\Home\node_modules\iobroker.xterm\main.js'
host.MedionHome) 2021-09-19 11:04:20.485 error host.Medion(Home) Caught by controller[0]: requireStack: [
host.MedionHome) 2021-09-19 11:04:20.485 error host.Medion(Home) Caught by controller[0]: code: 'MODULE_NOT_FOUND',
host.MedionHome) 2021-09-19 11:04:20.485 error host.Medion(Home) Caught by controller[0]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) {
host.MedionHome) 2021-09-19 11:04:20.485 error host.Medion(Home) Caught by controller[0]: at Function.Module._load (internal/modules/cjs/loader.js:708:14)
host.MedionHome) 2021-09-19 11:04:20.485 error host.Medion(Home) Caught by controller[0]: at Module.load (internal/modules/cjs/loader.js:863:32)
host.MedionHome) 2021-09-19 11:04:20.485 error host.Medion(Home) Caught by controller[0]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
host.MedionHome) 2021-09-19 11:04:20.484 error host.Medion(Home) Caught by controller[0]: at Module._compile (internal/modules/cjs/loader.js:999:30)
host.MedionHome) 2021-09-19 11:04:20.484 error host.Medion(Home) Caught by controller[0]: at Object. (C:\Program Files\iobroker\Home\node_modules\iobroker.xterm\main.js:12:18)
host.MedionHome) 2021-09-19 11:04:20.484 error host.Medion(Home) Caught by controller[0]: at require (internal/modules/cjs/helpers.js:74:18)
host.MedionHome) 2021-09-19 11:04:20.484 error host.Medion(Home) Caught by controller[0]: at Module.require (internal/modules/cjs/loader.js:887:19)
host.MedionHome) 2021-09-19 11:04:20.484 error host.Medion(Home) Caught by controller[0]: at Function.Module._load (internal/modules/cjs/loader.js:667:27)
host.MedionHome) 2021-09-19 11:04:20.484 error host.Medion(Home) Caught by controller[0]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
host.MedionHome) 2021-09-19 11:04:20.484 error host.Medion(Home) Caught by controller[0]: - C:\Program Files\iobroker\Home\node_modules\iobroker.xterm\main.js
host.MedionHome) 2021-09-19 11:04:20.484 error host.Medion(Home) Caught by controller[0]: Require stack:
host.MedionHome) 2021-09-19 11:04:20.483 error host.Medion(Home) Caught by controller[0]: Error: Cannot find module 'node-pty'
host.MedionHome) 2021-09-19 11:04:20.483 error host.Medion(Home) Caught by controller[0]:
host.MedionHome) 2021-09-19 11:04:20.483 error host.Medion(Home) Caught by controller[0]: ^
host.MedionHome) 2021-09-19 11:04:20.483 error host.Medion(Home) Caught by controller[0]: throw err;
host.MedionHome) 2021-09-19 11:04:20.483 error host.Medion(Home) Caught by controller[0]: internal/modules/cjs/loader.js:818
host.MedionHome) 2021-09-19 11:03:49.725 error host.Medion(Home) instance system.adapter.xterm.0 terminated with code 1 (JS_CONTROLLER_STOPPED)
host.MedionHome) 2021-09-19 11:03:49.725 error host.Medion(Home) Caught by controller[0]: }
host.MedionHome) 2021-09-19 11:03:49.725 error host.Medion(Home) Caught by controller[0]: ]
host.MedionHome) 2021-09-19 11:03:49.725 error host.Medion(Home) Caught by controller[0]: 'C:\Program Files\iobroker\Home\node_modules\iobroker.xterm\main.js'
`

Plattform: Windows
RAM: 16 GB
Node.js: 12.22.6
NPM: 6.14.15
JS Controller: 3.3.18
Admin: 5.1.25
Web: 3.4.9
Socket.io: 3.1.4
Script Engine: 5.2.13
IOT: 1.8.23
VIS: 1.4.4

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!

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.