MQTT Device with parameters

I have a configuration based on one common PLC connected with HA with MQTT.
What is proper way to configure device with parameters on HA side?
I.e. water valve with parameter like open time and start time. All parametrers I would like to keep on PLC side to ensure proper work without HA runing. These parameters are not sensor value for me becouse I don’t need to monitor them. Parameters are only needed to configure particular device type like light, thermostat, valves in garden etc. All that devices are implemented in PLC now.
The same question is related to common parameters.

Thanks in advance.
Q

You need to know the format of the messages your PLC takes for its parameters. This could be one big json message, or individual topics and payloads per parameter. Once you have the PLC’s mqtt format in hand, it can be implemented in ha.

Edit: Before going far on this, is there a reason you couldn’t just use any other simpler mqtt broker to send parameters? Like a phone app or a pc? I don’t see a need for ha here since there are no sensors or automations. If you just need a customizable gui for your broker, then maybe it’s worth doing ha, but there are less complicated solutions.

I have a issue with it.
From one side I need mostlu gui from HA from other seems to be suitable for wall panels and mobile devices. One automation what I need is for sure kind of bridge between PLC and devices like Volumio.
It is really difficult do that in PLC to communicate with open standard devices. That’s wy I consider to use HA like scada system and maybe something more.
I would like to keep all parameters in PLC to be sure that system can work even HA is stopped. All devices are connected to PLC so I can prepare all parameters for communication I decide what will be message format.
I have to say that I don’t know HA ehought so that’s why I ask.
There is many scada systems on the market (iobroker, etc) but still I consider to use HA.
Seems to be more complex form me and have many ready solutions to use.

HA sounds like a good fit in this case (an open source scada with gui and wall panel friendly). I am not sure exactly what your plc would need, but you can install an mqtt broker on ha and configure it to send any mqtt payload. Install is pretty simple if you use the mqtt addon. As far as sending parameters, I use the nodered addon for all of my automations. It has an easy to use mqtt send node that I use to send parameters to devices in json format (this can offer manual controls to send parameters as well). Not sure how to setup complicated messages in yaml automations though.

I hope becouse of time consuming :wink:
Current configuration is combined from:

  • PLC (low level of devices functionality)
  • MQTT broker (NAS Synology)
  • HA (NAS Synology)
    This is suitable configuration for me becouse of power consuption.
    Let’s take example.
    I have irigation valve as device. There are additional parameters needed as time of activation, duration etc. If PLC has that all paramaters can handle simple automation on low level. This is what I want to keep to secure proper work of all system.

I understand that is possible to handle this with HA.
Your solution is to handle json payload on node red and then precess them to HA.
Is this right?
Is that possible only with yaml configuration? (input number fields?)
I’m looking for most optimal solution.