Skip to content

Conversation

@jaredmauch
Copy link

  • Enable multiprocessing for inputs
  • Fix influxdb data type issue where floating point values are sometimes written as integer

@HotNoob
Copy link
Owner

HotNoob commented Jun 22, 2025

hmm... im confused by the "multiprocessing" thing...
ppg already does this sort of thing...

@jaredmauch
Copy link
Author

It wouldn't read from two serial ports at once with the same eg4 config - willing to try other things

@HotNoob
Copy link
Owner

HotNoob commented Jun 22, 2025

it's single threaded yes.
so it wouldn't read it concurrently, but it doesnt really need to.

read times are not included in the delays
https://github.com/HotNoob/PythonProtocolGateway/blob/86b7e6451da5e5522e4b2fd08ff018efbe807533/protocol_gateway.py#L188C1-L189C1

the main loop could be sped up a bit:

time.sleep(0.7) #change this in future. probably reduce to allow faster reads.

so yeah if the read time of one transport takes forever, it might interefer...

for improved performance, there is a variable timing feature that hasnt been implemented in the eg4_v58 protocol.
https://github.com/HotNoob/PythonProtocolGateway/blob/main/documentation/usage/creating_and_editing_protocols.md#read-interval


a quick alternative is simply running two or more instances of ppg though.

python3 -u protocol_gateway.py config.inverter1.cfg
python3 -u protocol_gateway.py config.inverter2.cfg

multithreading just adds... headaches...

@HotNoob
Copy link
Owner

HotNoob commented Jun 22, 2025

like, the multithreading gets very problematic, if you have two or more devices on the same bus... since modbus or any bus is essentially just a single serial connection shared amoung devices. physically only 1 can send/recieve at a time... ie, monitoring batteries.

@HotNoob HotNoob merged commit aeef8bb into HotNoob:v1.1.10 Jun 23, 2025
Copy link
Owner

@HotNoob HotNoob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inc update to influxdb_out

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.

2 participants