-
Notifications
You must be signed in to change notification settings - Fork 289
Problems with sample MQTT configuration #255
Comments
There is no option for mqtt json lights in HA for speed. Check this file to see how speed can be implemented. HA's MQTT topics ( https://github.com/toblum/McLighting/wiki/Homeassistant-integration ) and regular MQTT ( https://github.com/toblum/McLighting/wiki/MQTT-API ) are in different topics. They work differently and everything is documented in wiki. Using PubSubClient, will only send messages with size maximum of 128 characters, Async MQTT can do 3-4kB data. Async MQTT can do TLS v1.1, but you have to use Platformio for compilation with appropriate flags. See here for more info on how to achieve that. Regarding the switch turning off automatically, one needs to have appropriate state MQTT topic to inform HA that the light has read the sent message. I can write the TLS/SSL portion, but you will need to give me some time. I don't have a spare mosquitto MQTT server to try TLS/SSL stuff. |
I was able to get SSL/TLSv1.2 2-way handshake to work on ESP8266 and ESP32 https://github.com/debsahu/ESP_MQTT_Secure . I will close this issue after creating a PR with adding secure MQTT connections to McLighting! Please follow through the instructions (ESP8266 specific parts) to securing the MQTT connection. |
Any update on this? |
While implementing the certification into the mqtt connection I stumbled over a problem I can't seem to fix.
When using auto-discovery I can control the LEDs how ever I like. The only thing missing would be a speed option.
But when I use the normal mqtt with pubsubclient I encounter problems.
Since I'm not that experienced with the homeassistant configurations and automations I thought I will just use the sample provided in the wiki.
First thing I figured out was that the topics in there are wrong.
They are actually just "hostname/in" and "hostname/out".
The other problem I have is that I can see the controller receiving the "ON" command by using the serial monitor in Arduino but nothing happens.
The switch in homeassistant is just turning back to its "OFF" position shortly after turning it on.
But no "OFF" command is sent either...
How could I fix that?
The text was updated successfully, but these errors were encountered: