SolarMD - Logger upgrade firmware causes all flows to fail

I have multiple flows that reads many MQTT feeds.
My LoggerV2 for SolarMD recently received a firmware update and I just cannot get messages from this topic.
The payload:

Blockquote
solarmd/ES Control Service/SMDBEX20226532 {"name":"solarmd/ES Control Service/SMDBEX20226532 ","data":{"sniu":true,"serialNumber":"SMDBEX20226532 ","deviceID":null,"alertMap":{},"lastUpdate":1751391526005,"voltageV":52.29,"currentA":-19.57,"powerW":-1021.5540000000001,"capacityP":60.0,"capacityAh":166.72715194444444,"ratedCapacityAh":280.0,"ratedVoltageV":51.2,"ratedChargeCurrentC":0.7142999999999999,"ratedDischargeCurrentC":0.7142999999999999,..................

Blockquote
Basic step to confirm the node is configure correct:

What I do not understand is: I have copied the Topic from the feed:
mosquitto_sub -v -t "#" -u "XXXXXX" -P "123456", so it is correct
The debug nodes does not display ANY payload nor does the Debug messages.

All other flows are still working perfect - I am just unable to get this topic to through a msg

Ideally I would lik eto get the msg: capacityP which in the topic above is ":60.0,"

  • Node version cfd97bf1.314cf8
  • Node-RED version v3.0.2
  • MQTT broker mosquitto version 2.0.11

Any help will be appreciated!!

You use spaces in your topic name.
Although it is technically allowed, it is not recommended. A space is the enemy of every programmer.
Use hyphens or underscores instead.

If your experiments with mosquitto_sub have proved that your logger is both connected to the broker and publishing using that topic, your next step should probably be to upgrade node-red and node.js. Node-red 3.0.2 is a long way behind. The value you have given for node.js version looks like a node id within NR. Ideally you need node.js v22

@FireWizard52 ,

I understand what you say, but I have no control over the topic being published.
This is the topic that my Solar Battery Logger sends out.
I also tried "solarmd/ES Control Service/SMDBEX20226532" and solarmd/"ES Control Service"/SMDBEX20226532 for the topic, but neither is not working.

Do you have a suggestion how to get around this?

Thanks

Start by upgrading as suggested.

Thanks Colin - Working on it

If it still doesn't work then subscribe to solarmd/# and use a Switch node to pass only the topics you are interested in.

Hello @fritserasmus

I copied your published flow in an Inject node, as far as it was possible, as it ends with a number of dots.

I works as expected (with spaces in the topic)

See:

[
    {
        "id": "9299412e7544f31f",
        "type": "inject",
        "z": "5f109901cbe25d34",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "solarmd/ES Control Service/SMDBEX20226532",
        "payload": "{\"name\":\"solarmd/ES Control Service/SMDBEX20226532 \",\"data\":{\"sniu\":true,\"serialNumber\":\"SMDBEX20226532 \",\"deviceID\":null,\"alertMap\":{},\"lastUpdate\":1751391526005,\"voltageV\":52.29,\"currentA\":-19.57,\"powerW\":-1021.5540000000001,\"capacityP\":60,\"capacityAh\":166.72715194444444,\"ratedCapacityAh\":280,\"ratedVoltageV\":51.2,\"ratedChargeCurrentC\":0.7142999999999999,\"ratedDischargeCurrentC\":0.7142999999999999}}",
        "payloadType": "json",
        "x": 390,
        "y": 380,
        "wires": [
            [
                "8ae706b817056c3d",
                "0ba07f6216fc9cc4"
            ]
        ]
    },
    {
        "id": "c68833f101c36eb0",
        "type": "mqtt in",
        "z": "5f109901cbe25d34",
        "name": "solarmd/ES Control Service/SMDBEX20226532",
        "topic": "solarmd/ES Control Service/SMDBEX20226532",
        "qos": "0",
        "datatype": "auto-detect",
        "broker": "38b35487299a036d",
        "nl": false,
        "rap": true,
        "rh": 0,
        "inputs": 0,
        "x": 500,
        "y": 460,
        "wires": [
            [
                "19f97b9c579d185b"
            ]
        ]
    },
    {
        "id": "8ae706b817056c3d",
        "type": "mqtt out",
        "z": "5f109901cbe25d34",
        "name": "",
        "topic": "",
        "qos": "0",
        "retain": "false",
        "respTopic": "",
        "contentType": "",
        "userProps": "",
        "correl": "",
        "expiry": "",
        "broker": "38b35487299a036d",
        "x": 610,
        "y": 380,
        "wires": []
    },
    {
        "id": "19f97b9c579d185b",
        "type": "debug",
        "z": "5f109901cbe25d34",
        "name": "debug 79",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 800,
        "y": 460,
        "wires": []
    },
    {
        "id": "0ba07f6216fc9cc4",
        "type": "debug",
        "z": "5f109901cbe25d34",
        "name": "debug 82",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 620,
        "y": 340,
        "wires": []
    },
    {
        "id": "38b35487299a036d",
        "type": "mqtt-broker",
        "name": "Raspberry Pi 1",
        "broker": "192.168.10.51",
        "port": "1883",
        "clientid": "",
        "autoConnect": true,
        "usetls": false,
        "protocolVersion": "4",
        "keepalive": "60",
        "cleansession": true,
        "autoUnsubscribe": true,
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": "",
        "birthMsg": {},
        "closeTopic": "",
        "closeQos": "0",
        "closePayload": "",
        "closeMsg": {},
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "willMsg": {},
        "userProps": "",
        "sessionExpiry": ""
    }
]

You said also:

What I do not understand is: I have copied the Topic from the feed:
mosquitto_sub -v -t "#" -u "XXXXXX" -P "123456", so it is correct
The debug nodes does not display ANY payload nor does the Debug messages.

All other flows are still working perfect - I am just unable to get this topic to through a msg

Are you really sure, that there is no hidden character in the topic, such as a space after it?

Regards

pi@raspberrypi:~ $ node -v
v20.19.3
pi@raspberrypi:~ $ npm -v
10.8.2

Let see how the Logger's topic works now
I wil test and provide update

@Colin ,

solarmd/# gives me a feed!!!

I just now have to figure out how the "Switch node" works.

I receive this message:

solarmd/ES Control Service/SMDBEX20226532 : msg : Object
object
topic: "solarmd/ES Control Service/SMDBEX20226532 "
payload: object
name: "solarmd/ES Control Service/SMDBEX20226532 "
data: object
sniu: true
serialNumber: "SMDBEX20226532 "
deviceID: null
alertMap: object
lastUpdate: 1751492369654
voltageV: 53.07
currentA: 44.105
powerW: 2353.4428
capacityP: 60
capacityAh: 167.87193305555556
ratedCapacityAh: 280
ratedVoltageV: 51.2
ratedChargeCurrentC: 0.7142999999999999
ratedDischargeCurrentC: 0.7142999999999999 .....................etc...

To get the PowerW from the switch I tried this:

Obviously I am doing it wrong since there is no feed from this.

Could you perhaps nudge me in the right direction please?

Yeah. But you're close. I'm posting a couple of the pre-canned replies below. They are worth absorbing (will get you moving much faster)


There’s a great page in the docs (Working with messages : Node-RED) that will explain how to use the debug panel to find the right path/value for any data item.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.

BX00Cy7yHi

Also...

I recommend watching this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

And what you need to do in the switch node is test msg.topic for the value you want to allow through.

Steve-Mci,

THANK YOU!!, that made a world of difference.

Doing it thi sway I fu=igured out that the Topic had a space at the end, All is now working just perfect for ME.

All the right stuff where it is needed:

1 Like

Hi @fritserasmus

Do you remember, that I wrote:

Are you really sure, that there is no hidden character in the topic, such as a space after it?

I think, that almost everybody has been trapped once.

Regards

1 Like

@FireWizard52 ,

Yes, I remembered it, but the issue was I could not determine if there were spaces untill I did the solarmd/# thing and then copy the PATH.

Remember I an the consumer of the msg , I had to rely on info provided and the info in th elogger is incorrect.

Doing a mosquitto_sub -v -t "#" -u "XXXXXX" -P "123456" on the RPi did not PROPERLY indicate the space, so I was a bit blind folded.

It will definitely help other in the future to follow this strategy incas ethey think there MIGHT be a space or some kind of hidden character.

Thanks for teh help anyway.
(to be a bit fair here: the laststime I looked at the flow was more than 2 years ago)
I am a bean counter!

Have fun and thanks for the kind help!!