Announcement

Collapse
No announcement yet.

mcsMQTT Payload to a Victron Inverter not publishing correct message

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    mcsMQTT Payload to a Victron Inverter not publishing correct message

    First to admit, I am a little out of my element when it comes to MQTT, even though I'm now running more than 50 devices running Tasmota. I have managed to get my "second" broker to bring data in to HS4, mostly without issue. I am struggling with getting a command to be published properly from the mcsMQTT plugin to the broker.

    I've been successful in publishing the topic and payload using MQTT Explorer, as follows:
    Code:
    Topic: W/###/settings/0/Settings/CGwacs/AcPowerSetPoint
    
    
    {"value": 1100.0}
    However, when I try to publish the same via HS, using mcsMQTT, the following is the result (this is pulled from the debug enabled logging, which has no affect on the inverter):
    Code:
    Publish W/###/settings/0/Settings/CGwacs/AcPowerSetPoint={“value”: 1100.0}’
    Here's a portion of the edit page:
    Click image for larger version

Name:	AcPowerSetPoint.JPG
Views:	191
Size:	118.1 KB
ID:	1495222

    Not sure what else to provide. I am using the latest update of the mcsMQTT plugin, and the values update from the device->broker->HS, without issue. After a couple days, I'm stumped. Thanks for any help.

    #2
    I see a few things. All in the Publish Payload Template.
    1. The end of the entered data has an apostrophe. That should be removed.
    2. The quotes around value are smart quotes and not simple quotes. Microsoft Word will use smart quotes. Notepad will use simple quotes where the two verticals are straight rather than angled with the smart quotes.
    3. $$VALUE: is normally used for the HS DeviceValue. $$STATUS: is most often related to VSP relationships.
    4. A .0 suffix is being added. This is fine if you know integers are being reported by HS. To protect yourself the ROUND function can be used to explicitly provide the precision desired.

    Untested, but below are suggestions. The << and >> are used to signify this is an inline expression rather than explicit text.

    Code:
    {"value":$$VALUE:.0}
    {"value":<<ROUND($$VALUE:,1)>>}

    Comment


      #3
      That works perfectly! Thanks for the pointers, and the swift response.

      Comment

      Working...
      X