Skip to content

Commit

Permalink
docas better
Browse files Browse the repository at this point in the history
  • Loading branch information
openshwprojects committed Aug 16, 2023
1 parent 38d8580 commit ed2b995
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 43 deletions.
82 changes: 41 additions & 41 deletions docs/drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,44 @@ but we can enable them for you per request. Some drivers might also be WIP.
Do not add anything here, as it will overwritten with next rebuild.
| Driver | Description |
|:------------- | -----:|
| TuyaMCU | TuyaMCU is a protocol used for communication between WiFI module and external MCU. This protocol is using usually RX1/TX1 port of BK chips. See [TuyaMCU dimmer example](https://www.elektroda.com/rtvforum/topic3929151.html), see [TH06 LCD humidity/temperature sensor example](https://www.elektroda.com/rtvforum/topic3942730.html), see [fan controller example](https://www.elektroda.com/rtvforum/topic3908093.html), see [simple switch example](https://www.elektroda.com/rtvforum/topic3906443.html) |
| tmSensor | tmSensor must be used only when TuyaMCU is already started. tmSensor is a TuyaMcu Sensor, it's used for Low Power TuyaMCU communication on devices like TuyaMCU door sensor, or TuyaMCU humidity sensor. After device reboots, tmSensor uses TuyaMCU to request data update from the sensor and reports it on MQTT. Then MCU turns off WiFi module again and goes back to sleep. See an [example door sensor here](https://www.elektroda.com/rtvforum/topic3914412.html). |
| NTP | NTP driver is required to get current time and date from web. Without it, there is no correct datetime. |
| HTTPButtons | This driver allows you to create custom, scriptable buttons on main WWW page. You can create those buttons in autoexec.bat and assign commands to them |
| TESTPOWER | This is a fake POWER measuring socket driver, only for testing |
| TESTLED | This is a fake I2C LED driver, only for testing |
| I2C | Generic I2C, not used for LED drivers, but may be useful for displays or port expanders. Supports both hardware and software I2C. |
| BL0942 | BL0942 is a power-metering chip which uses UART protocol for communication. It's usually connected to TX1/RX1 port of BK. You need to calibrate power metering once, just like in Tasmota. See [LSPA9 teardown example](https://www.elektroda.com/rtvforum/topic3887748.html). |
| BL0942SPI | BL0942 is a power-metering chip which uses SPI protocol for communication. It's usually connected to SPI1 port of BK. You need to calibrate power metering once, just like in Tasmota. See [PZIOT-E01 teardown example](https://www.elektroda.com/rtvforum/topic3945667.html). |
| ChargingLimit | Mechanism to perform an action based on a max. delta value and max time. Used to control Electric Vehicle chargers. See [discussion](https://github.com/openshwprojects/OpenBK7231T_App/issues/892). |
| BL0937 | BL0937 is a power-metering chip which uses custom protocol to report data. It requires setting 3 pins in pin config: CF, CF1 and SEL |
| CSE7766 | BL0942 is a power-metering chip which uses UART protocol for communication. It's usually connected to TX1/RX1 port of BK |
| SM16703P | WIP driver |
| IR | IRLibrary wrapper, so you can receive remote signals and send them. See [forum discussion here](https://www.elektroda.com/rtvforum/topic3920360.html), also see [LED strip and IR YT video](https://www.youtube.com/watch?v=KU0tDwtjfjw) |
| DDP | DDP is a LED control protocol that is using UDP. You can use xLights or any other app to control OBK LEDs that way. |
| SSDP | SSDP is a discovery protocol, so BK devices can show up in, for example, Windows network section |
| DGR | Tasmota Device groups driver. See [forum example](https://www.elektroda.com/rtvforum/topic3925472.html) and TODO-video tutorial (will post on YT soon) |
| Wemo | Wemo emulation for Alexa. You must also start SSDP so it can run, because it depends on SSDP discovery. |
| Hue | Hue emulation for Alexa. You must also start SSDP so it can run, because it depends on SSDP discovery. |
| PWMToggler | PWMToggler is a custom abstraction layer that can run on top of raw PWM channels. It provides ability to turn off/on the PWM while keeping it's value, which is not possible by direct channel operations. It can be used for some custom devices with extra lights/lasers. See example [here](https://www.elektroda.com/rtvforum/topic3939064.html). |
| DoorSensor | DoorSensor is using deep sleep to preserve battery. This is used for devices without TuyaMCU, where BK deep sleep and wakeup on GPIO is used. This drives requires you to set a DoorSensor pin. Change on door sensor pin wakes up the device. If there are no changes for some time, device goes to sleep. See example [here](https://www.elektroda.com/rtvforum/topic3960149.html). If your door sensor does not wake up in certain pos, please use DSEdge command (try all 3 options, default is 2). |
| MAX72XX_Clock | Simple hardcoded driver for MAX72XX clock. Requirex manual start of MAX72XX driver with MAX72XX setup and NTP start. |
| ADCButton | This allows you to connect multiple buttons on single ADC pin. Each button must have a different resistor value, this works by probing the voltage on ADC from a resistor divider. You need to select AB_Map first. See forum post for [details](https://www.elektroda.com/rtvforum/viewtopic.php?p=20541973#20541973). |
| SM2135 | SM2135 custom-'I2C' LED driver for RGBCW lights. This will start automatically if you set both SM2135 pin roles. This may need you to remap the RGBCW indexes with SM2135_Map command |
| BP5758D | BP5758D custom-'I2C' LED driver for RGBCW lights. This will start automatically if you set both BP5758D pin roles. This may need you to remap the RGBCW indexes with BP5758D_Map command. This driver is used in some of BL602/Sonoff bulbs, see [video flashing tutorial here](https://www.youtube.com/watch?v=L6d42IMGhHw) |
| BP1658CJ | BP1658CJ custom-'I2C' LED driver for RGBCW lights. This will start automatically if you set both BP1658CJ pin roles. This may need you to remap the RGBCW indexes with BP1658CJ_Map command |
| SM2235 | SM2335 andd SM2235 custom-'I2C' LED driver for RGBCW lights. This will start automatically if you set both SM2235 pin roles. This may need you to remap the RGBCW indexes with SM2235_Map command |
| CHT8305 | CHT8305 is a Temperature and Humidity sensor with I2C interface. |
| MCP9808 | MCP9808 is a Temperature sensor with I2C interface and an external wakeup pin, see [docs](https://www.elektroda.pl/rtvforum/topic3988466.html). |
| KP18068 | KP18068 I2C LED driver. Unfinished due to the lack of the information. |
| KP18058 | KP18058 I2C LED driver. Working, see reverse-engineering [topic](https://www.elektroda.pl/rtvforum/topic3991620.html) |
| MAX72XX | MAX72XX LED matrix display driver with font and simple script interface. See [protocol explanation](https://www.elektroda.pl/rtvforum/viewtopic.php?p=18040628#18040628) |
| TM1637 | Driver for 7-segment LED display with DIO/CLK interface |
| GN6932 | Driver for 7-segment LED display with DIO/CLK/STB interface. See [this topic](https://www.elektroda.com/rtvforum/topic3971252.html) for details. |
| TM1638 | Driver for 7-segment LED display with DIO/CLK/STB interface. TM1638 is very similiar to GN6932 and TM1637. See [this topic](https://www.elektroda.com/rtvforum/viewtopic.php?p=20553628#20553628) for details. |
| HT16K33 | Driver for 16-segment LED display with I2C. See [protocol explanation](https://www.elektroda.pl/rtvforum/topic3984616.html) |
| SHT3X | Humidity/temperature sensor. See [SHT Sensor tutorial topic here](https://www.elektroda.com/rtvforum/topic3958369.html), also see [this sensor teardown](https://www.elektroda.com/rtvforum/topic3945688.html) |
| SGP | SGP Air Quality sensor with I2C interface. |
| ShiftRegister | ShiftRegisterShiftRegisterShiftRegisterShiftRegister |
| Battery | Custom mechanism to measure battery level with ADC and an optional relay. See [example here](https://www.elektroda.com/rtvforum/topic3959103.html). |
| Bridge | TODO |
| TuyaMCU | TuyaMCU is a protocol used for communication between WiFI module and external MCU. This protocol is using usually RX1/TX1 port of BK chips. See [TuyaMCU dimmer example](https://www.elektroda.com/rtvforum/topic3929151.html), see [TH06 LCD humidity/temperature sensor example](https://www.elektroda.com/rtvforum/topic3942730.html), see [fan controller example](https://www.elektroda.com/rtvforum/topic3908093.html), see [simple switch example](https://www.elektroda.com/rtvforum/topic3906443.html).<br/>See also [TuyaMCU on forum](https://www.elektroda.com/rtvforum/find.php?q=TuyaMCU). |
| tmSensor | tmSensor must be used only when TuyaMCU is already started. tmSensor is a TuyaMcu Sensor, it's used for Low Power TuyaMCU communication on devices like TuyaMCU door sensor, or TuyaMCU humidity sensor. After device reboots, tmSensor uses TuyaMCU to request data update from the sensor and reports it on MQTT. Then MCU turns off WiFi module again and goes back to sleep. See an [example door sensor here](https://www.elektroda.com/rtvforum/topic3914412.html).<br/>See also [tmSensor on forum](https://www.elektroda.com/rtvforum/find.php?q=tmSensor). |
| NTP | NTP driver is required to get current time and date from web. Without it, there is no correct datetime.<br/>See also [NTP on forum](https://www.elektroda.com/rtvforum/find.php?q=NTP). |
| HTTPButtons | This driver allows you to create custom, scriptable buttons on main WWW page. You can create those buttons in autoexec.bat and assign commands to them.<br/>See also [HTTPButtons on forum](https://www.elektroda.com/rtvforum/find.php?q=HTTPButtons). |
| TESTPOWER | This is a fake POWER measuring socket driver, only for testing.<br/>See also [TESTPOWER on forum](https://www.elektroda.com/rtvforum/find.php?q=TESTPOWER). |
| TESTLED | This is a fake I2C LED driver, only for testing.<br/>See also [TESTLED on forum](https://www.elektroda.com/rtvforum/find.php?q=TESTLED). |
| I2C | Generic I2C, not used for LED drivers, but may be useful for displays or port expanders. Supports both hardware and software I2C.<br/>See also [I2C on forum](https://www.elektroda.com/rtvforum/find.php?q=I2C). |
| BL0942 | BL0942 is a power-metering chip which uses UART protocol for communication. It's usually connected to TX1/RX1 port of BK. You need to calibrate power metering once, just like in Tasmota. See [LSPA9 teardown example](https://www.elektroda.com/rtvforum/topic3887748.html). .<br/>See also [BL0942 on forum](https://www.elektroda.com/rtvforum/find.php?q=BL0942). |
| BL0942SPI | BL0942 is a power-metering chip which uses SPI protocol for communication. It's usually connected to SPI1 port of BK. You need to calibrate power metering once, just like in Tasmota. See [PZIOT-E01 teardown example](https://www.elektroda.com/rtvforum/topic3945667.html). .<br/>See also [BL0942SPI on forum](https://www.elektroda.com/rtvforum/find.php?q=BL0942SPI). |
| ChargingLimit | Mechanism to perform an action based on a max. delta value and max time. Used to control Electric Vehicle chargers. See [discussion](https://github.com/openshwprojects/OpenBK7231T_App/issues/892).<br/>See also [ChargingLimit on forum](https://www.elektroda.com/rtvforum/find.php?q=ChargingLimit). |
| BL0937 | BL0937 is a power-metering chip which uses custom protocol to report data. It requires setting 3 pins in pin config: CF, CF1 and SEL.<br/>See also [BL0937 on forum](https://www.elektroda.com/rtvforum/find.php?q=BL0937). |
| CSE7766 | BL0942 is a power-metering chip which uses UART protocol for communication. It's usually connected to TX1/RX1 port of BK.<br/>See also [CSE7766 on forum](https://www.elektroda.com/rtvforum/find.php?q=CSE7766). |
| SM16703P | WIP driver.<br/>See also [SM16703P on forum](https://www.elektroda.com/rtvforum/find.php?q=SM16703P). |
| IR | IRLibrary wrapper, so you can receive remote signals and send them. See [forum discussion here](https://www.elektroda.com/rtvforum/topic3920360.html), also see [LED strip and IR YT video](https://www.youtube.com/watch?v=KU0tDwtjfjw).<br/>See also [IR on forum](https://www.elektroda.com/rtvforum/find.php?q=IR). |
| DDP | DDP is a LED control protocol that is using UDP. You can use xLights or any other app to control OBK LEDs that way.<br/>See also [DDP on forum](https://www.elektroda.com/rtvforum/find.php?q=DDP). |
| SSDP | SSDP is a discovery protocol, so BK devices can show up in, for example, Windows network section.<br/>See also [SSDP on forum](https://www.elektroda.com/rtvforum/find.php?q=SSDP). |
| DGR | Tasmota Device groups driver. See [forum example](https://www.elektroda.com/rtvforum/topic3925472.html) and TODO-video tutorial (will post on YT soon).<br/>See also [DGR on forum](https://www.elektroda.com/rtvforum/find.php?q=DGR). |
| Wemo | Wemo emulation for Alexa. You must also start SSDP so it can run, because it depends on SSDP discovery.<br/>See also [Wemo on forum](https://www.elektroda.com/rtvforum/find.php?q=Wemo). |
| Hue | Hue emulation for Alexa. You must also start SSDP so it can run, because it depends on SSDP discovery.<br/>See also [Hue on forum](https://www.elektroda.com/rtvforum/find.php?q=Hue). |
| PWMToggler | PWMToggler is a custom abstraction layer that can run on top of raw PWM channels. It provides ability to turn off/on the PWM while keeping it's value, which is not possible by direct channel operations. It can be used for some custom devices with extra lights/lasers. See example [here](https://www.elektroda.com/rtvforum/topic3939064.html).<br/>See also [PWMToggler on forum](https://www.elektroda.com/rtvforum/find.php?q=PWMToggler). |
| DoorSensor | DoorSensor is using deep sleep to preserve battery. This is used for devices without TuyaMCU, where BK deep sleep and wakeup on GPIO is used. This drives requires you to set a DoorSensor pin. Change on door sensor pin wakes up the device. If there are no changes for some time, device goes to sleep. See example [here](https://www.elektroda.com/rtvforum/topic3960149.html). If your door sensor does not wake up in certain pos, please use DSEdge command (try all 3 options, default is 2). .<br/>See also [DoorSensor on forum](https://www.elektroda.com/rtvforum/find.php?q=DoorSensor). |
| MAX72XX_Clock | Simple hardcoded driver for MAX72XX clock. Requirex manual start of MAX72XX driver with MAX72XX setup and NTP start.<br/>See also [MAX72XX_Clock on forum](https://www.elektroda.com/rtvforum/find.php?q=MAX72XX_Clock). |
| ADCButton | This allows you to connect multiple buttons on single ADC pin. Each button must have a different resistor value, this works by probing the voltage on ADC from a resistor divider. You need to select AB_Map first. See forum post for [details](https://www.elektroda.com/rtvforum/viewtopic.php?p=20541973#20541973).<br/>See also [ADCButton on forum](https://www.elektroda.com/rtvforum/find.php?q=ADCButton). |
| SM2135 | SM2135 custom-'I2C' LED driver for RGBCW lights. This will start automatically if you set both SM2135 pin roles. This may need you to remap the RGBCW indexes with SM2135_Map command.<br/>See also [SM2135 on forum](https://www.elektroda.com/rtvforum/find.php?q=SM2135). |
| BP5758D | BP5758D custom-'I2C' LED driver for RGBCW lights. This will start automatically if you set both BP5758D pin roles. This may need you to remap the RGBCW indexes with BP5758D_Map command. This driver is used in some of BL602/Sonoff bulbs, see [video flashing tutorial here](https://www.youtube.com/watch?v=L6d42IMGhHw).<br/>See also [BP5758D on forum](https://www.elektroda.com/rtvforum/find.php?q=BP5758D). |
| BP1658CJ | BP1658CJ custom-'I2C' LED driver for RGBCW lights. This will start automatically if you set both BP1658CJ pin roles. This may need you to remap the RGBCW indexes with BP1658CJ_Map command.<br/>See also [BP1658CJ on forum](https://www.elektroda.com/rtvforum/find.php?q=BP1658CJ). |
| SM2235 | SM2335 andd SM2235 custom-'I2C' LED driver for RGBCW lights. This will start automatically if you set both SM2235 pin roles. This may need you to remap the RGBCW indexes with SM2235_Map command.<br/>See also [SM2235 on forum](https://www.elektroda.com/rtvforum/find.php?q=SM2235). |
| CHT8305 | CHT8305 is a Temperature and Humidity sensor with I2C interface.<br/>See also [CHT8305 on forum](https://www.elektroda.com/rtvforum/find.php?q=CHT8305). |
| MCP9808 | MCP9808 is a Temperature sensor with I2C interface and an external wakeup pin, see [docs](https://www.elektroda.pl/rtvforum/topic3988466.html).<br/>See also [MCP9808 on forum](https://www.elektroda.com/rtvforum/find.php?q=MCP9808). |
| KP18068 | KP18068 I2C LED driver. Unfinished due to the lack of the information.<br/>See also [KP18068 on forum](https://www.elektroda.com/rtvforum/find.php?q=KP18068). |
| KP18058 | KP18058 I2C LED driver. Working, see reverse-engineering [topic](https://www.elektroda.pl/rtvforum/topic3991620.html).<br/>See also [KP18058 on forum](https://www.elektroda.com/rtvforum/find.php?q=KP18058). |
| MAX72XX | MAX72XX LED matrix display driver with font and simple script interface. See [protocol explanation](https://www.elektroda.pl/rtvforum/viewtopic.php?p=18040628#18040628).<br/>See also [MAX72XX on forum](https://www.elektroda.com/rtvforum/find.php?q=MAX72XX). |
| TM1637 | Driver for 7-segment LED display with DIO/CLK interface.<br/>See also [TM1637 on forum](https://www.elektroda.com/rtvforum/find.php?q=TM1637). |
| GN6932 | Driver for 7-segment LED display with DIO/CLK/STB interface. See [this topic](https://www.elektroda.com/rtvforum/topic3971252.html) for details.<br/>See also [GN6932 on forum](https://www.elektroda.com/rtvforum/find.php?q=GN6932). |
| TM1638 | Driver for 7-segment LED display with DIO/CLK/STB interface. TM1638 is very similiar to GN6932 and TM1637. See [this topic](https://www.elektroda.com/rtvforum/viewtopic.php?p=20553628#20553628) for details.<br/>See also [TM1638 on forum](https://www.elektroda.com/rtvforum/find.php?q=TM1638). |
| HT16K33 | Driver for 16-segment LED display with I2C. See [protocol explanation](https://www.elektroda.pl/rtvforum/topic3984616.html).<br/>See also [HT16K33 on forum](https://www.elektroda.com/rtvforum/find.php?q=HT16K33). |
| SHT3X | Humidity/temperature sensor. See [SHT Sensor tutorial topic here](https://www.elektroda.com/rtvforum/topic3958369.html), also see [this sensor teardown](https://www.elektroda.com/rtvforum/topic3945688.html).<br/>See also [SHT3X on forum](https://www.elektroda.com/rtvforum/find.php?q=SHT3X). |
| SGP | SGP Air Quality sensor with I2C interface.<br/>See also [SGP on forum](https://www.elektroda.com/rtvforum/find.php?q=SGP). |
| ShiftRegister | ShiftRegisterShiftRegisterShiftRegisterShiftRegister.<br/>See also [ShiftRegister on forum](https://www.elektroda.com/rtvforum/find.php?q=ShiftRegister). |
| Battery | Custom mechanism to measure battery level with ADC and an optional relay. See [example here](https://www.elektroda.com/rtvforum/topic3959103.html).<br/>See also [Battery on forum](https://www.elektroda.com/rtvforum/find.php?q=Battery). |
| Bridge | TODO.<br/>See also [Bridge on forum](https://www.elektroda.com/rtvforum/find.php?q=Bridge). |
9 changes: 7 additions & 2 deletions scripts/getcommands.js
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ for (let i = 0; i < commands.length; i++){
let cmd = commands[i];


let descMore ="<br/>" + genReadMore(cmd.name);
let descMore = "<br/>" + genReadMore(cmd.name);
let textshort = `| ${cmd.name} | ${cmd.args}${cmd.requires ? '\nReq:' + cmd.requires : ''} | ${cmd.descr}${cmd.examples ? '\ne.g.:' + cmd.examples : ''}${descMore} |`;
let textlong = `| ${cmd.name} | ${cmd.args}${cmd.requires ? '\nReq:' + cmd.requires : ''} | ${cmd.descr}${cmd.examples ? '\ne.g.:' + cmd.examples : ''}${descMore} | File: ${cmd.file}\nFunction: ${cmd.fn} |`;

Expand Down Expand Up @@ -984,7 +984,12 @@ for (let i = 0; i < drvs.length; i++) {

let drv = drvs[i];

let textshort = `| ${drv.name} | ${drv.descr} |`;
let descMore = "<br/>" + genReadMore(drv.name);
let descBasic = drv.descr;
if (!descBasic.endsWith('.')) {
descBasic += '.';
}
let textshort = `| ${drv.name} | ${descBasic}${descMore} |`;

// allow multi-row entries in table entries.
textshort = textshort.replace(/\n/g, '<br/>');
Expand Down

0 comments on commit ed2b995

Please sign in to comment.