boneIO 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- boneio/__init__.py +11 -0
- boneio/bonecli.py +165 -0
- boneio/const.py +111 -0
- boneio/example_config/__init__.py +0 -0
- boneio/example_config/adc.yaml +14 -0
- boneio/example_config/config.yaml +25 -0
- boneio/example_config/input.yaml +200 -0
- boneio/example_config/output24x16A.yaml +139 -0
- boneio/example_config/output32x5A.yaml +160 -0
- boneio/fonts/danube__.ttf +0 -0
- boneio/helper/__init__.py +50 -0
- boneio/helper/exceptions.py +13 -0
- boneio/helper/gpio.py +81 -0
- boneio/helper/ha_discovery.py +128 -0
- boneio/helper/mqtt.py +30 -0
- boneio/helper/oled.py +15 -0
- boneio/helper/queue.py +32 -0
- boneio/helper/stats.py +185 -0
- boneio/helper/yaml.py +46 -0
- boneio/input/__init__.py +5 -0
- boneio/input/gpio.py +122 -0
- boneio/manager.py +398 -0
- boneio/modbus.py +107 -0
- boneio/mqtt_client.py +170 -0
- boneio/oled.py +118 -0
- boneio/relay/__init__.py +5 -0
- boneio/relay/basic.py +76 -0
- boneio/relay/gpio.py +44 -0
- boneio/relay/mcp.py +56 -0
- boneio/schema.yaml +310 -0
- boneio/sensor/__init__.py +12 -0
- boneio/sensor/adc.py +38 -0
- boneio/sensor/gpio.py +32 -0
- boneio/sensor/sdm630.py +193 -0
- boneio/sensor/temp/__init__.py +52 -0
- boneio/version.py +2 -0
- boneio-0.1.0.dist-info/LICENSE +674 -0
- boneio-0.1.0.dist-info/METADATA +51 -0
- boneio-0.1.0.dist-info/RECORD +42 -0
- boneio-0.1.0.dist-info/WHEEL +5 -0
- boneio-0.1.0.dist-info/entry_points.txt +3 -0
- boneio-0.1.0.dist-info/top_level.txt +1 -0
boneio/__init__.py
ADDED
boneio/bonecli.py
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import logging
|
|
3
|
+
import os
|
|
4
|
+
from functools import wraps
|
|
5
|
+
|
|
6
|
+
import click
|
|
7
|
+
from colorlog import ColoredFormatter
|
|
8
|
+
|
|
9
|
+
from boneio.const import (
|
|
10
|
+
ADC,
|
|
11
|
+
ENABLED,
|
|
12
|
+
HA_DISCOVERY,
|
|
13
|
+
HOST,
|
|
14
|
+
INPUT,
|
|
15
|
+
LM75,
|
|
16
|
+
MCP23017,
|
|
17
|
+
MCP_TEMP_9808,
|
|
18
|
+
MODBUS,
|
|
19
|
+
MQTT,
|
|
20
|
+
OLED,
|
|
21
|
+
OUTPUT,
|
|
22
|
+
PAHO,
|
|
23
|
+
PASSWORD,
|
|
24
|
+
PYMODBUS,
|
|
25
|
+
SDM630,
|
|
26
|
+
TOPIC_PREFIX,
|
|
27
|
+
USERNAME,
|
|
28
|
+
)
|
|
29
|
+
from boneio.helper import CustomValidator, load_yaml_file
|
|
30
|
+
from boneio.manager import Manager
|
|
31
|
+
from boneio.mqtt_client import MQTTClient
|
|
32
|
+
from boneio.version import __version__
|
|
33
|
+
|
|
34
|
+
_LOGGER = logging.getLogger(__name__)
|
|
35
|
+
logging.basicConfig(level=logging.INFO)
|
|
36
|
+
fmt = "%(asctime)s %(levelname)s (%(threadName)s) [%(name)s] %(message)s"
|
|
37
|
+
datefmt = "%Y-%m-%d %H:%M:%S"
|
|
38
|
+
colorfmt = f"%(log_color)s{fmt}%(reset)s"
|
|
39
|
+
logging.getLogger().handlers[0].setFormatter(
|
|
40
|
+
ColoredFormatter(
|
|
41
|
+
colorfmt,
|
|
42
|
+
datefmt=datefmt,
|
|
43
|
+
reset=True,
|
|
44
|
+
log_colors={
|
|
45
|
+
"DEBUG": "cyan",
|
|
46
|
+
"INFO": "green",
|
|
47
|
+
"WARNING": "yellow",
|
|
48
|
+
"ERROR": "red",
|
|
49
|
+
"CRITICAL": "red",
|
|
50
|
+
},
|
|
51
|
+
)
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
MAINPATH = os.path.join(os.path.dirname(__file__))
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def add_options(options):
|
|
58
|
+
def _add_options(func):
|
|
59
|
+
for option in reversed(options):
|
|
60
|
+
func = option(func)
|
|
61
|
+
return func
|
|
62
|
+
|
|
63
|
+
return _add_options
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def coro(f):
|
|
67
|
+
@wraps(f)
|
|
68
|
+
def wrapper(*args, **kwargs):
|
|
69
|
+
return asyncio.run(f(*args, **kwargs))
|
|
70
|
+
|
|
71
|
+
return wrapper
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
@click.group(no_args_is_help=True)
|
|
75
|
+
@click.pass_context
|
|
76
|
+
@click.version_option(__version__)
|
|
77
|
+
@coro
|
|
78
|
+
async def cli(ctx):
|
|
79
|
+
"""A tool to run commands."""
|
|
80
|
+
pass
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
_options = [
|
|
84
|
+
click.option(
|
|
85
|
+
"-d",
|
|
86
|
+
"--debug",
|
|
87
|
+
default=False,
|
|
88
|
+
count=True,
|
|
89
|
+
help="Set Debug mode. Single debug is debug of this lib. Second d is debug of aioxmpp as well.",
|
|
90
|
+
),
|
|
91
|
+
click.option(
|
|
92
|
+
"--config",
|
|
93
|
+
"-c",
|
|
94
|
+
type=str,
|
|
95
|
+
default="./config.yaml",
|
|
96
|
+
help="Config yaml file. Default to ./config.yaml",
|
|
97
|
+
),
|
|
98
|
+
click.option(
|
|
99
|
+
"--mqttpassword",
|
|
100
|
+
envvar="MQTTPASS",
|
|
101
|
+
type=str,
|
|
102
|
+
help="Mqtt password. To use as ENV named MQTTPASS",
|
|
103
|
+
),
|
|
104
|
+
]
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
@cli.command()
|
|
108
|
+
@add_options(_options)
|
|
109
|
+
@click.pass_context
|
|
110
|
+
@coro
|
|
111
|
+
async def run(ctx, debug: int, config: str, mqttpassword: str = ""):
|
|
112
|
+
"""Run BoneIO."""
|
|
113
|
+
_LOGGER.info("BoneIO starting.")
|
|
114
|
+
if debug == 0:
|
|
115
|
+
logging.getLogger().setLevel(logging.INFO)
|
|
116
|
+
if debug > 0:
|
|
117
|
+
logging.getLogger().setLevel(logging.DEBUG)
|
|
118
|
+
|
|
119
|
+
_LOGGER.info("Debug mode active")
|
|
120
|
+
_LOGGER.debug(f"Lib version is {__version__}")
|
|
121
|
+
if debug > 1:
|
|
122
|
+
logging.getLogger(PAHO).setLevel(logging.DEBUG)
|
|
123
|
+
logging.getLogger(PYMODBUS).setLevel(logging.DEBUG)
|
|
124
|
+
logging.getLogger("pymodbus.client").setLevel(logging.DEBUG)
|
|
125
|
+
else:
|
|
126
|
+
logging.getLogger(PAHO).setLevel(logging.WARN)
|
|
127
|
+
schema = load_yaml_file(os.path.join(MAINPATH, "schema.yaml"))
|
|
128
|
+
v = CustomValidator(schema, purge_unknown=True)
|
|
129
|
+
config_yaml = load_yaml_file(config)
|
|
130
|
+
if not config_yaml:
|
|
131
|
+
_LOGGER.info("Missing file.")
|
|
132
|
+
return
|
|
133
|
+
_config = v.normalized(config_yaml)
|
|
134
|
+
_LOGGER.info("Connecting to MQTT.")
|
|
135
|
+
client = MQTTClient(
|
|
136
|
+
host=_config[MQTT][HOST],
|
|
137
|
+
username=_config[MQTT].get(USERNAME),
|
|
138
|
+
password=_config[MQTT].get(PASSWORD, mqttpassword),
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
manager = Manager(
|
|
142
|
+
send_message=client.send_message,
|
|
143
|
+
topic_prefix=_config[MQTT][TOPIC_PREFIX],
|
|
144
|
+
relay_pins=_config.get(OUTPUT, []),
|
|
145
|
+
input_pins=_config.get(INPUT, []),
|
|
146
|
+
ha_discovery=_config[MQTT][HA_DISCOVERY][ENABLED],
|
|
147
|
+
ha_discovery_prefix=_config[MQTT][HA_DISCOVERY][TOPIC_PREFIX],
|
|
148
|
+
sensors={
|
|
149
|
+
LM75: _config.get(LM75),
|
|
150
|
+
MCP_TEMP_9808: _config.get(MCP_TEMP_9808),
|
|
151
|
+
SDM630: _config.get(SDM630),
|
|
152
|
+
},
|
|
153
|
+
mcp23017=_config.get(MCP23017, []),
|
|
154
|
+
modbus=_config.get(MODBUS),
|
|
155
|
+
oled=_config.get(OLED),
|
|
156
|
+
adc_list=_config.get(ADC, []),
|
|
157
|
+
)
|
|
158
|
+
tasks = set()
|
|
159
|
+
tasks.update(manager.get_tasks())
|
|
160
|
+
tasks.add(client.start_client(manager))
|
|
161
|
+
await asyncio.gather(*tasks)
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
if __name__ == "__main__":
|
|
165
|
+
asyncio.get_event_loop().run_until_complete(cli())
|
boneio/const.py
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# from typing import Literal
|
|
2
|
+
from datetime import timedelta
|
|
3
|
+
from Adafruit_BBIO.GPIO import HIGH, LOW, BOTH, FALLING
|
|
4
|
+
from typing_extensions import Literal
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# MISCELLANEOUS CONSTS
|
|
8
|
+
RELAY = "relay"
|
|
9
|
+
ON = "ON"
|
|
10
|
+
OFF = "OFF"
|
|
11
|
+
STATE = "state"
|
|
12
|
+
ENABLED = "enabled"
|
|
13
|
+
OUTPUT = "output"
|
|
14
|
+
PIN = "pin"
|
|
15
|
+
ID = "id"
|
|
16
|
+
KIND = "kind"
|
|
17
|
+
GPIO = "gpio"
|
|
18
|
+
ACTIONS = "actions"
|
|
19
|
+
ACTION = "action"
|
|
20
|
+
OUTPUT = "output"
|
|
21
|
+
SWITCH = "switch"
|
|
22
|
+
CONFIG_PIN = "/usr/bin/config-pin"
|
|
23
|
+
UPDATE_INTERVAL = "update_interval"
|
|
24
|
+
ADC = "adc"
|
|
25
|
+
IP = "ip"
|
|
26
|
+
MASK = "mask"
|
|
27
|
+
MAC = "mac"
|
|
28
|
+
NONE = "none"
|
|
29
|
+
MODBUS = "modbus"
|
|
30
|
+
UART = "uart"
|
|
31
|
+
RX = "rx"
|
|
32
|
+
TX = "tx"
|
|
33
|
+
|
|
34
|
+
UARTS = {
|
|
35
|
+
"uart1": {ID: "/dev/ttyS1", TX: "P9.24", RX: "P9.26"},
|
|
36
|
+
"uart4": {ID: "/dev/ttyS4", TX: "P9.13", RX: "P9.11"},
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
# TIMINGS FOR BUTTONS
|
|
40
|
+
DEBOUNCE_DURATION = timedelta(seconds=0.2)
|
|
41
|
+
LONG_PRESS_DURATION = timedelta(seconds=0.7)
|
|
42
|
+
DELAY_DURATION = 0.1
|
|
43
|
+
SECOND_DELAY_DURATION = 0.3
|
|
44
|
+
|
|
45
|
+
# HA CONSTS
|
|
46
|
+
HOMEASSISTANT = "homeassistant"
|
|
47
|
+
HA_DISCOVERY = "ha_discovery"
|
|
48
|
+
HA_TYPE = "ha_type"
|
|
49
|
+
SHOW_HA = "show_in_ha"
|
|
50
|
+
|
|
51
|
+
# OLED CONST
|
|
52
|
+
OLED = "oled"
|
|
53
|
+
FONTS = "fonts"
|
|
54
|
+
OLED_PIN = "P9_41"
|
|
55
|
+
GIGABYTE = 1073741824
|
|
56
|
+
MEGABYTE = 1048576
|
|
57
|
+
WIDTH = 128
|
|
58
|
+
UPTIME = "uptime"
|
|
59
|
+
NETWORK = "network"
|
|
60
|
+
CPU = "cpu"
|
|
61
|
+
DISK = "disk"
|
|
62
|
+
MEMORY = "memory"
|
|
63
|
+
SWAP = "swap"
|
|
64
|
+
WHITE = "white"
|
|
65
|
+
|
|
66
|
+
# INPUT CONST
|
|
67
|
+
INPUT = "input"
|
|
68
|
+
SINGLE = "single"
|
|
69
|
+
DOUBLE = "double"
|
|
70
|
+
LONG = "long"
|
|
71
|
+
PRESSED = "pressed"
|
|
72
|
+
RELEASED = "released"
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
# MQTT CONST
|
|
76
|
+
PAHO = "paho.mqtt.client"
|
|
77
|
+
PYMODBUS = "pymodbus"
|
|
78
|
+
MQTT = "mqtt"
|
|
79
|
+
HOST = "host"
|
|
80
|
+
USERNAME = "username"
|
|
81
|
+
PASSWORD = "password"
|
|
82
|
+
ONLINE = "online"
|
|
83
|
+
OFFLINE = "offline"
|
|
84
|
+
TOPIC_PREFIX = "topic_prefix"
|
|
85
|
+
|
|
86
|
+
# I2C and MCP CONST
|
|
87
|
+
ADDRESS = "address"
|
|
88
|
+
MCP23017 = "mcp23017"
|
|
89
|
+
MCP = "mcp"
|
|
90
|
+
MCP_ID = "mcp_id"
|
|
91
|
+
INIT_SLEEP = "init_sleep"
|
|
92
|
+
|
|
93
|
+
# SENSOR CONST
|
|
94
|
+
TEMPERATURE = "temperature"
|
|
95
|
+
SENSOR = "sensor"
|
|
96
|
+
BINARY_SENSOR = "binary_sensor"
|
|
97
|
+
LM75 = "lm75"
|
|
98
|
+
MCP_TEMP_9808 = "mcp9808"
|
|
99
|
+
INPUT_SENSOR = "inputsensor"
|
|
100
|
+
SDM630 = "sdm630"
|
|
101
|
+
|
|
102
|
+
BASE = "base"
|
|
103
|
+
LENGTH = "length"
|
|
104
|
+
REGISTERS = "registers"
|
|
105
|
+
|
|
106
|
+
# TYPING
|
|
107
|
+
ClickTypes = Literal[SINGLE, DOUBLE, LONG, PRESSED, RELEASED]
|
|
108
|
+
OledDataTypes = Literal[UPTIME, NETWORK, CPU, DISK, MEMORY, SWAP, OUTPUT]
|
|
109
|
+
Gpio_States = Literal[HIGH, LOW]
|
|
110
|
+
Gpio_Edges = Literal[BOTH, FALLING]
|
|
111
|
+
InputTypes = Literal[INPUT, INPUT_SENSOR]
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
mqtt:
|
|
2
|
+
host: hostname
|
|
3
|
+
username: mqtt
|
|
4
|
+
password: password
|
|
5
|
+
topic_prefix: boneiohome
|
|
6
|
+
ha_discovery:
|
|
7
|
+
enabled: yes
|
|
8
|
+
|
|
9
|
+
oled:
|
|
10
|
+
|
|
11
|
+
lm75:
|
|
12
|
+
id: temp
|
|
13
|
+
address: 0x48
|
|
14
|
+
|
|
15
|
+
mcp23017:
|
|
16
|
+
- id: mcp1
|
|
17
|
+
address: 0x20
|
|
18
|
+
- id: mcp2
|
|
19
|
+
address: 0x21
|
|
20
|
+
|
|
21
|
+
input: !include input.yaml
|
|
22
|
+
|
|
23
|
+
output: !include output32x5A.yaml
|
|
24
|
+
|
|
25
|
+
adc: !include adc.yaml
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
- id: J1_2
|
|
2
|
+
pin: P9_29
|
|
3
|
+
actions:
|
|
4
|
+
single:
|
|
5
|
+
action: output
|
|
6
|
+
pin: light 1
|
|
7
|
+
double:
|
|
8
|
+
action: output
|
|
9
|
+
pin: switch 1
|
|
10
|
+
- id: J1_3
|
|
11
|
+
pin: P9_30
|
|
12
|
+
actions:
|
|
13
|
+
single:
|
|
14
|
+
action: output
|
|
15
|
+
pin: light 2
|
|
16
|
+
double:
|
|
17
|
+
action: output
|
|
18
|
+
pin: switch 2
|
|
19
|
+
- id: J1_4
|
|
20
|
+
pin: P9_31
|
|
21
|
+
actions:
|
|
22
|
+
single:
|
|
23
|
+
action: output
|
|
24
|
+
pin: light 3
|
|
25
|
+
double:
|
|
26
|
+
action: output
|
|
27
|
+
pin: switch 3
|
|
28
|
+
- id: J1_5
|
|
29
|
+
pin: P9_42
|
|
30
|
+
actions:
|
|
31
|
+
single:
|
|
32
|
+
action: output
|
|
33
|
+
pin: light 4
|
|
34
|
+
double:
|
|
35
|
+
action: output
|
|
36
|
+
pin: switch 4
|
|
37
|
+
- id: J1_6
|
|
38
|
+
pin: P8_46
|
|
39
|
+
actions:
|
|
40
|
+
single:
|
|
41
|
+
action: output
|
|
42
|
+
pin: light 5
|
|
43
|
+
double:
|
|
44
|
+
action: output
|
|
45
|
+
pin: switch 5
|
|
46
|
+
- id: J1_7
|
|
47
|
+
pin: P8_45
|
|
48
|
+
actions:
|
|
49
|
+
single:
|
|
50
|
+
action: output
|
|
51
|
+
pin: light 6
|
|
52
|
+
double:
|
|
53
|
+
action: output
|
|
54
|
+
pin: switch 6
|
|
55
|
+
- id: J1_8
|
|
56
|
+
pin: P8_44
|
|
57
|
+
actions:
|
|
58
|
+
single:
|
|
59
|
+
action: output
|
|
60
|
+
pin: light 7
|
|
61
|
+
|
|
62
|
+
- id: J2_2
|
|
63
|
+
pin: P8_36
|
|
64
|
+
actions:
|
|
65
|
+
single:
|
|
66
|
+
action: output
|
|
67
|
+
pin: light 8
|
|
68
|
+
- id: J2_3
|
|
69
|
+
pin: P8_35
|
|
70
|
+
actions:
|
|
71
|
+
single:
|
|
72
|
+
action: output
|
|
73
|
+
pin: light 9
|
|
74
|
+
- id: J2_4
|
|
75
|
+
pin: P8_34
|
|
76
|
+
actions:
|
|
77
|
+
single:
|
|
78
|
+
action: output
|
|
79
|
+
pin: light 10
|
|
80
|
+
- id: J2_5
|
|
81
|
+
pin: P8_33
|
|
82
|
+
actions:
|
|
83
|
+
single:
|
|
84
|
+
action: output
|
|
85
|
+
pin: light 11
|
|
86
|
+
- id: J2_6
|
|
87
|
+
pin: P8_32
|
|
88
|
+
actions:
|
|
89
|
+
single:
|
|
90
|
+
action: output
|
|
91
|
+
pin: light 12
|
|
92
|
+
- id: J2_7
|
|
93
|
+
pin: P8_31
|
|
94
|
+
actions:
|
|
95
|
+
single:
|
|
96
|
+
action: output
|
|
97
|
+
pin: light 13
|
|
98
|
+
- id: J2_8
|
|
99
|
+
pin: P8_30
|
|
100
|
+
actions:
|
|
101
|
+
single:
|
|
102
|
+
action: output
|
|
103
|
+
pin: light 14
|
|
104
|
+
|
|
105
|
+
- id: J3_2
|
|
106
|
+
pin: P8_43
|
|
107
|
+
actions:
|
|
108
|
+
single:
|
|
109
|
+
action: output
|
|
110
|
+
pin: light 15
|
|
111
|
+
- id: J3_3
|
|
112
|
+
pin: P8_42
|
|
113
|
+
actions:
|
|
114
|
+
single:
|
|
115
|
+
action: output
|
|
116
|
+
pin: light 16
|
|
117
|
+
- id: J3_4
|
|
118
|
+
pin: P8_41
|
|
119
|
+
actions:
|
|
120
|
+
single:
|
|
121
|
+
action: output
|
|
122
|
+
pin: light 4
|
|
123
|
+
- id: J3_5
|
|
124
|
+
pin: P8_40
|
|
125
|
+
- id: J3_6
|
|
126
|
+
pin: P8_39
|
|
127
|
+
- id: J3_7
|
|
128
|
+
pin: P8_38
|
|
129
|
+
- id: J3_8
|
|
130
|
+
pin: P8_37
|
|
131
|
+
|
|
132
|
+
- id: J4_2
|
|
133
|
+
pin: P8_29
|
|
134
|
+
- id: J4_3
|
|
135
|
+
pin: P8_28
|
|
136
|
+
- id: J4_4
|
|
137
|
+
pin: P8_27
|
|
138
|
+
- id: J4_5
|
|
139
|
+
pin: P8_26
|
|
140
|
+
- id: J4_6
|
|
141
|
+
pin: P8_19
|
|
142
|
+
- id: J4_7
|
|
143
|
+
pin: P8_18
|
|
144
|
+
- id: J4_8
|
|
145
|
+
pin: P8_17
|
|
146
|
+
|
|
147
|
+
- id: J5_2
|
|
148
|
+
pin: P9_18
|
|
149
|
+
- id: J5_3
|
|
150
|
+
pin: P9_21
|
|
151
|
+
- id: J5_4
|
|
152
|
+
pin: P9_22
|
|
153
|
+
- id: J5_5
|
|
154
|
+
pin: P9_23
|
|
155
|
+
- id: J5_6
|
|
156
|
+
pin: P8_25 #MMC1_DAT0
|
|
157
|
+
- id: J5_7
|
|
158
|
+
pin: P8_27 #LCD VSYNC
|
|
159
|
+
- id: J5_8
|
|
160
|
+
pin: P8_28 #LCD_PCLK
|
|
161
|
+
|
|
162
|
+
- id: J6_2
|
|
163
|
+
pin: P8_16
|
|
164
|
+
- id: J6_3
|
|
165
|
+
pin: P8_15
|
|
166
|
+
- id: J6_4
|
|
167
|
+
pin: P8_14
|
|
168
|
+
- id: J6_5
|
|
169
|
+
pin: P8_13
|
|
170
|
+
- id: J6_6
|
|
171
|
+
pin: P8_12
|
|
172
|
+
- id: J6_7
|
|
173
|
+
pin: P8_11
|
|
174
|
+
- id: J6_8
|
|
175
|
+
pin: P8_10
|
|
176
|
+
|
|
177
|
+
- id: J7_2
|
|
178
|
+
pin: P9_11
|
|
179
|
+
- id: J7_3
|
|
180
|
+
pin: P9_12
|
|
181
|
+
- id: J7_4
|
|
182
|
+
pin: P9_13
|
|
183
|
+
- id: J7_5
|
|
184
|
+
pin: P9_14
|
|
185
|
+
- id: J7_6
|
|
186
|
+
pin: P9_15
|
|
187
|
+
- id: J7_7
|
|
188
|
+
pin: P9_16
|
|
189
|
+
- id: J7_8
|
|
190
|
+
pin: P9_17
|
|
191
|
+
|
|
192
|
+
- id: J8_2
|
|
193
|
+
pin: P8_9
|
|
194
|
+
kind: sensor
|
|
195
|
+
- id: J8_3
|
|
196
|
+
pin: P8_8
|
|
197
|
+
kind: sensor
|
|
198
|
+
- id: J8_4
|
|
199
|
+
pin: P8_7
|
|
200
|
+
kind: sensor
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
|
|
2
|
+
- id: mcp1-gpa0
|
|
3
|
+
kind: mcp
|
|
4
|
+
mcp_id: mcp1
|
|
5
|
+
pin: 0
|
|
6
|
+
ha_type: light
|
|
7
|
+
- id: mcp1-gpa1
|
|
8
|
+
kind: mcp
|
|
9
|
+
mcp_id: mcp1
|
|
10
|
+
pin: 1
|
|
11
|
+
ha_type: light
|
|
12
|
+
|
|
13
|
+
- id: mcp1-gpb0
|
|
14
|
+
kind: mcp
|
|
15
|
+
mcp_id: mcp1
|
|
16
|
+
pin: 8
|
|
17
|
+
ha_type: light
|
|
18
|
+
- id: mcp1-gpb1
|
|
19
|
+
kind: mcp
|
|
20
|
+
mcp_id: mcp1
|
|
21
|
+
pin: 9
|
|
22
|
+
ha_type: light
|
|
23
|
+
- id: mcp1-gpb2
|
|
24
|
+
kind: mcp
|
|
25
|
+
mcp_id: mcp1
|
|
26
|
+
pin: 10
|
|
27
|
+
ha_type: light
|
|
28
|
+
- id: mcp1-gpb3
|
|
29
|
+
kind: mcp
|
|
30
|
+
mcp_id: mcp1
|
|
31
|
+
pin: 11
|
|
32
|
+
ha_type: light
|
|
33
|
+
- id: mcp1-gpb4
|
|
34
|
+
kind: mcp
|
|
35
|
+
mcp_id: mcp1
|
|
36
|
+
pin: 12
|
|
37
|
+
ha_type: light
|
|
38
|
+
- id: mcp1-gpb5
|
|
39
|
+
kind: mcp
|
|
40
|
+
mcp_id: mcp1
|
|
41
|
+
pin: 13
|
|
42
|
+
ha_type: light
|
|
43
|
+
- id: mcp1-gpb6
|
|
44
|
+
kind: mcp
|
|
45
|
+
mcp_id: mcp1
|
|
46
|
+
pin: 14
|
|
47
|
+
ha_type: light
|
|
48
|
+
- id: mcp1-gpb7
|
|
49
|
+
kind: mcp
|
|
50
|
+
mcp_id: mcp1
|
|
51
|
+
pin: 15
|
|
52
|
+
ha_type: light
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
- id: mcp2-gpa0
|
|
68
|
+
kind: mcp
|
|
69
|
+
mcp_id: mcp2
|
|
70
|
+
pin: 0
|
|
71
|
+
ha_type: switch
|
|
72
|
+
- id: mcp2-gpa1
|
|
73
|
+
kind: mcp
|
|
74
|
+
mcp_id: mcp2
|
|
75
|
+
pin: 1
|
|
76
|
+
ha_type: switch
|
|
77
|
+
- id: mcp2-gpa2
|
|
78
|
+
kind: mcp
|
|
79
|
+
mcp_id: mcp2
|
|
80
|
+
pin: 2
|
|
81
|
+
ha_type: switch
|
|
82
|
+
- id: mcp2-gpa3
|
|
83
|
+
kind: mcp
|
|
84
|
+
mcp_id: mcp2
|
|
85
|
+
pin: 3
|
|
86
|
+
ha_type: switch
|
|
87
|
+
- id: mcp2-gpa4
|
|
88
|
+
kind: mcp
|
|
89
|
+
mcp_id: mcp2
|
|
90
|
+
pin: 4
|
|
91
|
+
ha_type: switch
|
|
92
|
+
- id: mcp2-gpa5
|
|
93
|
+
kind: mcp
|
|
94
|
+
mcp_id: mcp2
|
|
95
|
+
pin: 5
|
|
96
|
+
ha_type: switch
|
|
97
|
+
- id: mcp2-gpa6
|
|
98
|
+
kind: mcp
|
|
99
|
+
mcp_id: mcp2
|
|
100
|
+
pin: 6
|
|
101
|
+
ha_type: switch
|
|
102
|
+
- id: mcp2-gpa7
|
|
103
|
+
kind: mcp
|
|
104
|
+
mcp_id: mcp2
|
|
105
|
+
pin: 7
|
|
106
|
+
ha_type: switch
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
- id: mcp2-gpb0
|
|
110
|
+
kind: mcp
|
|
111
|
+
mcp_id: mcp2
|
|
112
|
+
pin: 8
|
|
113
|
+
ha_type: switch
|
|
114
|
+
- id: mcp2-gpb1
|
|
115
|
+
kind: mcp
|
|
116
|
+
mcp_id: mcp2
|
|
117
|
+
pin: 9
|
|
118
|
+
ha_type: switch
|
|
119
|
+
- id: mcp2-gpb2
|
|
120
|
+
kind: mcp
|
|
121
|
+
mcp_id: mcp2
|
|
122
|
+
pin: 10
|
|
123
|
+
ha_type: switch
|
|
124
|
+
- id: mcp2-gpb3
|
|
125
|
+
kind: mcp
|
|
126
|
+
mcp_id: mcp2
|
|
127
|
+
pin: 11
|
|
128
|
+
ha_type: switch
|
|
129
|
+
- id: mcp2-gpb4
|
|
130
|
+
kind: mcp
|
|
131
|
+
mcp_id: mcp2
|
|
132
|
+
pin: 12
|
|
133
|
+
ha_type: switch
|
|
134
|
+
- id: mcp2-gpb5
|
|
135
|
+
kind: mcp
|
|
136
|
+
mcp_id: mcp2
|
|
137
|
+
pin: 13
|
|
138
|
+
ha_type: switch
|
|
139
|
+
|