You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
I am very confused now. This bug should be at somewhere inside Esphomelib, NOT Esphomeyaml. Am I right ? If it's too complex to explain, Please give me a simple answer yes/no. Thanks.
The reason will be displayed to describe this comment to others. Learn more.
esphomeyaml generates the c++ 'main.cpp' file that gets compiled and linked against esphomelib. While most of the complicated stuff is in esphomelib, the code generated here is responsible for some critical bits, like ensuring that components get created and registered properly.
In this case, a trigger was being created but not registered, so nothing was wired up to it.
The reason will be displayed to describe this comment to others. Learn more.
First , I did some studying on esphomelib's code, but have never touched esphomeyaml yet. I fully agree with you the first paragraph.
Based on all of my known,
In this case, the registering of trigger should be done once it created.
As a rule, every components(at least sensor, switch, trigger. ) will be registered once it's created.
In this case,the registering should be inside of MQTTMessageTrigger *make_message_trigger(const std::string &topic); or deeper in depth.
esphomeyaml does manage the source code of main.cpp in esphomelib only, It should create component , should not register any component. Saying the registering is "automatically" here.
Conclusion:
I am still confused. The above item at least one is wrong, I can't find out it.
The reason will be displayed to describe this comment to others. Learn more.
Theoretically make_message_trigger should do the registering, but that would require including application.h - and that file includes all other header files, so doing so would massively slow down the build.
As the whole automation engine is esphomeyaml-only anyway (nobody would write automation code in pure -lib) I don't care if the fix is in esphomeyaml.
b5cdb9f
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.
I am very confused now. This bug should be at somewhere inside Esphomelib, NOT Esphomeyaml. Am I right ? If it's too complex to explain, Please give me a simple answer yes/no. Thanks.
b5cdb9f
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.
esphomeyaml generates the c++ 'main.cpp' file that gets compiled and linked against esphomelib. While most of the complicated stuff is in esphomelib, the code generated here is responsible for some critical bits, like ensuring that components get created and registered properly.
In this case, a trigger was being created but not registered, so nothing was wired up to it.
b5cdb9f
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.
First , I did some studying on esphomelib's code, but have never touched esphomeyaml yet. I fully agree with you the first paragraph.
Based on all of my known,
MQTTMessageTrigger *make_message_trigger(const std::string &topic);
or deeper in depth.Conclusion:
I am still confused. The above item at least one is wrong, I can't find out it.
b5cdb9f
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.
My fault is item 3,
trigger
is registered out ofMQTTMessageTrigger *make_message_trigger(const std::string &topic)
. it is in setup() of main.cpp.b5cdb9f
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.
Theoretically
make_message_trigger
should do the registering, but that would require includingapplication.h
- and that file includes all other header files, so doing so would massively slow down the build.As the whole automation engine is esphomeyaml-only anyway (nobody would write automation code in pure -lib) I don't care if the fix is in esphomeyaml.