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

Sensor states Unknown after 4 days uptime #576

Closed
markogresak opened this issue May 3, 2024 · 7 comments
Closed

Sensor states Unknown after 4 days uptime #576

markogresak opened this issue May 3, 2024 · 7 comments

Comments

@markogresak
Copy link

My correction is working correctly, but after around 4 days of uptime, all sensors go to Unknown, even though Status_connection is still Connected. When I restart Home Assistant, the state is correct again.

I am using v1.5.1 with definition deye_sg04lp3.yaml.

I did not find anything useful in the logs.

Can this be fixed, or is there at least a workaround?

@PV-Joe
Copy link

PV-Joe commented May 3, 2024

I recommend Solarman 1.4.3.
It runs very stable with my Deye Hybrid 8K since 1,5 years. The update interval of 20 seconds was edited manually.

@jmccrohan
Copy link
Contributor

My correction is working correctly, but after around 4 days of uptime, all sensors go to Unknown, even though Status_connection is still Connected. When I restart Home Assistant, the state is correct again.

I am using v1.5.1 with definition deye_sg04lp3.yaml.

I did not find anything useful in the logs.

Can this be fixed, or is there at least a workaround?

Please enable debug logging and attach same.

Add the following to configuration.yml:

logger:
  logs:
     custom_components.solarman: debug

@markogresak
Copy link
Author

Still running the version v1.5.1, this is the log output, the update interval was set to 15s:

Log output
2024-05-10 13:11:39.533 DEBUG (SyncWorker_13) [custom_components.solarman.solarman] All queries succeeded, exposing updated values.
2024-05-10 13:12:05.354 DEBUG (SyncWorker_53) [custom_components.solarman.solarman] Starting to query for [6] ranges...
2024-05-10 13:12:05.354 DEBUG (SyncWorker_53) [custom_components.solarman.solarman] Querying [3 - 89]...
2024-05-10 13:12:05.355 DEBUG (SyncWorker_53) [custom_components.solarman.solarman] SENT: a5 17 00 10 45 3e 00 a6 f7 80 a2 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 00 03 00 57 f4 34 f1 15
2024-05-10 13:12:05.893 DEBUG (SyncWorker_53) [custom_components.solarman.solarman] RECD: a5 c1 00 10 15 3e 8a a6 f7 80 a2 02 01 c4 e5 18 01 72 02 00 00 40 1b 25 65 01 03 ae 32 32 31 31 31 36 39 35 33 30 00 00 00 00 00 00 18 07 00 00 00 00 20 05 11 44 00 00 10 01 c0 37 00 00 d4 c0 00 01 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff 18 05 0a 0d 0c 08 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 01 ff ff 00 01 ff ff 00 00 03 e8 00 01 00 00 ff ff ff ff ff ff 00 00 ff ff ff ff ff ff ff ff 8a 59 62 15
2024-05-10 13:12:05.895 DEBUG (SyncWorker_53) [custom_components.solarman.solarman] Querying [3 - 89] succeeded
2024-05-10 13:12:05.896 DEBUG (SyncWorker_53) [custom_components.solarman.solarman] Querying [514 - 558]...
2024-05-10 13:12:05.896 DEBUG (SyncWorker_53) [custom_components.solarman.solarman] SENT: a5 17 00 10 45 3f 00 a6 f7 80 a2 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 02 02 00 2d 25 af 75 15
2024-05-10 13:12:15.355 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.solarman_pv1_power is taking over 10 seconds
2024-05-10 13:12:20.911 DEBUG (SyncWorker_53) [custom_components.solarman.solarman] Got exception when receiving frame
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/pysolarmanv5/pysolarmanv5.py", line 277, in _send_receive_v5_frame
    v5_response = self._data_queue.get(timeout=self.socket_timeout)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/multiprocessing/queues.py", line 114, in get
    raise Empty
