Skip to content

Commit

Permalink
Merge pull request #1 from Tom-Hirschberger/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
Tom-Hirschberger committed Oct 9, 2022
2 parents 947e324 + 9ecc7ff commit 2c05add
Show file tree
Hide file tree
Showing 32 changed files with 3,670 additions and 37 deletions.
209 changes: 176 additions & 33 deletions MMM-LEDStripControl.js

Large diffs are not rendered by default.

17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# MMM-LEDStripControl ##
# MMM-LEDStripControl #
This module controls a led strip (in my case a WS2801 strip with 160 leds) with notifications that are converted to MQTT messages with help of the module MMM-MQTTbridge of sergge1 ([https://github.com/sergge1/MMM-MQTTbridge]). The led strip will be controlled with a Python based script that runs on a second Raspberry Pi which is connected to the network and registers to the MQTT topics.
The different configuration options of the led strip are grouped into element groups. It is possible to hide unneeded groups.
The current active element is marked with an red square. The active element can be changed either by touch or notification. Also the values can be changed by notification or touch. The touch icons provide to different steppings for up and down.
The current active element is marked with an red square. The active element can be changed either by touch or notification. Also the values can be changed by notification or touch. The touch icons provide two different steppings for up and down.

## Screenshots ##
### All options visible ###
Expand Down Expand Up @@ -125,6 +125,9 @@ Basically you do not need to configure anything more than this to get the module
},
},
```

This module supports multi instance. If you want to add more than one instance to the mirror do not forget to set the "instance" option which will be explained in the next section!

### General ###
If you like you can change some options:

Expand All @@ -134,13 +137,23 @@ If you like you can change some options:
| showNormalColorOptions | Should the color options of the normal operating color be visible? | Boolean | true |
| showPongColorOptions | Should the color options of the pong game be visible? | Boolean | true |
| showPongOptions | Should the additional options of the pong game be visible? | Boolean | true |
| showHardwareButtonOption | Should an option to disable the hardware buttons be visible? | Boolean | false |
| showBrightnessOption | Should an option to control the brightness be displayed? | Boolean | false |
| fetchStatusInterval | The script sends a request to get the current configuration of the strip at the startup and in regular intervals. Normally the strip should send the configuration every time it gets switched on or off. If you do not plan to change the color values with an other module than this one you can set this value to a high one. The unit is seconds. | Integer | 300 |
| outputOnIcon | You may like to change the icon of the output state to a different one. This one will be displayed if the strip is switched on. Any free Font-Awesome 4.7 icon can be used. | String | "fa fa-lightbulb-o" |
| outputOffIcon | You may like to change the icon of the output state to a different one. This one will be displayed if the strip is switched off. Any free Font-Awesome 4.7 icon can be used. | String | "fa fa-lightbulb-o" |
| upIcon | You may like to change the icon of the up symbol. Any free Font-Awesome 4.7 icon can be used. | String | "fa fa-angle-up" |
| upFastIcon | You may like to change the icon of the fast up symbol. Any free Font-Awesome 4.7 icon can be used. | String | "fa fa-angle-double-up" |
| downIcon | You may like to change the icon of the down symbol. Any free Font-Awesome 4.7 icon can be used. | String | "fa fa-angle-down" |
| downFastIcon | You may like to change the icon of fast down symbol. Any free Font-Awesome 4.7 icon can be used. | String | "fa fa-angle-double-down" |
| leftIcon | You may like to change the icon of the left symbol. Any free Font-Awesome 4.7 icon can be used. | String | "fa fa-angle-left" |
| leftFastIcon | You may like to change the icon of the fast left symbol. Any free Font-Awesome 4.7 icon can be used. | String | "fa fa-angle-double-left" |
| rightIcon | You may like to change the icon of the right symbol. Any free Font-Awesome 4.7 icon can be used. | String | "fa fa-angle-right" |
| rightFastIcon | You may like to change the icon of the fast right symbol. Any free Font-Awesome 4.7 icon can be used. | String | "fa fa-angle-double-right" |
| hdwBtnEnabledIcon | You may like to change the icon which is displayed if the hardware buttons are enabled. Any free Font-Awesome 4.7 icon can be used. | String | "fa fa-link" |
| hddwBtnDisabledIcon | You may like to change the icon which is displayed if the hardware buttons are disabled. Any free Font-Awesome 4.7 icon can be used. | String | "fa fa-chain-broken" |
| instance | If you want to add more than one instance of this module please specify an instance number with this variable. All notifications will be suffixed with "_"+instance (i.e. "LED_STRIP_CONTROL_NEXT_ELEMENT_1") and each element gets an css class "lsc-"+instance. The instance with number 0 (default) will react to and sends notifications without suffix! | Integer | 0 |
| instanceCssClass | All elements if this instance get this css class added. If you like to control the same strip but with two instances of the module (i.e. because you use the profile or pages module) you can leave the instance number as it is and only change the css stuff if you like (i.e. smaller module) | String | "lsc-"+instance (i.e. "lsc-0") |

### Min/Max and Stepping ###
To change the min/max values or the stepping the elements get increased (up -> u) or decreased (down -> d) you can add an partly configuration for each element. You only need to provide the values that you want to change for the elements you want to change of:
Expand Down
5 changes: 5 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Examples

All examples in this directory use additional micro controllers (like ESP8266 or ESP32 boards) to control the LED strip.

If you are looking for a script to control a LED strip that is connected to Raspberry you may want to take a look to [PythonLedControl](https://github.com/Tom-Hirschberger/PythonLedControl).
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
settings.h
*.bin
Loading

0 comments on commit 2c05add

Please sign in to comment.