TWCManager icon indicating copy to clipboard operation
TWCManager copied to clipboard

MQTT prefix

Open MikeBishop opened this issue 3 years ago • 0 comments

Encountered two problems debugging MQTT not getting data in my environment:

  • For some reason, self.__master throws an exception trying to call any methods on the object, but renaming it to self.master works. I'm mystified why.
  • The existing code breaks when no prefix is set, rather than using the Teslamate default, and it doesn't account for an actual prefix being set which would change the number of levels in the split.

This is my attempt at fixing it. However, I don't run with any non-default prefix, so I'm not certain it's right. I just know it is working for me when not setting a prefix in either Teslamate or TWCManager.

However, it occurs to me that anyone who has it working probably does so by setting "teslamate" as their prefix. Do you think we should treat "teslamate" as equivalent to None? That messes up anyone who's actually using "teslamate" as their prefix in a Teslamate instance, but I don't know why one would.

MikeBishop avatar Dec 23 '22 02:12 MikeBishop