_queue.Empty
2024-05-10 13:12:20.914 WARNING (SyncWorker_53) [custom_components.solarman.solarman] Querying [514 - 558] failed with exception [Empty: ]
2024-05-10 13:12:20.914 INFO (SyncWorker_53) [custom_components.solarman.solarman] Disconnecting from solarman data logger obfuscated-logger-ip:8899
2024-05-10 13:12:20.920 WARNING (SyncWorker_53) [custom_components.solarman.solarman] Querying [514 - 558] failed, [1] retry attempts left
2024-05-10 13:12:20.920 INFO (SyncWorker_53) [custom_components.solarman.solarman] Connecting to solarman data logger obfuscated-logger-ip:8899
2024-05-10 13:12:22.975 DEBUG (SyncWorker_53) [custom_components.solarman.solarman] Socket setup completed... <socket.socket fd=12, family=2, type=1, proto=6, laddr=('obfuscated-HA-ip', 44372), raddr=('obfuscated-logger-ip', 8899)>
2024-05-10 13:12:22.976 DEBUG (SyncWorker_53) [custom_components.solarman.solarman] SENT: a5 17 00 10 45 06 00 a6 f7 80 a2 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 02 02 00 2d 25 af 3c 15
2024-05-10 13:12:35.355 WARNING (MainThread) [homeassistant.components.sensor] Updating solarman sensor took longer than the scheduled update interval 0:00:30
2024-05-10 13:12:37.992 DEBUG (SyncWorker_53) [custom_components.solarman.solarman] Got exception when receiving frame
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/pysolarmanv5/pysolarmanv5.py", line 277, in _send_receive_v5_frame
    v5_response = self._data_queue.get(timeout=self.socket_timeout)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/multiprocessing/queues.py", line 114, in get
    raise Empty
