-
Notifications
You must be signed in to change notification settings - Fork 639
Print each HA config entry separately #1535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
code/espurna/homeassistant.ino
Outdated
@@ -317,6 +349,7 @@ void haSetup() { | |||
|
|||
// Main callbacks | |||
espurnaRegisterReload(_haConfigure); | |||
espurnaRegisterLoop(_haLoop); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it really worth it to have it being checked in the main loop all the time? Wouldn't it be better t use a ticker?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One option is to make additional API for such one-off functions to not overuse Ticker. Somehing accepting std::function with bound args.
Also see #1370
And I forgot to add check if client is actually connected...
@@ -1366,7 +1367,9 @@ function processData(data) { | |||
// ----------------------------------------------------------------------------- | |||
|
|||
if ("haConfig" === key) { | |||
$("#haConfig").show(); | |||
websock.send("{}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Speeding up Windows <-> ESP tcp exchange. Quite noticeable.
#1387 (comment)
#1300 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: in case DEBUG_SUPPORT is enabled, client must send something back too in response to the "weblog". Otherwise, haConfig messages are stuck behind. Gosh darnit...
682f08f
to
2f147ec
Compare
Fixes #1233
Does involve sort-of a hack by knowing that DEBUG_MSG will not print timestamp if the last symbol is not new-line/cr-return.