Skip to content

driver/mqtt: really support MQTT auth for TasmotaPowerDriver - #2012

Merged
Emantor merged 1 commit into
labgrid-project:masterfrom
jacmet:tasmota-mqtt-auth
Oct 23, 2026
Merged

Emantor merged 1 commit into
labgrid-project:masterfrom
jacmet:tasmota-mqtt-auth

Conversation

@jacmet

@jacmet jacmet commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Commit 022f552 ("resource/mqtt: add optional username/password for MQTT authentication") added optional MQTT authentication support, but TasmotaPowerDriver uses does not use the MQTT connection of MQTTManager as it has custon on_connect / on_message handlers, so add the username/password for the TasmotaPowerDriver connection as well.

With this fixed, there are now two calls to client.username_pw_set() (from MQTTManager AND TasmotaPowerDriver), so adjust test_tasmota.py to allow that.

@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.7%. Comparing base (17d7db5) to head (cb09439).
⚠️ Report is 4 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #2012     +/-   ##
========================================
- Coverage    62.7%   62.7%   -0.1%     
========================================
  Files         190     190             
  Lines       15447   15448      +1     
========================================
  Hits         9697    9697             
- Misses       5750    5751      +1     
Flag Coverage Δ
3.11 62.7% <100.0%> (-0.1%) ⬇️
3.12 62.7% <100.0%> (+<0.1%) ⬆️
3.13 62.6% <100.0%> (-0.1%) ⬇️
3.14 62.6% <100.0%> (+<0.1%) ⬆️
3.15 62.6% <100.0%> (-0.1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Comment thread labgrid/driver/mqtt.py
Commit 022f552 ("resource/mqtt: add optional username/password for MQTT
authentication") added optional MQTT authentication support, but
TasmotaPowerDriver uses does not use the MQTT connection of MQTTManager as
it has custom on_connect / on_message handlers, so add the username/password
for the TasmotaPowerDriver connection as well.

With this fixed, there are now two calls to client.username_pw_set() (from
MQTTManager AND TasmotaPowerDriver), so adjust test_tasmota.py to allow
that.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
[rouven.czerwinski@linaro.org: fixed commit message typo]
Signed-off-by: Rouven Czerwinski <rouven.czerwinski@linaro.org>
@Emantor
Emantor enabled auto-merge October 23, 2026 17:18
@Emantor
Emantor merged commit eb05ee6 into labgrid-project:master Oct 23, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants