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

Update solarman.py #550

Merged
merged 1 commit into from
Jul 5, 2024
Merged

Update solarman.py #550

merged 1 commit into from
Jul 5, 2024

Conversation

nedyarrd
Copy link
Contributor

@nedyarrd nedyarrd commented Apr 4, 2024

Repair python 3.12 issue. Now it works but without logging. After something about 21 march 2024, changes to HA core made this component unusable. That little fix will work, but without logging from pySolarmanv5

Repair python 3.12 issue. Now it works but without logging
@Milinator
Copy link

Without logging means I don't get the current power?

@nedyarrd
Copy link
Contributor Author

nedyarrd commented Apr 4, 2024

No it means that You will not have logging from PySolarmanv5, debug and normal messages. Sensors will start to work. If You are not programmer developer You don't need that.

@Milinator
Copy link

No it means that You will not have logging from PySolarmanv5, debug and normal messages. Sensors will start to work. If You are not programmer developer You don't need that.

Thanks for your work and your reply. Sadly this fix is not working for me either. Does this integration work at all if you use the intermediate relay from deye in addition to the inverter?

@Milinator
Copy link

No it means that You will not have logging from PySolarmanv5, debug and normal messages. Sensors will start to work. If You are not programmer developer You don't need that.

Thanks for your work and your reply. Sadly this fix is not working for me either. Does this integration work at all if you use the intermediate relay from deye in addition to the inverter?

Solved it by downgrading to 1.4.3.
My inverter is deye sun-m80g3-eu-q0.

@bdeluca
Copy link

bdeluca commented Apr 6, 2024

So I tried this fix but I still have an error about a read only filesystem.
I added some more handling to see the exception.

Traceback (most recent call last): File "/config/custom_components/solarman/solarman.py", line 83, in get_statistics self.connect_to_server() File "/config/custom_components/solarman/solarman.py", line 39, in connect_to_server self._modbus = PySolarmanV5(self._host, self._serial, port=self._port, mb_slave_id=self._mb_slaveid, logger=None, auto_reconnect=True, socket_timeout=15) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pysolarmanv5/pysolarmanv5.py", line 118, in __init__ self._socket_setup(kwargs.get("socket"), kwargs.get("auto_reconnect", False)) File "/usr/local/lib/python3.12/site-packages/pysolarmanv5/pysolarmanv5.py", line 415, in _socket_setup self._data_queue = Queue(maxsize=1) ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/multiprocessing/context.py", line 103, in Queue return Queue(maxsize, ctx=self.get_context()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/multiprocessing/queues.py", line 43, in __init__ self._rlock = ctx.Lock() ^^^^^^^^^^ File "/usr/local/lib/python3.12/multiprocessing/context.py", line 68, in Lock return Lock(ctx=self.get_context()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/multiprocessing/synchronize.py", line 169, in __init__ SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx) File "/usr/local/lib/python3.12/multiprocessing/synchronize.py", line 57, in __init__ sl = self._semlock = _multiprocessing.SemLock( ^^^^^^^^^^^^^^^^^^^^^^^^^ OSError: [Errno 30] Read-only file system

@psykokwak-com
Copy link

I fixed this issue by forking https://github.com/jmccrohan/pysolarmanv5/blob/main/pysolarmanv5/pysolarmanv5.py from the package to the local plugin directory and replacing the "multiprocessing Queue" with the standard python Queue.

@bdeluca
Copy link

bdeluca commented Apr 13, 2024

I fixed this issue by forking https://github.com/jmccrohan/pysolarmanv5/blob/main/pysolarmanv5/pysolarmanv5.py from the package to the local plugin directory and replacing the "multiprocessing Queue" with the standard python Queue.

the issue with /dev/shm? I traced it back to a change in docker-ce, I reverted docker-ce to the version 24 and It works again. I dont think this is meant to be read-only. But its not resolved in the homeassistant image yet.

@StephanJoubert StephanJoubert merged commit d5cf155 into StephanJoubert:main Jul 5, 2024
2 checks passed
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.

5 participants