logo elektroda
logo elektroda
X
logo elektroda

MQTT Command Structure for Controlling Multiple PWM Ports and Frequency on MCU

TannedKimmy 42 2
ADVERTISEMENT
  • #1 21703047
    TannedKimmy
    Level 2  
    is there a straightforward documentation on how to write commands through mqtt topics?
    like what's the prefix to change PWM frequency per se, and most importantly how to control different ports on my MCU simultaneously.
    I configure a port as PWM to control it I use the dimmer prefix and if I add other ports as PWM now it turns as LED Temp and RGB. I'm failing to find a documentation or a topic covering the whole thing.
    AI: Which MCU and firmware or software are you using for your PWM control (for example, ESP8266 with Tasmota, ESP32 with ESPHome, or something else)?
    OpenBeken on bk7231N
    AI: Are you using any specific MQTT broker or home automation system (like Home Assistant, Mosquitto, etc.), or is this a custom setup?
    for the time being Mosquitto for testing
  • ADVERTISEMENT
  • Helpful post
    #2 21703113
    p.kaczmarek2
    Moderator Smart Home
    I think you can just do it like in Tasmota.
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/mqttTopics.md
    MQTT Command Structure for Controlling Multiple PWM Ports and Frequency on MCU
    If you want to disable auto LED driver, enable "show raw pwms" flag. What are you trying to achieve?
    Helpful post? Buy me a coffee.
  • #3 21703127
    TannedKimmy
    Level 2  
    I went over this .md file many times. I will divide my issue into two parts
    -The prefixes "command text" in the .md file, as in what commands are out there, aren't probably listed from what I found, I will come clean, I was just skimming over Tasmota documentation before posting, but I got flustered because It's always the same example of power1 and power2 etc. I just want a place where all the commands and what their value should be listed in singular place so I can utilize the MCU as more than a smart switch.
    -modules configuration to mqtt command, let's say on my cb2s I have P7 as PWM for a dimmer and P24 for another dimmer, How would I configure this without it turning into "LED Temperature" dimmer
    I'm trying to integrate openbeken to my "Home Assistant" Flutter app, and seeing how little documentation is out there to program this MCU, this project is a lifesaver so I'm trying to utilize it (and If I can even contribute back, I really appreciate open source projects like this)
    really thankful for the feedback buddy
ADVERTISEMENT