Skip to content

Commit 7ab42cc

Browse files
author
runner
committed
Generate develop docs
1 parent f2174eb commit 7ab42cc

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

docs/develop/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ sensor_inputs:
8383
- LM75 temperature sensor (`lm75`)
8484
- MCP3008 analog to digital converter (`mcp3008`)
8585
- MCP3xxx analog to digital converter via GPIOZero (`mcp3xxx`)
86+
- MH-Z19 NDIR CO2 sensor (`mhz19`)
8687
- PMS5003 Particulate Matter Sensor (`pms5003`)
8788
- SHT4x temperature and humidity sensor (`sht4x`)
8889
- YF-S201 Flow Rate Sensor

docs/develop/dev/modules/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ In order to support as much hardware as possible without changing the project's
66

77
In order for a module to specify its requirements, a module-level constant is used which lists them in the same format as the `pip install` command.
88

9-
[mqtt_io.modules.gpio.raspberrypi:REQUIREMENTS](https://github.com/flyte/mqtt-io/blob/88cff8505b71cba165c098646f5f89859a1aed48/mqtt_io/modules/gpio/raspberrypi.py#L13):
9+
[mqtt_io.modules.gpio.raspberrypi:REQUIREMENTS](https://github.com/flyte/mqtt-io/blob/72d6d1fa192df5f26536232c7b8e689924ed5fc8/mqtt_io/modules/gpio/raspberrypi.py#L13):
1010

1111
```python
1212
REQUIREMENTS = ("RPi.GPIO",)
@@ -22,7 +22,7 @@ To specify extra schema for the pin-level config sections (`digital_inputs`, `di
2222

2323
If the pin-level schema only applies to an input or an output (in the case of a GPIO module), then instead of setting it on the `PIN_SCHEMA` class-level constant, use `INPUT_SCHEMA` or `OUTPUT_SCHEMA` respectively.
2424

25-
[mqtt_io.modules.gpio.gpiod:CONFIG_SCHEMA](https://github.com/flyte/mqtt-io/blob/88cff8505b71cba165c098646f5f89859a1aed48/mqtt_io/modules/gpio/gpiod.py#L18):
25+
[mqtt_io.modules.gpio.gpiod:CONFIG_SCHEMA](https://github.com/flyte/mqtt-io/blob/72d6d1fa192df5f26536232c7b8e689924ed5fc8/mqtt_io/modules/gpio/gpiod.py#L18):
2626

2727
```python
2828
CONFIG_SCHEMA = {
@@ -40,7 +40,7 @@ CONFIG_SCHEMA = {
4040

4141
During software startup, each GPIO module's `setup_module()` method will be called once per instance of the module in the `gpio_modules` section of the config file.
4242

43-
[mqtt_io.modules.gpio:GenericGPIO.setup_module](https://github.com/flyte/mqtt-io/blob/88cff8505b71cba165c098646f5f89859a1aed48/mqtt_io/modules/gpio/__init__.py#L109):
43+
[mqtt_io.modules.gpio:GenericGPIO.setup_module](https://github.com/flyte/mqtt-io/blob/72d6d1fa192df5f26536232c7b8e689924ed5fc8/mqtt_io/modules/gpio/__init__.py#L109):
4444

4545
```python
4646
def setup_module(self) -> None:
@@ -73,7 +73,7 @@ The GPIO library is then initialised and an object may be stored (usually at `se
7373

7474
It may be appropriate to build mappings of pin directions (input, output), pullups (up, down, off) and interrupt edges (rising, falling, both) if appropriate for this hardware. The base GenericGPIO class uses its own constants to refer to these, so the mappings translate the base GenericGPIO's constants to ones used by the hardware's Python library.
7575

76-
[mqtt_io.modules.gpio:PinDirection](https://github.com/flyte/mqtt-io/blob/88cff8505b71cba165c098646f5f89859a1aed48/mqtt_io/modules/gpio/__init__.py#L22):
76+
[mqtt_io.modules.gpio:PinDirection](https://github.com/flyte/mqtt-io/blob/72d6d1fa192df5f26536232c7b8e689924ed5fc8/mqtt_io/modules/gpio/__init__.py#L22):
7777

7878
```python
7979
class PinDirection(Enum):
@@ -85,7 +85,7 @@ class PinDirection(Enum):
8585
OUTPUT = auto()
8686
```
8787

88-
[mqtt_io.modules.gpio:PinPUD](https://github.com/flyte/mqtt-io/blob/88cff8505b71cba165c098646f5f89859a1aed48/mqtt_io/modules/gpio/__init__.py#L31):
88+
[mqtt_io.modules.gpio:PinPUD](https://github.com/flyte/mqtt-io/blob/72d6d1fa192df5f26536232c7b8e689924ed5fc8/mqtt_io/modules/gpio/__init__.py#L31):
8989

9090
```python
9191
class PinPUD(Enum):
@@ -98,7 +98,7 @@ class PinPUD(Enum):
9898
DOWN = auto()
9999
```
100100

101-
[mqtt_io.modules.gpio:InterruptEdge](https://github.com/flyte/mqtt-io/blob/88cff8505b71cba165c098646f5f89859a1aed48/mqtt_io/modules/gpio/__init__.py#L41):
101+
[mqtt_io.modules.gpio:InterruptEdge](https://github.com/flyte/mqtt-io/blob/72d6d1fa192df5f26536232c7b8e689924ed5fc8/mqtt_io/modules/gpio/__init__.py#L41):
102102

103103
```python
104104
class InterruptEdge(Enum):
@@ -113,7 +113,7 @@ class InterruptEdge(Enum):
113113

114114
The `raspberrypi` GPIO module is a good example of the above:
115115

116-
[mqtt_io.modules.gpio.raspberrypi:GPIO.setup_module](https://github.com/flyte/mqtt-io/blob/88cff8505b71cba165c098646f5f89859a1aed48/mqtt_io/modules/gpio/raspberrypi.py#L23):
116+
[mqtt_io.modules.gpio.raspberrypi:GPIO.setup_module](https://github.com/flyte/mqtt-io/blob/72d6d1fa192df5f26536232c7b8e689924ed5fc8/mqtt_io/modules/gpio/raspberrypi.py#L23):
117117

118118
```python
119119
def setup_module(self) -> None:
@@ -142,7 +142,7 @@ def setup_module(self) -> None:
142142

143143
If a digital input is not configured as an [interrupt](config/interrupts.md) (or even [sometimes if it is](config/reference/digital_inputs/?id=digital_inputs-star-interrupt_for)), then a loop will be created which polls the pin's current value and publishes a `DigitalInputChangedEvent` event when it does. As part of the initialisation of each pin, a callback function to publish the new value on MQTT will be subscribed to this event.
144144

145-
[mqtt_io.server.MqttIo._init_digital_inputs](https://github.com/flyte/mqtt-io/blob/88cff8505b71cba165c098646f5f89859a1aed48/mqtt_io/server.py#L377):
145+
[mqtt_io.server.MqttIo._init_digital_inputs](https://github.com/flyte/mqtt-io/blob/72d6d1fa192df5f26536232c7b8e689924ed5fc8/mqtt_io/server.py#L377):
146146

147147
```python
148148
def _init_digital_inputs(self) -> None:
@@ -175,7 +175,7 @@ def _init_digital_inputs(self) -> None:
175175

176176
For each of the entries in `digital_inputs` and `digital_outputs`, `setup_pin()` will be called. This step is for configuring the hardware's pins to be input or outputs, or anything else that must be set at pin level.
177177

178-
[mqtt_io.modules.gpio:GenericGPIO.setup_pin](https://github.com/flyte/mqtt-io/blob/88cff8505b71cba165c098646f5f89859a1aed48/mqtt_io/modules/gpio/__init__.py#L118):
178+
[mqtt_io.modules.gpio:GenericGPIO.setup_pin](https://github.com/flyte/mqtt-io/blob/72d6d1fa192df5f26536232c7b8e689924ed5fc8/mqtt_io/modules/gpio/__init__.py#L118):
179179

180180
```python
181181
def setup_pin(
@@ -214,7 +214,7 @@ digital_outputs:
214214
215215
Here's the `raspberrypi` GPIO module's `setup_pin()` implementation:
216216
217-
[mqtt_io.modules.gpio.raspberrypi:GPIO.setup_pin](https://github.com/flyte/mqtt-io/blob/88cff8505b71cba165c098646f5f89859a1aed48/mqtt_io/modules/gpio/raspberrypi.py#L44):
217+
[mqtt_io.modules.gpio.raspberrypi:GPIO.setup_pin](https://github.com/flyte/mqtt-io/blob/72d6d1fa192df5f26536232c7b8e689924ed5fc8/mqtt_io/modules/gpio/raspberrypi.py#L44):
218218
219219
```python
220220
def setup_pin(

0 commit comments

Comments
 (0)