Kleinrotti / py-senertec

Senertec energy system gen2 interface.
MIT License
1 stars 1 forks source link

BM001 values #10

Open emse1981 opened 1 year ago

emse1981 commented 1 year ago

I uninstalled version 0.3.0 and installed version 0.5.0. I mainly want to read out the values ​​BM001. Unfortunately, they arrive randomly. sometimes no values ​​sometimes all. can you send me an example script where the problem is solved? Thanks

Kleinrotti commented 1 year ago

You can use the example script as template. Make sure you use a datapointFilter.json. Sometimes if too many datapoints are requested at once, not all are returned. I think the senertec platform can't handle so much requests in that short time period.

Since version 0.4.0 you can also comment out the lines 55 to 60 in the example script to search and request specific datapoints.

emse1981 commented 1 year ago

i have this error with this example script:

root@debian:~# python3 innogen_neu.py Traceback (most recent call last): File "/root/innogen_neu.py", line 6, in <module> from senertec.client import senertec File "/usr/local/lib/python3.9/dist-packages/senertec/client.py", line 119, in <module> class senertec(basesocketclient): File "/usr/local/lib/python3.9/dist-packages/senertec/client.py", line 450, in senertec def request(self, dataPoints: list | str): TypeError: unsupported operand type(s) for |: 'type' and 'type' root@debian:~#

Kleinrotti commented 1 year ago

You need Python 3.10+ for the new version.

emse1981 commented 1 year ago

Thank you for your help. another question: is it possible for you to create an adapter for iobroker? would be nice

Kleinrotti commented 1 year ago

No not really. I don't use iobroker and adapters use JavaScript I think. So it would be a complete new code base.

emse1981 commented 1 year ago

Hello, script runs fine now, even with the BM001 values ​​split into BM001_0, BM001_1... is this also possible with the value AM027? AM027_0... Thank you

Kleinrotti commented 1 year ago

Is that the Outside Temperature Sensor? This isn't an array so it can't be separated to _1, _2 and so on. But I don't know so far that there are multiple values in that datapoint.

emse1981 commented 1 year ago

Wieso eigentlich nicht deutsch? Ja das ist Außentemperatur. Da bekomm ich oft keinen Wert, und wenn dann bekomm ich z.B. -327.26 C° Selten bekomm ich den richtigen Wert.

Kleinrotti commented 1 year ago

Ja mit dem Sensor Wert habe ich auch oft Probleme, dass -327.26 zurück kommt. Den Datenpunkt gibt es aus irgendeinem Grund in zwei Boards: SCB-04@1 und CU-GH04a. Der richtige Wert steht was ich bisher feststellen konnte in SCB-04@1 drin (zumindest bei mir, da man den Sensor anscheinend physisch an beide Boards anschließen kann). Da suche ich aktuell nach einer guten Lösung um das "richtige" Board dynamisch bei der Abfrage zu erkennen. Ich kann mir gut Vorstellen, dass einige wenige andere Datenpunkte auch dieses Problem haben.

Kleinrotti commented 1 year ago

Leider habe ich keine Möglichkeit gefunden das richtige Board anhand eines Indikators dynamisch zu bestimmen.

Als alternative werde ich eine weitere request Methode hinzufügen namens "request_with_board". Bei dieser Methode kann dann zusätzlich noch der Name vom Board übergeben werden um zuverlässig den richtigen Sensor zu bekommen.

Geplant für Release 1.0.0 mit einigen weiteren Anpassungen um das Handling mit den Datenpunkten zu vereinfachen.