updates2mqtt 1.3.6__py3-none-any.whl → 1.3.7__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.
- updates2mqtt/config.py +4 -7
- {updates2mqtt-1.3.6.dist-info → updates2mqtt-1.3.7.dist-info}/METADATA +7 -2
- {updates2mqtt-1.3.6.dist-info → updates2mqtt-1.3.7.dist-info}/RECORD +6 -6
- {updates2mqtt-1.3.6.dist-info → updates2mqtt-1.3.7.dist-info}/WHEEL +0 -0
- {updates2mqtt-1.3.6.dist-info → updates2mqtt-1.3.7.dist-info}/entry_points.txt +0 -0
- {updates2mqtt-1.3.6.dist-info → updates2mqtt-1.3.7.dist-info}/licenses/LICENSE +0 -0
updates2mqtt/config.py
CHANGED
|
@@ -113,7 +113,6 @@ def load_package_info(pkginfo_file_path: Path) -> UpdateInfoConfig:
|
|
|
113
113
|
|
|
114
114
|
def load_app_config(conf_file_path: Path, return_invalid: bool = False) -> Config | None:
|
|
115
115
|
base_cfg: DictConfig = OmegaConf.structured(Config)
|
|
116
|
-
is_new: bool = False
|
|
117
116
|
if conf_file_path.exists():
|
|
118
117
|
cfg: DictConfig = typing.cast("DictConfig", OmegaConf.merge(base_cfg, OmegaConf.load(conf_file_path)))
|
|
119
118
|
else:
|
|
@@ -126,8 +125,6 @@ def load_app_config(conf_file_path: Path, return_invalid: bool = False) -> Confi
|
|
|
126
125
|
try:
|
|
127
126
|
conf_file_path.write_text(OmegaConf.to_yaml(base_cfg))
|
|
128
127
|
log.info(f"Auto-generated a new config file at {conf_file_path}")
|
|
129
|
-
log.info("The config has place holders for MQTT user and password")
|
|
130
|
-
is_new = True
|
|
131
128
|
except Exception:
|
|
132
129
|
log.exception("Unable to write config file", path=conf_file_path)
|
|
133
130
|
cfg = base_cfg
|
|
@@ -137,10 +134,10 @@ def load_app_config(conf_file_path: Path, return_invalid: bool = False) -> Confi
|
|
|
137
134
|
OmegaConf.to_container(cfg, throw_on_missing=True)
|
|
138
135
|
OmegaConf.set_readonly(cfg, True)
|
|
139
136
|
config: Config = typing.cast("Config", cfg)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
if not
|
|
137
|
+
|
|
138
|
+
if config.mqtt.user in ("", MISSING) or config.mqtt.password in ("", MISSING):
|
|
139
|
+
log.info("The config has place holders for MQTT user and/or password")
|
|
140
|
+
if not return_invalid:
|
|
144
141
|
return None
|
|
145
142
|
return config
|
|
146
143
|
except (MissingMandatoryValue, ValidationError) as e:
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: updates2mqtt
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.7
|
|
4
4
|
Summary: System update and docker image notification and execution over MQTT
|
|
5
|
+
Project-URL: Homepage, https://updates2mqtt.rhizomatics.org.uk
|
|
5
6
|
Project-URL: Repository, https://github.com/rhizomatics/updates2mqtt
|
|
6
7
|
Project-URL: Documentation, https://updates2mqtt.rhizomatics.org.uk
|
|
7
8
|
Project-URL: Issues, https://github.com/rhizomatics/updates2mqtt/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/rhizomatics/updates2mqtt/blob/main/CHANGELOG.md
|
|
8
10
|
Author-email: jey burrows <jrb@rhizomatics.org.uk>
|
|
9
11
|
License-Expression: Apache-2.0
|
|
10
12
|
License-File: LICENSE
|
|
@@ -37,6 +39,7 @@ Description-Content-Type: text/markdown
|
|
|
37
39
|
|
|
38
40
|
# updates2mqtt
|
|
39
41
|
|
|
42
|
+
[](https://pypi.org/project/updates2mqtt/)
|
|
40
43
|
[](https://github.com/rhizomatics/supernotify)
|
|
41
44
|
[](https://results.pre-commit.ci/latest/github/rhizomatics/updates2mqtt/main)
|
|
42
45
|
[](https://github.com/rhizomatics/updates2mqtt/actions/workflows/pypi-publish.yml)
|
|
@@ -107,8 +110,10 @@ interface, and the package can be remotely fetched and the component restarted.
|
|
|
107
110
|
|
|
108
111
|
## Related Projects
|
|
109
112
|
|
|
113
|
+
Other apps useful for self-hosting with the help of MQTT:
|
|
114
|
+
|
|
110
115
|
- [psmqtt](https://github.com/eschava/psmqtt) - Report system health and metrics via MQTT
|
|
111
|
-
|
|
116
|
+
|
|
112
117
|
## Development
|
|
113
118
|
|
|
114
119
|
Access to Docker APIs uses the Python [docker-py](https://docker-py.readthedocs.io/en/stable/) SDK for Python. [Eclipse Paho](https://eclipse.dev/paho/files/paho.mqtt.python/html/client.html) is used for MQTT access, and [OmegaConf](https://omegaconf.readthedocs.io) for configuration.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
updates2mqtt/__init__.py,sha256=gnmHrLOSYc-N1-c5VG46OpNpoXEybKzYhEvFMm955P8,237
|
|
2
2
|
updates2mqtt/__main__.py,sha256=HBF00oH5fhS33sI_CdbxNlaUvbIzuuGxwnRYdhHqx0M,194
|
|
3
3
|
updates2mqtt/app.py,sha256=7jnmtIkXlX4e4lIt8WCzV19IYrICkA7cU4m9u9QXvRU,8229
|
|
4
|
-
updates2mqtt/config.py,sha256=
|
|
4
|
+
updates2mqtt/config.py,sha256=NiaFdMTXXAjZIbtW7LHYjSqu-ONEoouT2uUu506CTtM,5000
|
|
5
5
|
updates2mqtt/hass_formatter.py,sha256=Ulfj8F0e_1QMmRuJzHsNM2WxHbz9sIkWOWjRq3kQZzs,2772
|
|
6
6
|
updates2mqtt/model.py,sha256=5tWlj3appGGZjkuBeYR2lb-kXoy5mzCn4P_EJQjnwok,3676
|
|
7
7
|
updates2mqtt/mqtt.py,sha256=i2l1BlEmnkp3Ie2qeAPVmdhIO1I_mH8Zxbm84cIYtGI,12741
|
|
@@ -9,8 +9,8 @@ updates2mqtt/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
9
9
|
updates2mqtt/integrations/__init__.py,sha256=KmNTUxvVWvqI7rl4I0xZg7XaCmcMS2O4OSv-ClsWM4Q,109
|
|
10
10
|
updates2mqtt/integrations/docker.py,sha256=OX_sXtWVgUJfRSFi_tTBib4gvP_foQI4MoeTkTeLbZc,18868
|
|
11
11
|
updates2mqtt/integrations/git_utils.py,sha256=SkAp6XcvCHwaiy17t6F97kcWTjBd7RyEmfhz6M_EhP0,2196
|
|
12
|
-
updates2mqtt-1.3.
|
|
13
|
-
updates2mqtt-1.3.
|
|
14
|
-
updates2mqtt-1.3.
|
|
15
|
-
updates2mqtt-1.3.
|
|
16
|
-
updates2mqtt-1.3.
|
|
12
|
+
updates2mqtt-1.3.7.dist-info/METADATA,sha256=yFJy-VGcnmHYdFksLx2teBHbuPi-B3J7pObaE5-XVEk,7990
|
|
13
|
+
updates2mqtt-1.3.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
14
|
+
updates2mqtt-1.3.7.dist-info/entry_points.txt,sha256=Hc6NZ2dBevYSUKTJU6NOs8Mw7Vt0S-9lq5FuKb76NCc,54
|
|
15
|
+
updates2mqtt-1.3.7.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
16
|
+
updates2mqtt-1.3.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|