_queue.Empty
2024-05-10 13:12:37.994 WARNING (SyncWorker_53) [custom_components.solarman.solarman] Querying [514 - 558] failed with exception [Empty: ]
2024-05-10 13:12:37.995 INFO (SyncWorker_53) [custom_components.solarman.solarman] Disconnecting from solarman data logger obfuscated-logger-ip:8899
2024-05-10 13:12:37.999 WARNING (SyncWorker_53) [custom_components.solarman.solarman] Querying [514 - 558] failed, [0] retry attempts left
2024-05-10 13:12:38.000 WARNING (SyncWorker_53) [custom_components.solarman.solarman] Querying registers [514 - 558] failed, aborting.
2024-05-10 13:12:38.001 DEBUG (SyncWorker_53) [custom_components.solarman.sensor] No value recorded for PV1 Power
2024-05-10 13:12:38.005 DEBUG (SyncWorker_20) [custom_components.solarman.sensor] No value recorded for PV2 Power
2024-05-10 13:12:38.009 DEBUG (SyncWorker_29) [custom_components.solarman.sensor] No value recorded for PV1 Voltage
2024-05-10 13:12:38.012 DEBUG (SyncWorker_33) [custom_components.solarman.sensor] No value recorded for PV2 Voltage
2024-05-10 13:12:38.014 DEBUG (SyncWorker_48) [custom_components.solarman.sensor] No value recorded for PV1 Current
2024-05-10 13:12:38.018 DEBUG (SyncWorker_25) [custom_components.solarman.sensor] No value recorded for PV2 Current
2024-05-10 13:12:38.021 DEBUG (SyncWorker_40) [custom_components.solarman.sensor] No value recorded for Daily Production
2024-05-10 13:12:38.024 DEBUG (SyncWorker_17) [custom_components.solarman.sensor] No value recorded for Total Production
2024-05-10 13:12:38.027 DEBUG (SyncWorker_45) [custom_components.solarman.sensor] No value recorded for Daily Battery Charge
2024-05-10 13:12:38.030 DEBUG (SyncWorker_61) [custom_components.solarman.sensor] No value recorded for Daily Battery Discharge
2024-05-10 13:12:38.033 DEBUG (SyncWorker_59) [custom_components.solarman.sensor] No value recorded for Total Battery Charge
2024-05-10 13:12:38.036 DEBUG (SyncWorker_23) [custom_components.solarman.sensor] No value recorded for Total Battery Discharge
2024-05-10 13:12:38.039 DEBUG (SyncWorker_52) [custom_components.solarman.sensor] No value recorded for Battery Power
2024-05-10 13:12:38.041 DEBUG (SyncWorker_32) [custom_components.solarman.sensor] No value recorded for Battery Voltage
2024-05-10 13:12:38.044 DEBUG (SyncWorker_60) [custom_components.solarman.sensor] No value recorded for Battery SOC
2024-05-10 13:12:38.048 DEBUG (SyncWorker_22) [custom_components.solarman.sensor] No value recorded for Battery Current
2024-05-10 13:12:38.051 DEBUG (SyncWorker_22) [custom_components.solarman.sensor] No value recorded for Battery Temperature
2024-05-10 13:12:38.053 DEBUG (SyncWorker_12) [custom_components.solarman.sensor] No value recorded for Total Grid Power
2024-05-10 13:12:38.057 DEBUG (SyncWorker_62) [custom_components.solarman.sensor] No value recorded for Grid Voltage L1
2024-05-10 13:12:38.060 DEBUG (SyncWorker_46) [custom_components.solarman.sensor] No value recorded for Grid Voltage L2
2024-05-10 13:12:38.062 DEBUG (SyncWorker_6) [custom_components.solarman.sensor] No value recorded for Grid Voltage L3
2024-05-10 13:12:38.065 DEBUG (SyncWorker_7) [custom_components.solarman.sensor] No value recorded for Internal CT L1 Power
2024-05-10 13:12:38.068 DEBUG (SyncWorker_27) [custom_components.solarman.sensor] No value recorded for Internal CT L2 Power
2024-05-10 13:12:38.071 DEBUG (SyncWorker_28) [custom_components.solarman.sensor] No value recorded for Internal CT L3 Power
2024-05-10 13:12:38.074 DEBUG (SyncWorker_44) [custom_components.solarman.sensor] No value recorded for External CT L1 Power
2024-05-10 13:12:38.077 DEBUG (SyncWorker_49) [custom_components.solarman.sensor] No value recorded for External CT L2 Power
2024-05-10 13:12:38.080 DEBUG (SyncWorker_42) [custom_components.solarman.sensor] No value recorded for External CT L3 Power
2024-05-10 13:12:38.082 DEBUG (SyncWorker_39) [custom_components.solarman.sensor] No value recorded for Daily Energy Bought
2024-05-10 13:12:38.086 DEBUG (SyncWorker_39) [custom_components.solarman.sensor] No value recorded for Total Energy Bought
2024-05-10 13:12:38.088 DEBUG (SyncWorker_21) [custom_components.solarman.sensor] No value recorded for Daily Energy Sold
2024-05-10 13:12:38.092 DEBUG (SyncWorker_54) [custom_components.solarman.sensor] No value recorded for Total Energy Sold
2024-05-10 13:12:38.094 DEBUG (SyncWorker_58) [custom_components.solarman.sensor] No value recorded for Total Grid Production
2024-05-10 13:12:38.097 DEBUG (SyncWorker_47) [custom_components.solarman.sensor] No value recorded for Total Load Power
2024-05-10 13:12:38.101 DEBUG (SyncWorker_35) [custom_components.solarman.sensor] No value recorded for Load L1 Power
2024-05-10 13:12:38.104 DEBUG (SyncWorker_43) [custom_components.solarman.sensor] No value recorded for Load L2 Power
2024-05-10 13:12:38.106 DEBUG (SyncWorker_31) [custom_components.solarman.sensor] No value recorded for Load L3 Power
2024-05-10 13:12:38.109 DEBUG (SyncWorker_56) [custom_components.solarman.sensor] No value recorded for Load Voltage L1
2024-05-10 13:12:38.113 DEBUG (SyncWorker_53) [custom_components.solarman.sensor] No value recorded for Load Voltage L2
2024-05-10 13:12:38.115 DEBUG (SyncWorker_36) [custom_components.solarman.sensor] No value recorded for Load Voltage L3
2024-05-10 13:12:38.118 DEBUG (SyncWorker_29) [custom_components.solarman.sensor] No value recorded for Daily Load Consumption
2024-05-10 13:12:38.122 DEBUG (SyncWorker_29) [custom_components.solarman.sensor] No value recorded for Total Load Consumption
2024-05-10 13:12:38.126 DEBUG (SyncWorker_29) [custom_components.solarman.sensor] No value recorded for Current L1
2024-05-10 13:12:38.128 DEBUG (SyncWorker_48) [custom_components.solarman.sensor] No value recorded for Current L2
2024-05-10 13:12:38.131 DEBUG (SyncWorker_63) [custom_components.solarman.sensor] No value recorded for Current L3
2024-05-10 13:12:38.135 DEBUG (SyncWorker_40) [custom_components.solarman.sensor] No value recorded for Inverter L1 Power
2024-05-10 13:12:38.137 DEBUG (SyncWorker_17) [custom_components.solarman.sensor] No value recorded for Inverter L2 Power
2024-05-10 13:12:38.140 DEBUG (SyncWorker_14) [custom_components.solarman.sensor] No value recorded for Inverter L3 Power
2024-05-10 13:12:38.144 DEBUG (SyncWorker_45) [custom_components.solarman.sensor] No value recorded for DC Temperature
2024-05-10 13:12:38.147 DEBUG (SyncWorker_11) [custom_components.solarman.sensor] No value recorded for AC Temperature
2024-05-10 13:12:38.150 DEBUG (SyncWorker_26) [custom_components.solarman.sensor] No value recorded for Inverter ID
2024-05-10 13:12:38.152 DEBUG (SyncWorker_52) [custom_components.solarman.sensor] No value recorded for Communication Board Version No.
2024-05-10 13:12:38.154 DEBUG (SyncWorker_32) [custom_components.solarman.sensor] No value recorded for Control Board Version No.
2024-05-10 13:12:38.156 DEBUG (SyncWorker_9) [custom_components.solarman.sensor] No value recorded for Alert
2024-05-10 13:13:05.357 DEBUG (SyncWorker_5) [custom_components.solarman.solarman] Starting to query for [6] ranges...
2024-05-10 13:13:05.357 DEBUG (SyncWorker_5) [custom_components.solarman.solarman] Querying [3 - 89]...
2024-05-10 13:13:05.357 INFO (SyncWorker_5) [custom_components.solarman.solarman] Connecting to solarman data logger obfuscated-logger-ip:8899
2024-05-10 13:13:05.372 DEBUG (SyncWorker_5) [custom_components.solarman.solarman] Socket setup completed... <socket.socket fd=22, family=2, type=1, proto=6, laddr=('obfuscated-HA-ip', 34410), raddr=('obfuscated-logger-ip', 8899)>
2024-05-10 13:13:05.372 DEBUG (SyncWorker_5) [custom_components.solarman.solarman] SENT: a5 17 00 10 45 96 00 a6 f7 80 a2 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 00 03 00 57 f4 34 49 15
2024-05-10 13:13:15.357 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.solarman_pv1_power is taking over 10 seconds
2024-05-10 13:13:20.389 DEBUG (SyncWorker_5) [custom_components.solarman.solarman] Got exception when receiving frame
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/pysolarmanv5/pysolarmanv5.py", line 277, in _send_receive_v5_frame
    v5_response = self._data_queue.get(timeout=self.socket_timeout)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/multiprocessing/queues.py", line 114, in get
    raise Empty
