### Hierarchy

- Sandbox

### Implements

- Ha4usScriptingEnvironment

## Index

### Constructors

- constructor

### Properties

- _$objects
- _$states
- _$yaml
- _log
- _name
- _onDestroy
- _scheduler
- _script
- compileTemplate
- log
- noRetained
- onlyRetained
- pick
- pickEach
- randomString
- render
- stop$

### Accessors

- sandbox

### Methods

- $onDestroy
- _setupLogger
- combine
- createObject
- cron
- doAt
- doIn
- get
- getTimes
- load
- observe
- random
- require
- save
- schedule
- set
- setTimes
- status

### Object literals

- _modules
- console
- http

## Constructors

### constructor

- new Sandbox(_script: Ha4usScript): Sandbox

- - Defined in sandbox.class.ts:86

  #### Parameters

  - ##### _script: Ha4usScript

  #### Returns Sandbox

## Properties

### Protected _$objects

_$objects: ObjectService

- Defined in sandbox.class.ts:61

### Protected _$states

_$states: StateService

- Defined in sandbox.class.ts:59

### Protected _$yaml

_$yaml: YamlService

- Defined in sandbox.class.ts:60

### Protected _log

_log: Ha4usLogger

- Defined in sandbox.class.ts:41

### Protected _name

_name: string

- Defined in sandbox.class.ts:57

### _onDestroy

_onDestroy: function

- Defined in sandbox.class.ts:43

#### Type declaration

- - (): void

  - #### Returns void

### Protected _scheduler

_scheduler: UsScheduler

- Defined in sandbox.class.ts:62

### Protected _script

_script: Ha4usScript

- Defined in sandbox.class.ts:88

### compileTemplate

compileTemplate: compile = compile

- Defined in sandbox.class.ts:50

### log

log: object = this.console

Implementation of Ha4usScriptingEnvironment.log

- Defined in sandbox.class.ts:86

#### Type declaration

- ##### debug: function

  - debug(...args: any[]): any
  - - Defined in sandbox.class.ts:80

    #### Parameters

    - ##### Rest ...args: any[]

    #### Returns any

- ##### error: function

  - error(...args: any[]): any
  - - Defined in sandbox.class.ts:83

    #### Parameters

    - ##### Rest ...args: any[]

    #### Returns any

- ##### info: function

  - info(...args: any[]): any
  - - Defined in sandbox.class.ts:82

    #### Parameters

    - ##### Rest ...args: any[]

    #### Returns any

- ##### log: function

  - log(...args: any[]): void
  - - Defined in sandbox.class.ts:76

    #### Parameters

    - ##### Rest ...args: any[]

    #### Returns void

- ##### warn: function

  - warn(...args: any[]): any
  - - Defined in sandbox.class.ts:81

    #### Parameters

    - ##### Rest ...args: any[]

    #### Returns any

### noRetained

noRetained: MonoTypeOperatorFunction<Ha4usMessage> = Ha4usOperators.noRetained

Implementation of Ha4usScriptingEnvironment.noRetained

- Defined in sandbox.class.ts:46

### onlyRetained

onlyRetained: MonoTypeOperatorFunction<Ha4usMessage> = Ha4usOperators.onlyRetained

Implementation of Ha4usScriptingEnvironment.onlyRetained

- Defined in sandbox.class.ts:45

### pick

pick: pick = Ha4usOperators.pick

Implementation of Ha4usScriptingEnvironment.pick

- Defined in sandbox.class.ts:47

### pickEach

pickEach: pickEach = Ha4usOperators.pickEach

Implementation of Ha4usScriptingEnvironment.pickEach

- Defined in sandbox.class.ts:48

### randomString

randomString: randomString = randomString

- Defined in sandbox.class.ts:51

### render

render: render = render

- Defined in sandbox.class.ts:49

### stop$

stop$: Subject<void> = new rxjs.Subject<void>()

- Defined in sandbox.class.ts:40

## Accessors

### sandbox

sandbox:

- Defined in sandbox.class.ts:101

## Methods

### $onDestroy

- $onDestroy(destroyFunc: function): void

- - Defined in sandbox.class.ts:275

  #### Parameters

  - ##### destroyFunc: function

    - - (): void

      - #### Returns void

### Protected _setupLogger

- _setupLogger(): Ha4usLogger

- - Defined in sandbox.class.ts:119

  #### Returns Ha4usLogger

### combine

- combine(...pattern: string[]): Observable<Ha4usMessage[]>

- Implementation of Ha4usScriptingEnvironment.combine

  - Defined in sandbox.class.ts:198

  #### Parameters

  - ##### Rest ...pattern: string[]

  #### Returns Observable<Ha4usMessage[]>

### createObject

- createObject(topic: string, data: Partial<Ha4usObject>): Promise<Ha4usObject>

- - Defined in sandbox.class.ts:267

  #### Parameters

  - ##### topic: string

  - ##### data: Partial<Ha4usObject>

  #### Returns Promise<Ha4usObject>

### cron

- cron(cronPattern: string): Observable<number>

- - Defined in sandbox.class.ts:232

  #### Parameters

  - ##### cronPattern: string

  #### Returns Observable<number>

### doAt

- doAt(date: DateTime): Observable<ScheduleEvent>

