Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poller fix #53

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Poller fix #53

wants to merge 6 commits into from

Conversation

kchiem
Copy link

@kchiem kchiem commented Oct 2, 2021

@nrm21's changes:

  • to the poller binary that fixes commands longer than 5 characters.

  • it also allows it to take arbitrary length responses, doing away with the need to configure response lengths for QPIRI/QPIWS/QMOD/QPIGS commands in the inverter.conf file.

  • I also fixed a couple of compiler warnings.

  • Unfortunately, I couldn't figure out how to isolate the pull request to just the poller's files, so some other minor changes I made to the mqtt shell scripts are included.

@mstsclev
Copy link

Parametr “Battery_redischarge_voltage” set in “:-0.0,” while the QPIRI value displays the desired parameter:

Tue Oct 12 11:16:40 2021 INVERTER: QPIRI: 98 bytes read: (220.0 13.6 220.0 50.0 13.6 3000 2400 24.0 23.5 21.0 28.2 27.0 0 10 060 0 2 3 1 01 0 0 25.0 0 1`

@kchiem
Copy link
Author

kchiem commented Oct 12, 2021

Parametr “Battery_redischarge_voltage” set in “:-0.0,” while the QPIRI value displays the desired parameter:

Tue Oct 12 11:16:40 2021 INVERTER: QPIRI: 98 bytes read: (220.0 13.6 220.0 50.0 13.6 3000 2400 24.0 23.5 21.0 28.2 27.0 0 10 060 0 2 3 1 01 0 0 25.0 0 1`

Hi @mstsclev, this version still has a bug in it. Can you try the latest version from the master branch of my fork?

https://github.com/kchiem/docker-voltronic-homeassistant/tree/master/sources/inverter-cli

@porkytin
Copy link

porkytin commented Dec 6, 2021

Hello, I can't find the right combination of buffer sizes for my MKS SE II 5kW. If I understand, there is no need for those anymore in this fork. If I only need the sensors to show up in HA for now, do you think this fork would help me? @kchiem Thanks for your work!

@kchiem
Copy link
Author

kchiem commented Dec 7, 2021

Hello, I can't find the right combination of buffer sizes for my MKS SE II 5kW. If I understand, there is no need for those anymore in this fork. If I only need the sensors to show up in HA for now, do you think this fork would help me? @kchiem Thanks for your work!

Hi, yes, try checking out the inverter-cli from the link above your comment:

  • go into that folder and compile it:

$ cmake . && make

  • and run it with:

$ ./inverter_poller -1

@alexpalmer
Copy link

Just an FYI - manually pulled these changes in, and works great! Still thinking about re-sending charge modes when the mode doesn't actually change (sometimes either the inverter doesn't change modes, or doesn't get the raw command if polling at the same time)

@Ajbadenhorst
Copy link

@ned-kelly Could you please check out this pr? I struggled a bit trying to set the max charge rate before learning about the limitation there is on USB. Thanks!

@zavoyko70
Copy link

Hello, what am I doing wrong? does not work...
Help me. Thanks!

My inverter: MPP Solar / Infinisolar MPI 10k hybrid inverter

root@raspberrypi:/opt/ha-inverter-mqtt-agent/sources/inverter-cli# cmake . && make
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/ha-inverter-mqtt-agent/sources/inverter-cli
Scanning dependencies of target inverter_poller
[ 20%] Building CXX object CMakeFiles/inverter_poller.dir/inputparser.cpp.o
[ 40%] Building CXX object CMakeFiles/inverter_poller.dir/inverter.cpp.o
[ 60%] Building CXX object CMakeFiles/inverter_poller.dir/main.cpp.o
[ 80%] Building CXX object CMakeFiles/inverter_poller.dir/tools.cpp.o
[100%] Linking CXX executable inverter_poller
[100%] Built target inverter_poller

inverter.conf

device=/dev/hidraw0

run_interval=120

amperage_factor=1.0

watt_factor=1.01

qpiri=97

root@raspberrypi:/opt/ha-inverter-mqtt-agent/sources/inverter-cli# ./inverter_poller -1 -d
Thu Jun 2 17:57:30 2022 INVERTER: Debug set
Thu Jun 2 17:57:30 2022 INVERTER: QMOD: command CRC: 49 C1
Thu Jun 2 17:57:30 2022 INVERTER: QMOD: write offset 0, writing 7
Thu Jun 2 17:57:30 2022 INVERTER: QMOD: 7 bytes to write, 7 bytes written
Thu Jun 2 17:57:30 2022 INVERTER: QMOD: 8 bytes in reply: ^0\x1b\xe3\x0d\x00\x00\x00
Thu Jun 2 17:57:30 2022 INVERTER: QMOD: incorrect start/stop bytes
Thu Jun 2 17:57:30 2022 INVERTER: QPIGS: command CRC: B7 A9
Thu Jun 2 17:57:30 2022 INVERTER: QPIGS: write offset 0, writing 8
Thu Jun 2 17:57:30 2022 INVERTER: QPIGS: 8 bytes to write, 8 bytes written
Thu Jun 2 17:57:30 2022 INVERTER: QPIGS: 8 bytes in reply: ^0\x1b\xe3\x0d\x00\x00\x00
Thu Jun 2 17:57:30 2022 INVERTER: QPIGS: incorrect start/stop bytes
Thu Jun 2 17:57:30 2022 INVERTER: QPIRI: command CRC: F8 54
Thu Jun 2 17:57:30 2022 INVERTER: QPIRI: write offset 0, writing 8
Thu Jun 2 17:57:30 2022 INVERTER: QPIRI: 8 bytes to write, 8 bytes written
Thu Jun 2 17:57:30 2022 INVERTER: QPIRI: 8 bytes in reply: ^0\x1b\xe3\x0d\x00\x00\x00
Thu Jun 2 17:57:30 2022 INVERTER: QPIRI: incorrect start/stop bytes
Thu Jun 2 17:57:31 2022 INVERTER: QPIWS: command CRC: B4 DA
Thu Jun 2 17:57:31 2022 INVERTER: QPIWS: write offset 0, writing 8
Thu Jun 2 17:57:31 2022 INVERTER: QPIWS: 8 bytes to write, 8 bytes written
Thu Jun 2 17:57:31 2022 INVERTER: QPIWS: 8 bytes in reply: ^0\x1b\xe3\x0d\x00\x00\x00
Thu Jun 2 17:57:31 2022 INVERTER: QPIWS: incorrect start/stop bytes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants