mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-05 22:35:57 +00:00
1.6 KiB
1.6 KiB
Constants (script variables)
Here is the latest, up to date constants list. This file was autogenerated by running 'node scripts/getcommands.js' in the repository. All descriptions were taken from code. Constants can be accessed in commands, so things like setChannel 15 2*$CH14+5 can work. Do not add anything here, as it will overwritten with next rebuild.
| Code | Description |
|---|---|
| MQTTOn | Legacy variable, without $ prefix. Returns 1 if MQTT is connected, otherwise 0. |
| $MQTTOn | Returns 1 if MQTT is connected, otherwise 0. |
| $CH*** | Provides channel access, so you can do math expressions on channel values. $CH1 is channel 1, $CH20 is channel 20, $CH140 is channel 140, etc |
| $CH** | Provides channel access, as above. |
| $CH* | Provides channel access, as above. |
| $led_dimmer | Current value of LED dimmer, 0-100 range |
| $led_enableAll | Returns 1 if LED is enabled, otherwise 0. |
| $led_hue | Current LED Hue value |
| $led_red | Current LED red value |
| $led_green | Current LED green value |
| $led_blue | Current LED blue value |
| $led_saturation | Current LED saturation value |
| $led_temperature | Current LED temperature value |
| $activeRepeatingEvents | Current number of active repeating events |
| $voltage | Current value of voltage from energy metering chip. You can use those variables to make, for example, a change handler that fires when voltage is above 245, etc. |
| $current | Current value of current from energy metering chip |
| $power | Current value of power from energy metering chip |
| $uptime | Time since reboot in seconds |