I don’t really understand how docker works and with a friend we are trying to understand a little about the work of the code.
I changed the value, rebuilt the container locally and it began to be read, but the mqtt is not sent to the homeassistant.
I’ll share the fixes as it works.
Ok…very good.I think you have to modify Mqtt.json file to get data by mqtt.
me I cant help you with docker or with modify the file(im not able)…but you can ask
to @TheRoarman …he made the patched docker file…and also Help Wanted is needed for Issue_40
QPIGS new value shown. · Issue #40 · ned-kelly/docker-voltronic-homeassistant · GitHub.
Have help wanted from Ned-Kelly the repository Owner…and Manio that created the first C code that start this project…as you are able to do ,this is a great opportunity to develope this project…
Getting mqtt working with Mosquito 6.0.1 this is what I did.
- Removed all dashes from username. (This didnt work)
- Added "-i “voltronic” " to mqtt-push.sh just below “-P “$MQTT_PASSWORD””
- Added "-i “voltronic” " to mqtt-init.sh just below “-P “$MQTT_PASSWORD”” both times
Back in action.
Thank you, but for sake of helping others it has to be : -i “voltronic” \ on the files you mentioned. For clarity, it is need to add two times in init and only one in push.
But you missed file mqtt-subscriber.sh. You add -i “voltronic” after -P “$MQTT_PASSWORD” without \ so you can send commands to the inverter
Thank you for the fix
Not sure if I have missed something here but the inclusion of -i “voltronic” in the three files did not work for me.
Is there something else I need to do in the configuration of the MQTT plugin?
Everything works perfectly on MQTT version 5.1.1 with or without the modifications to the mqtt-init, mqtt-push and mqtt-subscriber files. So I am at a loss. My other python script on my OrangePI has no issues on MQTT v6.01 so I know the system is working.
Blockquote
622271327: New client connected from 192.168.10.253 as home-assistant (p2, c1, k60, u’mqttuser’).
[08:55:27] INFO: Successfully send service information to the Supervisor.
1622271327: New connection from 192.168.10.252 on port 1883.
1622271327: New client connected from 192.168.10.252 as mosqsub/54-e79afd5af02d (p1, c1, k60, u’mqttuser’).
1622271327: New connection from 192.168.10.251 on port 1883.
1622271327: New client connected from 192.168.10.251 as outside_pi (p2, c0, k60, u’mqttuser’).
1622271357: New connection from 192.168.10.252 on port 1883.
1622271357: New client connected from 192.168.10.252 as mosqpub/12219-e79afd5af (p1, c1, k60, u’mqttuser’).
1622271357: Client mosqpub/12219-e79afd5af disconnected.
1622271357: New connection from 192.168.10.252 on port 1883.
1622271357: New client connected from 192.168.10.252 as mosqpub/12241-e79afd5af (p1, c1, k60, u’mqttuser’).
1622271357: Client mosqpub/12241-e79afd5af disconnected.
1622271357: New connection from 192.168.10.252 on port 1883.
1622271357: New client connected from 192.168.10.252 as mosqpub/12263-e79afd5af (p1, c1, k60, u’mqttuser’).
1622271357: Client mosqpub/12263-e79afd5af disconnected.
1622271357: New connection from 192.168.10.252 on port 1883.
1622271357: New client connected from 192.168.10.252 as mosqpub/12285-e79afd5af (p1, c1, k60, u’mqttuser’).
1622271357: Client mosqpub/12285-e79afd5af disconnected.
this goes on for a while
It appears to be connecting but no messages are actually received by the MQTT broker. I have tried manually listening to the topics as well.
Does anyone know how to know the exact value? I have been trying many and nothing. thx!
Hi guys,
This line are correct ?
-P “$MQTT_PASSWORD” -i “voltronic” \
Thank you.
Hi…can you kindly post the solution you find and specify all files to modify and where must modify?..so all can understand.
Grazie
Hello Everyone, Its great to have the opportunity to use this project for monitoring inverters.
I was able to get this setup on docker a number of months ago, no major issues other than the pv watt input which i got around by calculating in grafana and more importantly the automations / sending of commands to the inverter.
No matter what I have tried, I cannot seem to send commands / write to the inverter.
MQTT is setup and works perfectly, I can get values from the inverter to the broker, but when I publish to the inverter topic to make changes to the settings or toggle switches on the Home assistant power dashboard, I get absolutely zero response.
I have an MPPSolar 3024GK (3KW/24V) model and i’ll really appreciate any help in getting the commands working as i need to add some automations.
Thanks!
@ans-gw Do you perhaps know what is going on here?
I am trying to help someone with a KODAK inverter, 5kW. When I run the manual poller process, a part of the config appears.
pi@inverter-pi:/opt/ha-inverter-mqtt-agent/sources/inverter-cli $ docker exec -it inverter1-mqtt bash -c '/opt/inverter-cli/bin/inverter_poller -d -1'
Mon Jul 12 10:54:30 2021 INVERTER: Debug set
Mon Jul 12 10:54:30 2021 INVERTER: Current CRC: 49 C1
Mon Jul 12 10:54:31 2021 INVERTER: QMOD reply size (5 bytes)
configuration options for the actual inverter polling process...es. Buffer: (NAKs�
# The device to read from...
# Use: /dev/ttyS0 if you have a serial device,
# /dev/ttyUSB0 if a USB<>Serial,
# /dev/hidraw0 if you're connecting via the USB port on the inverter.
device=/dev/ttyUSB0
# How many times per hour is the program going to run...
# This is used to calculate the PV & Load Watt Hours between runs...
# If unsure, leave as default - it will run every minute...
# (120 = every 30 seconds)...
run_interval=120
# This allows you to modify the amperage in case the inverter is giving an incorrect
# reading compared to measurement tools. Normally this will remain '1'
Also, setting QPIRI to 102, 103 or basically anything between 97 and 106 results in QPIRI reply too short (7 bytes)
. Any help from anyone will be greatly appreciated…
a great project and very useful for those who have a photovoltaic system !! just a pity that it does not work with my inverters … because when I connect it in series and that I do an inverter_pool -d -1 the result for qpri and the rest is at 0 bytes. I tried to modify its values but the topics of mosquitto remain empty (no data from the inverter) I will continue to follow the project because who knows maybe one day it will work for this model: Inverters
Show your inverter.conf, as well as an output of the debug run.
hi hanerasmus,
attached my inverter.conf and screenshoot of debug.
the voltronic-mqtt image is installed on my synology NAS and runs through docker.
if I connect my inverter in USB I cannot connect in debug but in series it works.
thanks for your precious time
# Basic configuration options for the actual inverter polling process…
# The device to read from…
# Use: /dev/ttyS0 if you have a serial device,
# /dev/ttyUSB0 if a USB<>Serial,
# /dev/hidraw0 if you’re connecting via the USB port on the inverter.
device=/dev/ttyS0
# How many times per hour is the program going to run…
# This is used to calculate the PV & Load Watt Hours between runs…
# If unsure, leave as default - it will run every minute…
# (120 = every 30 seconds)…
run_interval=120
# This allows you to modify the amperage in case the inverter is giving an incorrect
# reading compared to measurement tools. Normally this will remain '1’
amperage_factor=1.0
# This allows you to modify the wattage in case the inverter is giving an incorrect
# reading compared to measurement tools. Normally this will remain '1’
watt_factor=1.01
# This allows you to modify the buffersize for the qpiri command
qpiri=98
# This allows you to modify the buffersize for the qpiws command
qpiws=36
# This allows you to modify the buffersize for the qmod command
qmod=5
# This allows you to modify the buffersize for the qpigs command
qpigs=110
ls -la /dev/
on your NAS to make sure you are indeed using that port. Read timeout to me sounds like it is not able to read your device (aka the one connected to your NAS).
I saw this earlier, but it was on a /dev/hidraw device. I had a USB plugged into an inverter and a Pi. Also had keyboard and mouse plugged in. Seems somehow the inverter was not on hidraw0 anymore. Removed K/M and all of a sudden it started working again. So, imho, it seems the values cannot be read from the inverter in your case. May be a stupid question, but have you checked that the port your serial device is connected to, is indeed the one for serial comms and not the one for LCD display screens (like Kodak inverters)?
this is all speculation, just trying to think of reasons why it will keep on saying timeout.
it’s a good question and not at all stupid but I think so because there is only one serial on the inverter and currently there is a wifi box connected to it which sends some data (I don’t know where in China certainly) and this allows me to visualize via the smartess app some graphs but too incomplete to be usable. I think that my inverter does not dialogue exactly in series as for the inverters on which it works … I also thought that the problem could come from my syno hidraw <> hidev to make sure I reinstalled everything on another machine this afternoon (windows 10 and docker win) but I had the same result no data in the topics . if I could find a way to collect the data sent via my wifi serial box I could then send them to home assistant but I don’t see how to do it yet !? if not I also found a doc on the dialogue series of inverter I join it of the times that it can be useful for someone. there I am stuck …
For people way smarter than me, that document might help.
In my experience,the only value in the standard inverter.conf to change, is the qpiri value. the rest I have always been able to leave as they come with the docker container. The QPIRI one is the one that always changes. But again, for me this has been guesswork always, so much so that I too am stuck with helping someone with a Kodak inverter find the correct value. I have tried everything so far. But nothing. I will keep at it though.
So what I would do if I were you: on a linux machine, connect your serial cable directly to a linux machine. Then, only fiddle with the qpiri value, not the other ones, until you see something different. That is about all I can say atm, sorry for not being more help
no worries and I admit that this is what I wanted to do first but the only machine with a com port available that I had is too old. the only 32 bit version that I can put is an ubuntu 16.04 … in short, deprecated for a long time. maybe with a rasperry it would work? in short, I will continue to look for a solution to monotore my installation. thank you for the help given.