Skip to content
/ api Public

Z-Bus types and scripting API for the "Z-Bus Interface" IoT smart home hub

License

Notifications You must be signed in to change notification settings

z-bus/api

Repository files navigation

Z-Bus

Z-Bus Home License Keywords Version Issues Follow

About

This is the JavaScript scripting documentation for automating your home with the Z-Bus smart home Interface.

The documentation of this API is split into modules:

The sources of this API are available on github.com/z-bus/api

The package is available on NPM via @z-bus/api

Hardware requirements

  • You'll need your home to be equipped and hard-wired with a Z-Bus smart home system installation available on z-bus.com.
  • You require the Interface smart home server and IoT gateway up and running at your home. It will receive the script and run your automations locally on the device, even without connection to the internet.
  • Internet connectivity is however recommended for scripting (albeit it is also possible offline)

Getting started

  1. Open the script from the menu in Z-Bus Home or refer to home.z-bus.com/script directly.
  2. Enter a "hello world program"
zBus.receive((event) => {
  console.log('Hello, device', event.address);
});
  1. Press the ▶︎ arrow in the upper right.
  2. Press one of your Z-Bus wall buttons. The console will acknowledge each button press:
14.03.2021, 16:09:21 [script] Hello, device 0
  1. To start scripting your automations, refer to the API documentation – start from the global zBus object

How it works

Z-Bus Home supports scripting home automations in standard JavaScript. This is outstandingly documented and supported by the community, an excellent primer into the scripting language can be found in Mozilla's MDN Web Docs.

Z-Bus Interface runs the JavaScript runtime Node.js 15.3 internally, you'll find a detailed reference in the Node.js Documentation.

The scripting runtime features our open-source library specifically built for Z-Bus smart home system usage via the global variable zBus. Please refer to the Z-Bus API Documentation for:

  • Receiving events from and transmitting commands to the Z-Bus smart home system
  • Dimming lights and setting lighting scenes
  • Creating central or conditional control flows
  • Creating timers, schedules, and presence simulations.

About

Z-Bus types and scripting API for the "Z-Bus Interface" IoT smart home hub

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published