ASCII Input for MQTT-In

Hello

I have (probably) a quite basic problem as i am not very deep in NR so far.
I hope this is the right category.

I want to controll my Wallbox with RS485-ASCII interface via a converter (PW21) and Node Red
The Converter is conected and configurated to MQTT with the right serial settings. The MQTT-IN and MQTT-OUT nodes are cobfigured in a way that the Conveter Status, controll lights and Nodes report "Connected". Any string of block injection to the MQTT-IN is causing an increase of the PW21-Satus counter ... which seems to be good ;-).

From a WB-related source I got the information that sending messages in the form ":0103000F0005E8 \r" should cause setting changes and/or answers of the WB.

I simply struggel how to get e.g. a node (or Inject Node) can that in a way it's transmitted correctly to the WB.

May anyone please give me hint what and how i have to do that? Thank you

Best regard from Germany
Klaus

Hello Klaus

If I read your message correctly, then you have connected a wallbox which has a RS485 Interface using a converter, which offers MQTT as an interface.

You did not explain what kind of wallbox you are using in your setup. Giving any hints without that information is difficult.

You work with the following chain:

wallbox <-RS485-> converter <-TCP/MQTT -> node-red (MQTT-in/out node)

I suggest to reduce some complexity, and connect directly to the converter using the webpage offered by the converter, or using TELNET.

That way you can test the commands and answers directly using a web browser or a terminal. Only after this works to your satisfaction, I suggest to then add node-red.

But to help more, we need more information about about the wallbox.

Kind regards,

Urs.

Clarification:
You have a device that talks RS-485 and you have a converter that should let you connect to it via MQTT. It sounds like you have the device and the converter talking.

Your question then is how to connect via Node-RED and MQTT node to post messages and recieve messages from the converter.

So, the first question I have is what is the expected BROKER for your system? Does the documentation suggest a broker? You normally cannot talk directly to a device with MQTT. It requires a broker. That is a common issue which is not communicated or understood.

I am guessing, of course, But tell us what broker you are using if that is you have one connected. Then there are the settings to and from the devices which you need to consider in your node-RED MQTT node configuration. The default MQTT Broker port is 1883 for Mosquitto, for example.

Also, start small. In Node-RED, Use what ever broker you want. Construct a MQTT in and MQTT out nodes with inject and debug nodes, and get successful transmission to and from. Then incorporate your device converter in the conversations.

Sorry for not being precise enough!

The Wallbox is a German ABL/Senec WB Type eMH1. In the German GoingElectric-Forum PV-Überschuss laden mit ABL eMH1? - Seite 7 - Ladeequipment - Elektroauto Forum is a long discussion the the right sequences to be sent - one member even found a MQTT/NodeRed solution - but unfortunatly he did not post the details and it was is single contribution to thet forum (not nswering to any PN).

In general there is no official documentation but the nuber of possible controlsequences is limited and quite well explored under the link above.

Your understanding of the Setup ist right.

My Node Red installation is running in a Home Assistant Ennvironment using the Mosquitto Broker (Port 1883) for MQTT which is working e.g for ZigBee Components already.

The current start is already small like you proposed. I have an Inject-->MQTT-in and a MQTT-->debug flow to check out the communication.

Every injection to the MQTT-in creats a increase of the sent bytes on the status page of the converter - but the converter never reported any answer. Based on the German forum about that Wallbox the code interpretation of the WB is quite picky and I assume that all my tries so far have not exactly met the WB-Expected syntax.

Here is an exaple of sequences that should switch the box to a specific power as an exampe:

Set max. charge power (0x0014)
(6A) :011000140001020064
(7A) :011000140001020075
(8A) :011000140001020086
(9A) :011000140001020096
(10A) :0110001400010200A7
(11A) :0110001400010200B8
(12A) :0110001400010200C8
(13A) :0110001400010200D9
(14A) :0110001400010200EA
(15A) :0110001400010200FA
(16A) :01100014000102010B

In paralllel I have device that measures the current charge power (Shelly 3EM) - so I do not necessarily need much status reply communication from the WB - In most cases throwing the right sequence over the fence might be sufficient :wink:

JUst in this minute I got after several day a reply from the Member of GoingElectric (mentioned above) with some of his exported Nodes - as Soon as I tried them I will keep you updated.

Thank you for your help so far.

I have a dumb question for you. Pardon me if it seems too basic, or my understanding is not sufficient. Do you have a means to monitor your broker to see what is sent to the broker and the topics? Do you have a list of items which are sent via your device spec? Are you subscribed to the all topics you need?

Actiualy I have a separate unit in place thst recorde current, voltage an power of the 3 phases - therefor receiving would be less interesting than (successfully) sendig mainly Amp settings.- But form the descriprion I have ssen the WB should answer as a confirmation of the received messages. There is one topic defined for sending and one for receiving consisantly.
Yesterday I got some program examples - but I did not hwave the opportuity to try them out yet.

Pardon my prying, but I'm trying to piece it together for myself. It looks like the interface is fixed and defined to your MQTT broker from the device. It may be only a matter of the internal specification of how the device is relaying the MQTT data. You may just need an outline document of the MQTT interface for you to be able to do what you need. Is this device specific to your RS-485 Wallbox unit. or is the MQTT device generic?

Tne unit is not Wallbox specific and very genertic: http://www.hi-flying.com/pw21
MQTT is only one of the possible options, TCP would be an alternative.
For the communication between the devices it seems that I have to dive deeper - goot thing is that it is nor really urgent .....

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.