This is the scripting environment for scripts developed for ha4us-scripts.

### Hierarchy

- Ha4usScriptingEnvironment

### Implemented by

- Sandbox

## Index

### Properties

- console
- log
- noRetained
- onlyRetained
- pick
- pickEach

### Methods

- $onDestroy
- combine
- doIn
- get
- load
- observe
- require
- save
- schedule
- set
- status

## Properties

### console

console: Logger

- Defined in sandbox.interface.ts:46

### log

log: Logger

- Defined in sandbox.interface.ts:45

### noRetained

noRetained: any

- Defined in sandbox.interface.ts:49

### onlyRetained

onlyRetained: any

- Defined in sandbox.interface.ts:48

### pick

pick: any

- Defined in sandbox.interface.ts:50

### pickEach

pickEach: any

- Defined in sandbox.interface.ts:51

## Methods

### $onDestroy

- $onDestroy(destroyFunc: function): any

- - Defined in sandbox.interface.ts:87

  #### Parameters

  - ##### destroyFunc: function

    - - (): void

      - #### Returns void

  #### Returns any

### combine

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

- - Defined in sandbox.interface.ts:69

  #### Parameters

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

  #### Returns Observable<Ha4usMessage[]>

### doIn

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

- - Defined in sandbox.interface.ts:82

  #### Parameters

  - ##### duration: string | number

  #### Returns Observable<ScheduleEvent>

### get

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

- - Defined in sandbox.interface.ts:73

  #### Parameters

  - ##### topic: string

  #### Returns Promise<any>

### load

- load(file: string): Promise<any>

- - Defined in sandbox.interface.ts:84

  #### Parameters

  - ##### file: string

  #### Returns Promise<any>

### observe

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

- - Defined in sandbox.interface.ts:58

  Observes one or more MQTT topic

  #### Parameters

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

  #### Returns Observable<Ha4usMessage>

  stream of messages

- - Defined in sandbox.interface.ts:67

  #### Parameters

  - ##### topic: string

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

  #### Returns Observable<Ha4usMessage>

### require

- require(md: string): any

- - Defined in sandbox.interface.ts:65

  requires a module

  #### Parameters

  - ##### md: string

    name of module to require

  #### Returns any

  the exported module

### save

- save(data: any, file: string): Promise<void>

- - Defined in sandbox.interface.ts:85

  #### Parameters

  - ##### data: any

  - ##### file: string

  #### Returns Promise<void>

### schedule

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

- - Defined in sandbox.interface.ts:77

  #### Parameters

  - ##### eventOrOpts: SimpleTime | SchedulingOptions

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

  #### Returns Observable<ScheduleEvent>

### set

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

- - Defined in sandbox.interface.ts:71

  #### Parameters

  - ##### topic: string

  - ##### value: any

  #### Returns Promise<any>

### status

- status(topic: string, value: any, retained: boolean): void

- - Defined in sandbox.interface.ts:75

  #### Parameters

  - ##### topic: string

  - ##### value: any

  - ##### retained: boolean

  #### Returns void

Generated using TypeDoc