Script*
Hang tight — we're still working on it!
Overview
The Script resource in Valeiot allows users to deploy custom logic code to interact with the system’s resources, such as Devices, Entities, Users, Actions, and Widgets. Scripts enable automation, dynamic data processing, and event-driven workflows within the Valeiot platform.

Key Characteristics
- Multi-Trigger Support: Executes based on user interactions through the dashboard and widgets or scheduled and event-driven actions.
- Resource Interaction: Use the script to transform data according to your needs. It can read, modify, and control Devices, Entities, Users, Data Points, and more.
- Valeiot SDK: Leverage the Valeiot SDK to simplify interactions with your workspace resources. It provides a consistent and efficient way to access, manage, and integrate components such as Devices, Entities, Users, and Data Points.
- Runtime Support: Supports JavaScript (with future Python compatibility).
- Debugging & Logging: Provides execution logs and error tracking for troubleshooting.
Use Cases
- Send Commands: Turn on a fan if temperature exceeds a threshold (trigger a script through Actions based on sensor data to perform an API call).
- Create Hierarchy System: Create a hierachy system to group devices and storage data. Example: Create an organization with a pre-set of tags to relate with devices (trigger a script through form widget and utilize the scope information to create an entity behind the scenes).
- Generate Alerts: Notify maintenance teams when a machine shows abnormal vibrations (trigger a script thorugh Actions based on sensor data to perform an API call).
- Estabilish External Integrations: Fetch live weather data and display it on a dashboard (send Data Points to a device linked to a widget to display real-time data based on calculations or external APIs).
Examples
Send Commands and Alerts
alertChecker.js
Hang tight — we're still working on it!
Create Hierarchy System
Trigger: This script can be configured to run when the user clicks "Create"

Script Logic: the script handler.js creates an Entity (with a pre-defined set of tags) using the Valeiot SDK.
handler.js
Hang tight — we're still working on it!
Estabilish External Integrations
pullExternalData.js
Hang tight — we're still working on it!
Next Steps:
For more scripting capabilities, see:
- Valeiot API Docs (Available soon)
- Valeiot SDK Docs (Available soon)