Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

  • Ha4usScriptingEnvironment

Implemented by

Index

Properties

console

console: Logger

log

log: Logger

noRetained

noRetained: any

onlyRetained

onlyRetained: any

pick

pick: any

pickEach

pickEach: any

Methods

$onDestroy

  • $onDestroy(destroyFunc: function): any

combine

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

doIn

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

get

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

load

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

observe

  • observe(...topics: string[]): Observable<Ha4usMessage>
  • observe(topic: string, ...params: any[]): Observable<Ha4usMessage>
  • Observes one or more MQTT topic

    Parameters

    • Rest ...topics: string[]

    Returns Observable<Ha4usMessage>

    stream of messages

  • Parameters

    • topic: string
    • Rest ...params: any[]

    Returns Observable<Ha4usMessage>

require

  • require(md: string): any
  • requires a module

    Parameters

    • md: string

      name of module to require

    Returns any

    the exported module

save

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

schedule

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

    • eventOrOpts: SimpleTime | SchedulingOptions
    • Rest ...times: SimpleTime[]

    Returns Observable<ScheduleEvent>

set

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

status

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

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc