Commit Graph

44 Commits

Author SHA1 Message Date
Thomas Basler
ac7b5dba11 Resend and Retransmit count is now implementable per command 2023-04-15 10:55:48 +02:00
Thomas Basler
f5767e61ef Implement CMD56 as own command.
By doing so, it's possible to send all packets via the sendEsbPacket method. A lot of stuff could be removed which is no more used.
2023-04-15 10:55:48 +02:00
Thomas Basler
45882543b6 Allow dynamic pin mapping for CMT module 2023-04-15 10:55:47 +02:00
Thomas Basler
a7e9aaa862 Move reference to the radio instance into the inverter instance
This is required to support different radios for different inverters
2023-04-15 10:55:47 +02:00
Thomas Basler
d6028cbd50 Remove not required F() macro. Frees ~20kb flash. 2023-04-04 18:51:18 +02:00
Thomas Basler
041249523e Fixed typo in comment 2023-03-28 22:41:27 +02:00
Thomas Basler
fa3d0370f0 Fix isReachable and isProducing based on PollEnabled 2023-02-18 23:50:16 +01:00
Thomas Basler
7da782c4ef Hoymiles Lib: Added flags to inverter to enable/disable polling and commands to the inverter 2023-02-18 15:51:46 +01:00
Thomas Basler
d4c838a16e BREAKING CHANGE: Prometheus API!
Added additional field to the prometheus api which identifies a channel by it's type. That means that e.g. channel 0  exists for type AC and DC.

This commit also introduces a additional field in the statistics byte assignment table. This field identifies whether a channel is on the AC or DC side. MQTT and WebAPI is still compatible with the previous design.
2023-02-06 19:51:10 +01:00
Thomas Basler
6b36369b06 Hoymiles Lib: Migrate byteAssign array to std::list 2023-02-06 19:44:00 +01:00
Thomas Basler
7c33688167 Use same line ending in printf as in println
This prevents mistakes in the webconsole
2023-01-04 18:48:33 +01:00
Thomas Basler
f689fedf4e Hoymiles Lib: Remove hard coded Serial output
The serial port for output of debug information can now changed during runtime
2022-12-19 20:52:12 +01:00
Thomas Basler
5feefed14e Added missing copyright information 2022-12-14 22:37:37 +01:00
Thomas Basler
f741fea333 Move serial number formatting to inverter class 2022-10-29 11:22:56 +02:00
Thomas Basler
0fd714b165 Implemented first few classes for power control
TurnOn and TurnOff
2022-10-04 18:12:55 +02:00
Thomas Basler
862b65e844 Added method to detect whether an inverter is reachable 2022-10-01 02:16:47 +02:00
Thomas Basler
a261eb838c Added method to detect whether a inverter is producing 2022-10-01 02:00:56 +02:00
Thomas Basler
a707ab501d Implemented method to check whether the last command was successfull
This also allows to retransmit the command after specific time if not successfull
2022-09-30 18:34:30 +02:00
Thomas Basler
a2880cc447 Add RX main command to structure which is passed to handleResponse
This is required because the DevControlCommands just set the first byte to define whether the request was successfull or not
2022-09-30 18:34:30 +02:00
Thomas Basler
c28a532bf1 Added base classes for SystemConfigPara 2022-09-09 18:41:07 +02:00
Thomas Basler
8715320282 Implemented DevInfo command 2022-08-10 19:03:02 +02:00
Thomas Basler
037f7b9caf Move CRC check of multidata command from InverterAbstract to MultiDataCommand class 2022-08-03 19:51:10 +02:00
Thomas Basler
081b19f9fb Allow fragments without payload
This is required for several DevControl commands
2022-08-03 19:13:31 +02:00
Thomas Basler
857e4a3671 Remove RequestType and place handling of response in the command class 2022-08-03 18:50:34 +02:00
Thomas Basler
dcc7e47b19 Hoymiles: Introduce init method to have a clean init on beginning
Constructor is not possible for obvious reasons
2022-07-18 21:30:12 +02:00
Thomas Basler
c6499e09bd Ignore fragment number zero. Should fix #29
It seems that some inverters send packages with fragment number zero and a valid CRC. Must ignore such packets!
2022-07-15 22:37:42 +02:00
Thomas Basler
05c478d1f2 Added several guards and error messages
Try to prevent heap corruptions
2022-07-14 18:54:53 +02:00
Thomas Basler
e057ed3ed7 Fixed issue that no data in live view where shown
Happend only for inverters which didn't answer any request
2022-07-12 21:21:04 +02:00
Thomas Basler
5bb9acdbc6 Refactored Hoymiles Lib: Move statistics parser into separate class 2022-07-12 18:27:56 +02:00
Thomas Basler
b9bb753906 First try to implement Alarm Log fetching 2022-07-08 18:22:35 +02:00
Thomas Basler
56f764d10f Fixed queue handling and added event log count 2022-07-04 19:36:58 +02:00
Thomas Basler
c4e911cecf Add very simple method differ between requests
The last request is required to use the right parser for the received payload as the package type is not encoded in the received data
2022-06-30 21:14:58 +02:00
Thomas Basler
54b7673f1a Replace magic numbers by some constants 2022-06-30 18:58:55 +02:00
Thomas Basler
96ef182d38 Fixed issue with irradiation calculation
getChannelMaxPower is zero based while the first string is 1 based on getChannelFieldData
2022-06-25 11:13:25 +02:00
Thomas Basler
2de865037c Renamed functions
getValue --> getChannelFieldValue
hasValue --> hasChannelFieldValue
getUnit --> getChannelFieldUnit
getName --> getChannelFieldName
2022-06-24 17:53:37 +02:00
Thomas Basler
92c95c118a Fix issue with uninitialized payload
Gave bad values in web ui when no inverter was reachable
2022-06-22 21:52:34 +02:00
Thomas Basler
f42696d14c Fix change of inverter serial
Because of the inverter type depends on the serial number it's a must to remove and add the inverter of the serial was changed. setSerial doesn't make sense anymore. Move the serial to the constructor
2022-06-22 21:32:37 +02:00
Thomas Basler
746aa087ac Set MaxChannel Power on startup and in webapi 2022-06-22 21:12:45 +02:00
Thomas Basler
e3ded34020 Publish inverter stats only if values are updated 2022-06-15 21:50:49 +02:00
Thomas Basler
5978c0e71f Fixed issue in getValue 2022-06-15 20:16:37 +02:00
Thomas Basler
0d7cef5f60 Fixed issue of wrong detected byteAssignment length 2022-06-15 20:03:23 +02:00
Thomas Basler
9bfe6a9e63 First simple implementation of polling algorithm 2022-06-15 19:23:47 +02:00
Thomas Basler
8842968a22 Fixed name size and added blank function to clear rx buffer 2022-06-05 13:28:50 +02:00
Thomas Basler
0d07e3e09f WIP: Very rough first draft of Hoymiles library 2022-05-30 21:50:08 +02:00