Is it possible to have smartmeter2mqtt with parameters running in Home Assistant using NodeRed?

Dear Home Assistant community.

I ordered and received a SlimmeLezer+ from zuidwijk which works perfectly fine out of the box. Unfortunately, the wi-fi signal often breaks and it messes up the real-time curves of electricity consumption (which I’ll need in winter time to precisely monitor consumption when the heating will be switched on and the heat pumps working).

So, I’m back with the SlimmeLezer P1 and smartmeter2mqtt Home - Smartmeter2mqtt.

I made it work using an intermediate computer to run smartmeter2mqtt and then publish to the mqtt of home assistant installed on raspberry pi.

Now my idea is: instead of having smarmeter2mqtt on an intermediate computer, why not having it on the raspberry pi where home assistant is installed and having it running through NodeRed ?

So I installed NodeRed and configured it with these NPM packages:

  • [email protected] + serialport
    And system packages:
  • python3, make, g++ and linux-headers

See:

Now, I’m trying to start smartmeter2mqtt through the NodeRed interface using the exec component, unfortunately, it’s like the parameters are never taken into consideration and consequently can’t have it running.

I always get the feedback: Port or socket required instead of getting 1.7.0-beta.9 for instance.

See:

While smartmeter2mqtt --version in a console returns:
smartmeter2mqtt--version

Would you have an idea if theoretically it could work this way, and if so, how to pass input parameters to smartmeter2mqtt through NodeRed ?

Thank you and best regards.

Alexandre

PS:

Adding containers to home assistant os will not work. Converting to mqtt does not seem to be necessary if there is a network connection available. Have you tried the standard smartmeter? You can send the output to a sensor node, to bring it into ha.

Thanks @Mikefila for your help and feedback.

I checked the proposed resource, but unfortunately it does not cope with decryption which is needed by smartmeters in Luxembourg.

This is why I had in mind to use this module smartmeter2mqtt which can handle the decryption perfectly.

But so far I managed to install it as a npm node in NodeRed but can’t pass parameters to it. If you tell me it’s not possible, then I’m afraid I’ll have to use another computer just to run smartmeter2mqtt 24/7

Best regards.

Alexandre

It’s not possible with home assistant os. You would need to run home assistant supervised in docker.

OK, I’ll run on another computer then since I want to keep Hassio OS on my PI.

Thank for your help in all cases, very much appreciated.