_queue.Empty
2024-05-10 13:13:20.391 WARNING (SyncWorker_5) [custom_components.solarman.solarman] Querying [3 - 89] failed with exception [Empty: ]
2024-05-10 13:13:20.392 INFO (SyncWorker_5) [custom_components.solarman.solarman] Disconnecting from solarman data logger obfuscated-logger-ip:8899
2024-05-10 13:13:20.396 WARNING (SyncWorker_5) [custom_components.solarman.solarman] Querying [3 - 89] failed, [1] retry attempts left
2024-05-10 13:13:20.397 INFO (SyncWorker_5) [custom_components.solarman.solarman] Connecting to solarman data logger obfuscated-logger-ip:8899
2024-05-10 13:13:20.894 DEBUG (SyncWorker_5) [custom_components.solarman.solarman] Socket setup completed... <socket.socket fd=22, family=2, type=1, proto=6, laddr=('obfuscated-HA-ip', 38308), raddr=('obfuscated-logger-ip', 8899)>
2024-05-10 13:13:20.895 DEBUG (SyncWorker_5) [custom_components.solarman.solarman] SENT: a5 17 00 10 45 0d 00 a6 f7 80 a2 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 00 03 00 57 f4 34 c0 15
2024-05-10 13:13:23.709 DEBUG (SyncWorker_5) [custom_components.solarman.solarman] RECD: a5 c1 00 10 15 0d 8f a6 f7 80 a2 02 01 0f e6 18 01 bd 02 00 00 40 1b 25 65 01 03 ae 32 32 31 31 31 36 39 35 33 30 00 00 00 00 00 00 18 07 00 00 00 00 20 05 11 44 00 00 10 01 c0 37 00 00 d4 c0 00 01 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff ff ff 18 05 0a 0d 0d 16 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 00 01 ff ff 00 01 ff ff 00 00 03 e8 00 01 00 00 ff ff ff ff ff ff 00 00 ff ff ff ff ff ff ff ff fa 5f 52 15
2024-05-10 13:13:23.712 DEBUG (SyncWorker_5) [custom_components.solarman.solarman] Querying [3 - 89] succeeded
2024-05-10 13:13:23.712 DEBUG (SyncWorker_5) [custom_components.solarman.solarman] Querying [514 - 558]...
2024-05-10 13:13:23.713 DEBUG (SyncWorker_5) [custom_components.solarman.solarman] SENT: a5 17 00 10 45 0e 00 a6 f7 80 a2 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 03 02 02 00 2d 25 af 44 15
2024-05-10 13:13:35.357 WARNING (MainThread) [homeassistant.components.sensor] Updating solarman sensor took longer than the scheduled update interval 0:00:30
2024-05-10 13:13:38.730 DEBUG (SyncWorker_5) [custom_components.solarman.solarman] Got exception when receiving frame
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/pysolarmanv5/pysolarmanv5.py", line 277, in _send_receive_v5_frame
    v5_response = self._data_queue.get(timeout=self.socket_timeout)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/multiprocessing/queues.py", line 114, in get
    raise Empty