- - Defined in sandbox.class.ts:251

  #### Parameters

  - ##### date: DateTime

  #### Returns Observable<ScheduleEvent>

### doIn

- doIn(duration: string | number): Observable<ScheduleEvent>

- Implementation of Ha4usScriptingEnvironment.doIn

  - Defined in sandbox.class.ts:244

  #### Parameters

  - ##### duration: string | number

  #### Returns Observable<ScheduleEvent>

### get

- get(topic: string): Promise<Ha4usMessage>

- Implementation of Ha4usScriptingEnvironment.get

  - Defined in sandbox.class.ts:208

  #### Parameters

  - ##### topic: string

  #### Returns Promise<Ha4usMessage>

### getTimes

- getTimes(now?: DateTime): any

- - Defined in sandbox.class.ts:228

  #### Parameters

  - ##### Optional now: DateTime

  #### Returns any

### load

- load(file: string): any

- Implementation of Ha4usScriptingEnvironment.load

  - Defined in sandbox.class.ts:258

  #### Parameters

  - ##### file: string

  #### Returns any

### observe

- observe(topic: string, ...params: any[]): Observable<Ha4usMessage>

- Implementation of Ha4usScriptingEnvironment.observe

  - Defined in sandbox.class.ts:191

  #### Parameters

  - ##### topic: string

  - ##### Rest ...params: any[]

  #### Returns Observable<Ha4usMessage>

### random

- random(maxOrMin: number, max?: number): number

- - Defined in sandbox.class.ts:279

  #### Parameters

  - ##### maxOrMin: number

  - ##### Optional max: number

  #### Returns number

### require

- require(md: string): any

- Implementation of Ha4usScriptingEnvironment.require

  - Defined in sandbox.class.ts:160

  #### Parameters

  - ##### md: string

  #### Returns any

### save

- save(data: any, file: string): any

- Implementation of Ha4usScriptingEnvironment.save

  - Defined in sandbox.class.ts:261

  #### Parameters

  - ##### data: any

  - ##### file: string

  #### Returns any

### schedule

- schedule(eventOrOpts: SimpleTime | SchedulingOptions, ...times: SimpleTime[]): Observable<ScheduleEvent>

- Implementation of Ha4usScriptingEnvironment.schedule

  - Defined in sandbox.class.ts:219

  #### Parameters

  - ##### eventOrOpts: SimpleTime | SchedulingOptions

  - ##### Rest ...times: SimpleTime[]

  #### Returns Observable<ScheduleEvent>

### set

- set(topic: string, value: any): Promise<any>

- Implementation of Ha4usScriptingEnvironment.set

  - Defined in sandbox.class.ts:204

  #### Parameters

  - ##### topic: string

  - ##### value: any

  #### Returns Promise<any>

### setTimes

- setTimes(...times: string[]): void

- - Defined in sandbox.class.ts:240

  #### Parameters

  - ##### Rest ...times: string[]

  #### Returns void

### status

- status(topic: string, value: any, retained?: boolean): Promise<Ha4usMessage>

- Implementation of Ha4usScriptingEnvironment.status

  - Defined in sandbox.class.ts:211

  #### Parameters

  - ##### topic: string

  - ##### value: any

  - ##### Default value retained: boolean = true

  #### Returns Promise<Ha4usMessage>

## Object literals

### Protected _modules

_modules: object

- Defined in sandbox.class.ts:53

### fs

fs: "fs"

- Defined in sandbox.class.ts:55

### path

path: "path"

- Defined in sandbox.class.ts:55

### rxjs

rxjs: "/Users/ulf/development/ha4us/ha4us-scripts/node_modules/rxjs/index" = rxjs

- Defined in sandbox.class.ts:55

### rxjs/operators

rxjs/operators: "/Users/ulf/development/ha4us/ha4us-scripts/node_modules/rxjs/operators/index" = rxjsoperators

- Defined in sandbox.class.ts:55

### console

console: object

Implementation of Ha4usScriptingEnvironment.console

- Defined in sandbox.class.ts:75

### debug

- debug(...args: any[]): any

- - Defined in sandbox.class.ts:80

  #### Parameters

  - ##### Rest ...args: any[]

  #### Returns any

### error

- error(...args: any[]): any

- - Defined in sandbox.class.ts:83

  #### Parameters

  - ##### Rest ...args: any[]

  #### Returns any

### info

- info(...args: any[]): any

- - Defined in sandbox.class.ts:82

  #### Parameters

  - ##### Rest ...args: any[]

  #### Returns any

### log

- log(...args: any[]): void

- - Defined in sandbox.class.ts:76

  #### Parameters

  - ##### Rest ...args: any[]

  #### Returns void

### warn

- warn(...args: any[]): any

- - Defined in sandbox.class.ts:81

  #### Parameters

  - ##### Rest ...args: any[]

  #### Returns any

### http

http: object

- Defined in sandbox.class.ts:64

### get

- get(url: string, query: object): Promise<string>

- - Defined in sandbox.class.ts:70

  #### Parameters

  - ##### url: string

  - ##### query: object

  #### Returns Promise<string>

### parse

- parse(url: string, query: object): Promise<CheerioStatic>

- - Defined in sandbox.class.ts:65

  #### Parameters

  - ##### url: string

  - ##### query: object

  #### Returns Promise<CheerioStatic>

Generated using TypeDoc