Home Script dimmer
Post
Cancel

Script dimmer

Information

This is a script dimmer which can be used to support a not supported dimmer. TerrariumPI will execute this script with no parameters when it tries to read the current dimmer state. And when you change the dimmer, the script will get an extra parameter which is a int from 0 - 100. Where 0 is off and 100 is fully on.

When for what reason the readout is not possible, return the value ‘-1’ when requested. This will tell TerrariumPI to keep the last existing value.

An example can be found in the contrib folder.

Python scripts

In order to use the Python virtual environment with all its libraries, make sure you have the correct shebang line:

1
#!/usr/bin/env python

Docker

When using docker, you can place them in the scripts volume that you have defined in the docker-compose.yaml file. And then you can use the following address: /TerrariumPI/scripts/[name_of_script].[extension]

Setup

In order to use the Script dimmer use the following settings:

Mandatory

Hardware
Script dimmer
Address
/home/user/location/executable/script

Other settings can be found at the relay setup information

This post is licensed under CC BY 4.0 by the author.