Package Exports
- iobroker.javascript
- iobroker.javascript/main.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (iobroker.javascript) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme

Javascript Script Engine
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.
Executes Javascript, Typescript Scripts.
Documentation
Blockly
Forbidden directories for Script Filesystem Mirroring
The Script Filesystem Mirroring will store all Source Files of the Scripts in your Filesystem to allow you to edit the Files in your favourite Script editor beside the Web-Editor. All changes are synced in both directions.
When enabling the Script Filesystem mirroring please make sure to create a dedicated new directory and do not use an existing directory with other content. Please also make sure that no other script or process changes files in the provided directory to prevent access issues. Any location needs to be writable by the "iobroker" user!
Since v5.5.0 of the JavaScript adapter the following locations (relative to the ioBroker Base directory, usually /opt/iobroker) are not allowed to be used:
- The ioBroker base directory itself and any path above!
./iobroker-dataitself, custom subdirectory (choose a name that do not overlap with any adapter!)./iobroker-data/backup-objectsor anything below./iobroker-data/filesor anything below./iobroker-data/backitupor anything below./backupsor anything below./node_modulesor anything below./logor anything below
How to build (only for developers)
Just run npm i in the root and in the src folders.
And then call npm run build.
Todo
- Goto current line in debugger
- heating profile (future releases)
- ...
Changelog
7.0.0 (2023-02-21)
- (bluefox) Breaking change: all usages of
jsonatamust be rewritten to use promises. - (bluefox) Breaking change: all blockly scripts with
jsonatablocks must de changed (just move some blocks) and saved anew. - (bluefox) Extended
createStatecommand with possibility to create aliases. - (bluefox) Corrected CRON card in rules
- (bluefox) Added additional options to show the attributes of object in blockly
- (bluefox) Corrected
existsStateAsyncfunction - (bluefox) Added
isDaylightSavingstate to indicate day saving time
6.2.0 (2023-02-17)
- (Apollon77) Prevented duplicate schedule triggering with inaccurate RTC clocks
- (Apollon77) Fixed sendToAsync and sendToHostAsync
- (Apollon77) Added rename/renameFile(Async) methods
- (Apollon77) Deprecated get/setBinaryState(Async) methods and log a message on usage. Use Files instead!
- (Apollon77) Deprecated usage of own states in javascript.X.scriptEnabled/Problem and log a message on usage. Use own states in 0_userdata.0 instead!
- (bluefox) added axios to pre-installed modules.
requestwill be removed in the future
6.1.4 (2022-11-14)
- (bluefox) Corrected small error in rules
- (bluefox) Tried to fix debug mode
6.1.3 (2022-11-03)
- (Apollon77) Prevent adapter crash when script could not be compiled
6.1.2 (2022-11-03)
- (bluefox) Added ukrainian translation
License
The MIT License (MIT)
Copyright (c) 2014-2023 bluefox dogafox@gmail.com,
Copyright (c) 2014 hobbyquaker