Skip to content
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

[BUG] MQTT commands don't work #171

Open
briodan opened this issue Jan 10, 2025 · 5 comments
Open

[BUG] MQTT commands don't work #171

briodan opened this issue Jan 10, 2025 · 5 comments

Comments

@briodan
Copy link

briodan commented Jan 10, 2025

Describe the bug
I cant get MQTT commands to work from Home Assistant

To Reproduce
I have setup MQTT on the device and I see it publish sensor and connection data to MQTT however MQTT commands do not get picked up by the device

image

this is the command I issue for a reload, note HA translates " to " when pasted into the GUI and will not allow payload: "{"reload": true}", i have also tried payload: "{reload': true}" with no success.

action: mqtt.publish
data:
  evaluate_payload: false
  qos: 0
  retain: false
  topic: wallpanel/los1_wp/command
  payload: "{\"reload\": true}"

Smartphone (please complete the following information):

  • Device: ThinkSmart View
  • OS: Android 8.10 (Lineage OS)
  • Applicaiton version: v0.12.0 build 0
@nathan815
Copy link

Same issue. I am publishing messages via MQTT Explorer macOS app and WallPanel is not reacting to any commands. I see the messages being published by WallPanel.

@nathan815
Copy link

nathan815 commented Feb 11, 2025

I just found the issue. It's due to the base topic setting. Basically, the app is not adding a / at the end automatically, so it's subscribed to topic {base_topic_name}command. If you look at the topics it's publishing the sensor messages to they follow the same pattern.

If you publish a message on wallpanel/los1_wpcommand, you'll see it works.

Fix is to append a / at the end of the base topic name in the app settings.

Arguably this is a bug. The app should append it if missing IMO. However, fixing it would be a breaking change.

@briodan
Copy link
Author

briodan commented Feb 12, 2025

I just found the issue. It's due to the base topic setting. Basically, the app is not adding a / at the end automatically, so it's subscribed to topic {base_topic_name}command. If you look at the topics it's publishing the sensor messages to they follow the same pattern.

If you publish a message on wallpanel/los1_wpcommand, you'll see it works.

Fix is to append a / at the end of the base topic name in the app settings.

Arguably this is a bug. The app should append it if missing IMO. However, fixing it would be a breaking change.

OMFG i was staring at the commands in MQTT viewer and it looked strange but did not figure out that missing piece. adding the trailing / in the app config got it working.

Thank you very much.

Might not require an app change but maybe a clarification in the documentation.

@nathan815
Copy link

Haha, yep! I was staring at it for a while too and thought the topics looked strange, but I just chalked it up to an oddity in the way it publishes messages. I came across an old HA forum post from a few years ago where someone mentioned a trailing slash. I was shocked when I published to that topic and it worked :D

I agree, clarification in the documentation will help.

@briodan
Copy link
Author

briodan commented Feb 12, 2025

had another look at the documentation and the screenshots show the ending "/" but the text description does not, put in PR #175 to clarify the need for a trailing /.

will leave this open until that's merged, in case others run across it.

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

No branches or pull requests

2 participants