_queue.Empty
2024-05-10 13:13:38.732 WARNING (SyncWorker_5) [custom_components.solarman.solarman] Querying [514 - 558] failed with exception [Empty: ]
2024-05-10 13:13:38.733 INFO (SyncWorker_5) [custom_components.solarman.solarman] Disconnecting from solarman data logger obfuscated-logger-ip:8899
2024-05-10 13:13:38.738 WARNING (SyncWorker_5) [custom_components.solarman.solarman] Querying [514 - 558] failed, [1] retry attempts left
2024-05-10 13:13:38.738 INFO (SyncWorker_5) [custom_components.solarman.solarman] Connecting to solarman data logger obfuscated-logger-ip:8899

If relevant, the logger is using a wifi connection, but the signal is strong.

The update interval of 20 seconds was edited manually.

Based on this suggestion, I have changed the config to use 30s interval, I am testing now if it will help.

@d-eggert
Copy link

I have the very same issue. @markogresak did changing the update interval fix it?

@markogresak
Copy link
Author

No, I am experiencing the same problems with longer interval.

I am now testing with reinstalled version, first trying the latest (main), if that does not work, I will switch to 1.4.3.

@donzeg
Copy link

donzeg commented May 28, 2024

My correction is working correctly, but after around 4 days of uptime, all sensors go to Unknown, even though Status_connection is still Connected. When I restart Home Assistant, the state is correct again.
I am using v1.5.1 with definition deye_sg04lp3.yaml.
I did not find anything useful in the logs.
Can this be fixed, or is there at least a workaround?

Please enable debug logging and attach same.

Add the following to configuration.yml:

logger:
  logs:
     custom_components.solarman: debug

home-assistant_solarman_2024-05-28T20-38-17.572Z.log

please can you check my log, I just tried to setup the solarman for my inverter 16kw but no data showing

@markogresak
Copy link
Author

Update:

None of the version I've tried helped, and the change to 30s interval did not fix it.

I've mentioned the problem to my PV system installer. He saw the brief disconnection problem with other loggers as well, even when logging to the Solarman online service with an interval of 5 minutes. This leads me to believe there's a general networking problem with the wifi logger.

I've explored the option to use Modebus, but then found the option to have a Solarman Stick Logger with ethernet connection. Unfortunately, after installing it, I've learned it does not work with this plugin, the connection is timing out. It's a problem with pysolarmanv5 module, reported under issue jmccrohan/pysolarmanv5#22.

I have switched to https://github.com/kellerza/sunsynk. The solarman driver (pysolarmanv5) will not work, I've configured the connection with pymodbus driver and it's working will with an uptime of over 1 week so far.

I am closing this issue as it appears to be unrelated with this integration or pysolarmanv5 module, there's a networking problem with wifi logger stick itself.

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

No branches or pull requests

5 participants