Getting data from SOFAR-LSW3 via MQTT

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
jool91
Posts: 2
Joined: Thursday 09 March 2023 18:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Getting data from SOFAR-LSW3 via MQTT

Post by jool91 »

All
I have a Domoticz Version: 2023-1 running on Raspberry4 and i try to monitor my Solar installation based on SOFAR inverter with LSW3 wifi Dongle.

I found and install from "Sofar_LSW3" API found in Gitub
This API use MQTT , I install it on the raspberry including MQTT client
Everything installed and configured properly (i guess)

Using MQTT explorer I can see that API is reading the data from the Inverter

On Domoticz I created the "MQTT client gateway with LAN interface" called SOLAR

Starting this point i am lost and did not succeed to get any Device updated.
Note: The hardware "MQTT..." did not allow virtual sensor creation

I get in Domoticz log the following error "Error: SOLAR: disconnected, restarting (rc=14/Protocol error)"
I googled the error and did not found any relavant answer.
Did not see what I am doing wrong.
User avatar
FireWizard
Posts: 1905
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Getting data from SOFAR-LSW3 via MQTT

Post by FireWizard »

Hello @jool91,

It is clear to me, why this will never work.

The MQTT interface into Domoticz requires a specific syntax. Like http.
You can find this at https://www.domoticz.com/wiki/MQTT

The MQTT output of your API, which you see in MQTT Explorer, does not match the requirements of Domoticz. You will need a conversion. Node-RED is the tool to use.

See: https://nodered.org/

Regards
Last edited by FireWizard on Friday 10 March 2023 9:49, edited 1 time in total.
jool91
Posts: 2
Joined: Thursday 09 March 2023 18:07
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Getting data from SOFAR-LSW3 via MQTT

Post by jool91 »

Thanks FireWizard

This was not clear in the installation / configuration a read.

I will have a try installing NodeRed and let you know

Brs
User avatar
waltervl
Posts: 5905
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Getting data from SOFAR-LSW3 via MQTT

Post by waltervl »

There is now an alternative Python plugin that can map unsupported MQTT messages to Domoticz devices through a configuration file:
viewtopic.php?f=65&t=39279
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest