[Smart Meter Interface] Setting smlj=0
on boot breaks Home Assistant discovery
#21126
Unanswered
lippertmarkus
asked this question in
Q&A
Replies: 2 comments 11 replies
-
As designed. Device discovery is done one time during startup. If you disable mqtt it can not work. |
Beta Was this translation helpful? Give feedback.
7 replies
-
Any solution on this in the meantime? I have the same issue - thanks! |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
PROBLEM DESCRIPTION
I'm using the Smart Meter Interface to read data from my heat meter. As it takes a few seconds after boot until data is available I disabled MQTT publish on boot by setting
smlj=0
and activating it after 30 upsecs withsmlj|=1
like mentioned in the docs.This however leads to Home Assistant not discovering the sensors, also not after the first MQTT publish after TelePeriod.
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
Backlog Template; Module; GPIO 255
:Backlog Rule1; Rule2; Rule3
:Status 0
:weblog
to 4 and then, when you experience your issue, provide the output of the Console log:With setting
smlj
(correctly publishes first after TelePeriod after settingsmlj|=1
but Home Assistant sensor discovery doesn't work - see screenshot below)Without setting
smlj
in the script (0 values are published to MQTT the first time which should be prevented but sensors are correctly discovered in Home Assistant - see screenshot below):TO REPRODUCE
Steps to reproduce the behavior:
smlj
EXPECTED BEHAVIOUR
Sensors should be discovered in Home Assistant but stay in "unavailable"/"unknown" until first publish happens after
smlj|=1
after TelePeriod.SCREENSHOTS
If applicable, add screenshots to help explain your problem.

Home Assistant when setting
smlj
in the script like above (Stays like this also after the first MQTT publish after TelePeriod):Home Assistant without setting

smlj
in the script (correctly discovers sensors but gives 0 values directly after boot):ADDITIONAL CONTEXT
Add any other context about the problem here.
(Please, remember to close the issue when the problem has been addressed)
Beta Was this translation helpful? Give feedback.
All reactions