Docs
Concepts

The sandbox

What JavaScript you get inside the isolate, what is missing, and what the hub injects.

Your code runs as a classic script (not a module) in a bare V8 context. There is no Node.js, no browser and no module loader.

Available

  • Standard JavaScript: Object, Array, Map, Set, JSON, Math, Date, Promise, RegExp, String, Number, typed arrays and the usual error classes. The exact allow-list is generated on Sandbox globals.
  • console.log / warn / error / info / debug, forwarded to the instance's live log.
  • The global functions the hub injects: subscribe, runIn, sendPushNotification, httpRequest, …
  • EntityWrapper, the class behind every entity input (new EntityWrapper('light.kitchen') works when you know an id).
  • settings, location, state, and one global per hydrated preference input.

Not available

MissingUse instead
import / export, requireone file; everything is global
setTimeout, setIntervalrunIn, runOnce, schedule, runDaily
fetch, XMLHttpRequest, socketshttpRequest (fire-and-forget, see HTTP and egress)
IntlformatDateParts(date, getHomeTimeZone())
process, Buffer, filesystem—

Calling a missing global throws a ReferenceError at run time; the server-side validator rejects the common ones (setTimeout, local-time Date getters) when the code is registered.

Network boundary

httpRequest may reach the internet and LAN devices, but never the hub's own loopback services, link-local addresses or multicast. The policy is generated on Egress policy.

Logs

Everything you console.log is batched and streamed to the instance's log view in the Novon app and admin console, with a per-app rate limit (dropped lines are counted, not silently lost). Keep lines short and free of personal data.

On this page