Blueforcer / awtrix3

Custom firmware for the Ulanzi Smart Pixel clock or self made awtrix. Getting started is easy as 1-2-3
https://blueforcer.github.io/awtrix3/
Other
1.41k stars 112 forks source link

[BUG] Documentation for Power and Sleep works only with: [IP]/power and [IP]/sleep iso [IP]/api/power and [IP]/api/sleep #554

Closed fmdvries closed 5 months ago

fmdvries commented 5 months ago

Bug report

Describe the bug

With my Ulanzi together with HomeAssistant and Node-Red, I can only get Power/Sleep working correctly with the following endpooints:

[IP]/power and [IP]/sleep

The documentation says:

[IP]/api/power and [IP]/api/sleep

Additional information

To Reproduce

Steps to reproduce the behavior:

Send MQTT message via a create message node:

msg.payload = {"power": true}; return msg;

and publish via an MQTT publish node with topic:

[IP]/api/power as in documentation --> no effect

and:

[IP]/power as in documentation --> works

Same for sleep.

Expected behavior

Power and Sleep to work according to the documentation (api.md)

So proposed solution: validate and update documentation to exclude the /api part in the Topic/URL Happy to make the update, however before doing so it needs to be validated whether this is only for HomeAssistant/Node-Red/MQTT setup or for all HTTP/API requests for Power/Sleep.

Screenshots

N/A

Logs

N/A

Additional context

N/A

Blueforcer commented 5 months ago

Some things in your report are strange. [IP]/power does not exist for mqtt because MQTT does not use IP

Do not mix up the MQTT topic with the HTTP base URL. These are two different protocolls. The Documentation is correct, just use the right endpoint. image

fmdvries commented 5 months ago

Ah you're completely right! My bad, I just didn't look carefully :-(