Commit Graph

507 Commits

Author SHA1 Message Date
Thomas Basler
035fdbc54a Increase CMT SPI speed to 4 MHz 2023-04-15 10:55:47 +02:00
Thomas Basler
defcc02204 Set CMT to 13dBm and added parameter values in plain text 2023-04-15 10:55:47 +02:00
Thomas Basler
67055276ca Implement different Eventlog messages for HMT inverters
Also make message list much more readable
2023-04-15 10:55:47 +02:00
Thomas Basler
06cc19fc70 Use TimeoutHelper for TX timeout 2023-04-15 10:55:47 +02:00
Thomas Basler
46036eb958 Simplify dumpBuf method in HoymilesRadio 2023-04-15 10:55:47 +02:00
Thomas Basler
83c623708f Fix crash if radio settings where changed while the radio was not initialized 2023-04-15 10:55:47 +02:00
Thomas Basler
de2b7ab2d2 Check that all RF modules as in idle mode before sending mqtt packages 2023-04-15 10:55:47 +02:00
Thomas Basler
b7fb294368 Set DTU serial for CMT modules 2023-04-15 10:55:47 +02:00
Thomas Basler
dc91929d6e First rough implementation of HMT inverters 2023-04-15 10:55:47 +02:00
Thomas Basler
45882543b6 Allow dynamic pin mapping for CMT module 2023-04-15 10:55:47 +02:00
Thomas Basler
3c0d89f599 Replaced println by printf and code style changes 2023-04-15 10:55:47 +02:00
Thomas Basler
a585ffe199 Add variable for max channel count (to extend serveral arrays) 2023-04-15 10:55:47 +02:00
Thomas Basler
90c689a41a Implement HoymilesRadio_CMT 2023-04-15 10:55:47 +02:00
Thomas Basler
8927b8374a Added HMS/HMT devices to the DevInfoParser 2023-04-15 10:55:47 +02:00
Thomas Basler
41e2ba7fcf Move serveral methods from the HoymilesRadio_NRF class to the HoymilesRadio base class 2023-04-15 10:55:47 +02:00
Thomas Basler
8404dd57a7 Add a HoymilesRadio base class
This enables to have multiple radio implementations while the inverter classes just refere to the base class
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
c2e4c5d43e Added first implementation of HMS inverter classes 2023-04-15 10:55:47 +02:00
Thomas Basler
a252d2ac3a Added CMT2300 driver 2023-04-15 10:55:47 +02:00
helgeerbe
1dc73f91ee Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development 2023-04-13 10:18:49 +02:00
MalteSchm
06f6a4da8b fixing mppt string for SmartSolar 150/48 2023-04-11 19:23:49 +02:00
qubeck
00def1d8d1
Generic SML based power meters support (#146)
* add support for energy & power readings on SML based power meters, taking OBIS 16.7.1 for power (using mod. SML Parser lib. by olliiiver)

* switched SML read to use software serial

* made total power meter response controled by meter source to obtain either the sum of phase powers or explicit total power provided by meter

* made mqtt subscriptions to power meter topics meter source dependend

* simplified SML read loop and OBIS handler registration, + minor refactoring

* minor cleanup/style changes and optim. PowerMeter

* fixed build, add SOURCE_SML == 4

* removed optional usage of HW serial for SML power meter

* switched to usage of _powerMeter1Power for SML power reading to allign better with existing code

---------

Co-authored-by: helgeerbe <helge@erbehome.de>
2023-04-07 20:20:00 +02:00
Thomas Basler
299ba8f27a Doc: Resolve Markdown Lint errors 2023-04-06 23:34:35 +02:00
berni2288
09fb0618b4
Merge branch 'MalteSchm-webinterface_summary_updates' into development 2023-04-05 22:27:17 +02:00
Thomas Basler
ca8c9b55ae TimeoutHelper: Allow resetting the last value 2023-04-05 11:54:50 +02:00
Thomas Basler
ca0b8e9afc Remove not required F() macro. Frees ~20kb flash. 2023-04-05 11:54:50 +02:00
Thomas Basler
3e208219b6 Fix #753: Only apply offset if data is in the buffer to prevent negative numbers 2023-04-05 11:51:09 +02:00
Thomas Basler
edaa223856 Fixed typo in comment 2023-04-05 11:51:09 +02:00
MalteSchm
abffc38c11 fixing typos 2023-04-04 21:30:53 +02:00
Thomas Basler
df468086e4 TimeoutHelper: Allow resetting the last value 2023-04-04 18:52:00 +02:00
Thomas Basler
d6028cbd50 Remove not required F() macro. Frees ~20kb flash. 2023-04-04 18:51:18 +02:00
Thomas Basler
d099bc4ff8 Fix #753: Only apply offset if data is in the buffer to prevent negative numbers 2023-03-30 22:11:20 +02:00
Thomas Basler
041249523e Fixed typo in comment 2023-03-28 22:41:27 +02:00
helgeerbe
e0a80734f3 Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development 2023-03-27 21:10:03 +02:00
Thomas Basler
8d8c7f8a71 Fixed typo: Successfull --> Successful 2023-03-23 23:30:55 +01:00
helgeerbe
3f8226c36c Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development 2023-03-23 19:14:14 +01:00
Adminius
05a5b2367b PowerMeter Class + SDM PowerMeter support 2023-03-21 23:46:54 +01:00
Thomas Basler
70130f47ae Remove not required register keyword 2023-03-20 18:05:57 +01:00
helgeerbe
32a96bbd06 change all watt related vars to
int32_t to avoid cast problems with negativ values.
2023-03-16 12:34:14 +01:00
helgeerbe
9214897245 for watt use uint32_t as std type to
avoid cast problems to uint16_t
2023-03-13 11:38:26 +01:00
helgeerbe
43dc10b868 Merge branch 'inverter-settings' into development 2023-03-09 12:43:03 +01:00
helgeerbe
8df2c16cce ensure STATE_DISCOVER if PowerLimter is enabled 2023-03-09 10:22:08 +01:00
helgeerbe
6a89ae986e Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development 2023-03-07 21:17:48 +01:00
Luca Kröger
cb40a07489 added support for ESP32S2 2023-03-07 15:39:05 +01:00
helgeerbe
9f2d79f2dc Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development 2023-03-03 10:53:43 +01:00
Thomas Basler
f423ce0a6b Fix #644: Added additional HM-400 to mapping table 2023-02-28 19:42:15 +01:00
helgeerbe
3b62d5708a Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development 2023-02-27 07:42:46 +01:00
Thomas Basler
27f230e94d Merge branch 'pr634' into dev 2023-02-26 19:49:58 +01:00
Marc-Philip
9f7f7ca49b
fix conjugation 2023-02-26 19:10:13 +01:00
Thomas Basler
612e5f73b7 Fixed compilation issue for esp32-s3 2023-02-23 23:28:34 +01:00
helgeerbe
a2473645a5 Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development 2023-02-23 12:01:34 +01:00
helgeerbe
9e1df83a87 remove map.h include 2023-02-21 22:12:15 +01:00
helgeerbe
1e7f6b8f0f first version 2023-02-21 22:06:47 +01: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
helgeerbe
27f20a76f0 Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development 2023-02-16 12:35:18 +01:00
helgeerbe
dc44cc8e1f create VeDirect.isDataValid() 2023-02-16 12:17:47 +01:00
helgeerbe
a529c91254 Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development 2023-02-14 10:10:10 +01:00
Thomas Basler
8cbae76797 Implement offsets for YieldTotal (#549)
This allows to enter a offset in kWh in the inverter properties which will be applied to the read Yield Total value of the inverter. Using this can set your total production to zero if you e.g. are using a used device.
2023-02-13 20:25:00 +01:00
Thomas Basler
ceaf08c1a0 Hoymiles Lib: Rename ChannelMaxPower to StringMaxPower 2023-02-06 19:56:12 +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
helgeerbe
1c01e927f9 Add victron pins to device manager 2023-02-02 23:01:22 +01:00
helgeerbe
9a7a0d293e Merge remote-tracking branch 'tbnobody/OpenDTU/master' 2023-01-20 14:54:04 +01:00
Thomas Basler
6235342cf2 Fix compile issue with ESP32-C3 MCU 2023-01-18 23:08:01 +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
helgeerbe
e49bbe0faf Merge remote-tracking branch 'tbnobody/OpenDTU/master' 2022-12-27 14:17:24 +01:00
Thomas Basler
43d25dd24a Hoymiles Lib: Change field order and move channel to first position 2022-12-25 12:02:11 +01:00
Thomas Basler
1d650b59ae Hoymiles Lib: Add digits column to byteAssignment table
This allows to specify amount of digits for calculated fields
2022-12-25 12:02:11 +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
5dd4d5b452 Introduce MqttSubscribeParser and moved inverter specific subscribes to MqttHandleInverterClass
This allows individual callback functions for each subscribed topic. Allows easier implementation of further mqtt functions
2022-12-14 20:42:23 +01:00
helgeerbe
df5cde2e82 Merge remote-tracking branch 'tbnobody/OpenDTU/master' 2022-12-05 11:46:31 +01:00
Thomas Basler
0d350b14bb Migrated _rxBuffer from CircularBuffer to queue 2022-11-28 18:25:50 +01:00
Thomas Basler
3c8bd56576 Added MI-1500 with Gen3 Protocol to Hardware Id list 2022-11-28 18:16:46 +01:00
Thomas Basler
36abaeee12 Moved pin assignment outside the hoymiles library
Allows setting the pins during runtime and not  just using the defines
2022-11-27 12:07:25 +01:00
helgeerbe
1fc0e76c41 Merge remote-tracking branch 'tbnobody/OpenDTU/master' 2022-11-22 17:10:53 +01:00
Thomas Basler
6388be7a9e Added new Hardware Part Number for HM-800
See #363
2022-11-21 17:52:27 +01:00
helgeerbe
f35395e76f Merge remote-tracking branch 'tbnobody/OpenDTU/master' 2022-11-16 16:39:01 +01:00
Thomas Basler
2b2afee770 Fix issue that in multi inverter environments some inverters where not fetched
When the radio was busy, the current inverter was just skipped and switched to the next one
2022-11-15 22:30:29 +01:00
Thomas Basler
dd7babb448 Added a timeout of 5ms to detect current time.
This prevents false positives when a interrupt occours during the reading of the time
2022-11-14 20:19:38 +01:00
Thomas Basler
6229e4b5a8 Fixed issue that fetching stopped when inverter was deleted
This happend when due to special timing the last inverter was deleted. In that case interverPos was never changed and the fetching process stucked
2022-11-14 20:00:16 +01:00
Thomas Basler
0d619e780a Prevent null pointer exception
It could occur that the command queue contained commands for inverters which are already deleted.
Therefor it has to be checked that getInverterBySerial returns a valid inverter
2022-11-10 18:32:28 +01:00
Thomas Basler
26b9bbf537 Prevent null pointer exception when deleting inverter
The removeInverterBySerial can be called in a webserver callback method.
This is maybe executed on another core which can then run in parallel to the radio loop hoymiles loop.
Accessing inverters which are already removed can lead to exceptions.
The Semaphore prevents that parallel execution
2022-11-10 18:26:01 +01:00
helgeerbe
b3295f5f33 Merge remote-tracking branch 'tbnobody/OpenDTU/master' 2022-11-03 09:27:56 +01:00
helgeerbe
6b4129c400 Merge remote-tracking branch 'tbnobody/OpenDTU/master' 2022-10-31 14:37:44 +01:00
Thomas Basler
547fe41ab1 Add missing parser class to documentation 2022-10-31 14:14:01 +01:00
Thomas Basler
4049f6bdb7 Implemented method to get the amount of relevant digits 2022-10-31 11:51:08 +01:00
Thomas Basler
27ed4e3cda BREAKING: Change power factor from percent value to value between 0 and 1
If you write these values to a database you have to update them.
2022-10-31 10:50:31 +01:00
Thomas Basler
f2a08ba503 Rename FLD_PCT to FLD_PF and assign UNIT_NONE 2022-10-31 00:43:07 +01:00
Thomas Basler
f741fea333 Move serial number formatting to inverter class 2022-10-29 11:22:56 +02:00
Thomas Basler
f21dd351ef Optimize performance by removing not required string constructors 2022-10-29 11:22:56 +02:00
helgeerbe
a9336968c7 Merge remote-tracking branch 'tbnobody/OpenDTU/master' 2022-10-20 23:39:05 +02:00
Thomas Basler
9f4d8bdddb Better limit description 2022-10-20 19:34:10 +02:00
Thomas Basler
3ab7d9f6fe Fix #246: Allow negative float values
This is required for the temperature field which can be negative as well
2022-10-20 18:18:36 +02:00
Thomas Basler
678f165350 Fix warning: missing initializer for member 2022-10-19 22:16:29 +02:00
Thomas Basler
1dd6e9c453 Check 4th byte on DevInfoSimple to get max_power
This is required to detect models with fixed power limits
2022-10-19 22:16:18 +02:00
Thomas Basler
d224db4d1d Fixed warning: type qualifiers ignored on function return type 2022-10-18 21:42:03 +02:00
helgeerbe
d5740e4851 clear tmp ve.direct buffer on checksum error 2022-10-17 14:58:33 +02:00
helgeerbe
5de35ee353 Merge remote-tracking branch 'tbnobody/OpenDTU/master' 2022-10-17 10:10:34 +02:00
Thomas Basler
e762abd18f Show RF chip type in SystemInfoView 2022-10-12 00:17:40 +02:00
Thomas Basler
0a577f8002 Allow a maximum limit of 100 if limit type is relative 2022-10-11 23:28:22 +02:00
Thomas Basler
4c65be8c55 Add comma values to inverter limit 2022-10-11 23:04:43 +02:00
helgeerbe
3febc28c78 Merge remote-tracking branch
'tbnobody/OpenDTU/master'
2022-10-10 11:08:36 +02:00
Thomas Basler
da0998c809 Implement inverter restart by mqtt topic 2022-10-09 13:16:06 +02:00
Thomas Basler
753ab1312e DevInfoParser: Dont create string object twice 2022-10-08 18:15:06 +02:00
Thomas Basler
05d9ce4590 Output channel for RX messages 2022-10-08 18:14:43 +02:00
Thomas Basler
223b7ff3ce Adjusted serial parsing to detect model
There are some MI-1500 models which are compatible with the Gen3 protocol.
The adjustment takes this into account.
2022-10-08 18:03:56 +02:00
Thomas Basler
1cbff8afca Added HM-350 to list of known devices 2022-10-08 10:58:59 +02:00
Thomas Basler
b5cb24a46d Fix AlarmDataCommand timeout for 15 entries 2022-10-08 02:34:54 +02:00
helgeerbe
366e7dc409 Merge remote-tracking branch
'tbnobody/OpenDTU/master'
2022-10-07 10:32:51 +02:00
Thomas Basler
fbd58554b9 Show HW Version as decimal instead of hex 2022-10-06 23:29:18 +02:00
Thomas Basler
20b799b630 webapp: Show NRF24 connection status 2022-10-06 23:29:17 +02:00
Thomas Basler
64ae87faf1 Define several methods as private 2022-10-06 23:29:15 +02:00
Thomas Basler
e1690e8f74 Apply limit instantaneously if inverter info is available 2022-10-06 23:29:05 +02:00
Thomas Basler
b02d36d042 Added IDs to identifiy inverters to DevInfoParser 2022-10-06 18:34:31 +02:00
Thomas Basler
373e1e5e8f Fixed function not used warning 2022-10-05 18:51:21 +02:00
Thomas Basler
7cede84785 Fixed uninitialized variable warning 2022-10-05 18:42:41 +02:00
Thomas Basler
d021d7529f Fix parentheses error in AlarmLogParser 2022-10-04 23:38:32 +02:00
Thomas Basler
4031b71d7d Implemented resend of PowerCommand 2022-10-04 18:12:55 +02:00
Thomas Basler
0fd714b165 Implemented first few classes for power control
TurnOn and TurnOff
2022-10-04 18:12:55 +02:00
helgeerbe
ba3183e10b Clear map for recieved key, value pairs 2022-10-04 11:34:30 +02:00
Thomas Basler
66453b0854 Return correct formatted HwVersion 2022-10-03 13:58:50 +02:00
helgeerbe
df7c821bd4 Merge remote-tracking branch 'tbnobody/OpenDTU/master' 2022-10-03 13:34:05 +02:00
Thomas Basler
6cbcfacac6 Renamed several methods from Sample to Simple 2022-10-03 13:14:31 +02:00
Thomas Basler
b2a30621db Extended and updated event log texts 2022-10-02 23:52:35 +02:00
Thomas Basler
eef6c37de9 Beautify serial output of package log 2022-10-02 18:43:19 +02:00
Thomas Basler
18ec145dda Added command names to serial output 2022-10-02 17:17:34 +02:00
Thomas Basler
c8c6b2a978 Renamed DevInfoSample to DevInfoSimple 2022-10-02 17:01:46 +02:00
Thomas Basler
a3d9c6ae0f Fixed array size of 1 channel inverters 2022-10-02 16:04:02 +02:00
Thomas Basler
67e0d0274d Code cleanup: Remove not required comments 2022-10-02 15:44:33 +02:00
Thomas Basler
1aef350c2e Remove not required method isA() 2022-10-02 15:43:11 +02:00
Thomas Basler
2a71be06ab Fix cpplint: Adjust syntax of todo comment 2022-10-02 12:34:25 +02:00
Thomas Basler
989026d049 Fix cpplint: make one argument constructor explicit 2022-10-02 12:33:23 +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
754913368a Implemented way to periodically fetch the current limit from the inverter
The fetch is only executed at least 4 minutes after the last set command.
Otherwise it would generate a entry in the event log (ID 2)
2022-09-30 18:34:30 +02:00
Thomas Basler
3153ee4993 Implemented getTimeout method in AlarmDataCommand 2022-09-30 18:34:30 +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
a8ee8afb17 Set correct timeout for DevControlCommand 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
2376da1722 Create function to set ActivePower on inverter level 2022-09-30 18:34:30 +02:00
Thomas Basler
73e2aaf8fe Implemented setting/getting of limit/type for ActivePowerControl 2022-09-30 18:34:30 +02:00
Thomas Basler
d998271944 Implemented crc16 calculation for DevControlCommand 2022-09-30 18:34:30 +02:00
Thomas Basler
cfdbf5963c Empty classes of ActivePowerControl 2022-09-30 18:34:30 +02:00
helgeerbe
6587282ac2 Fix typo in victron error message 2022-09-30 10:40:41 +02:00
Thomas Basler
8e2aa8981f Fix #170: Update byte assignment for statistics data 2022-09-28 18:44:59 +02:00
helgeerbe
4b02426ab2 Merge remote-tracking branch 'tbnobody/OpenDTU/master' 2022-09-26 09:38:14 +02:00
Thomas Basler
b8f03eddfd Fixed scheduler issue
When the RF method took very long inverters where skipped
2022-09-25 17:28:50 +02:00
Thomas Basler
68fc0c2547 Extend memory to fetch all eventlog entries 2022-09-25 17:26:48 +02:00
Thomas Basler
53692bae34 Fix timeout for alarm messages 2022-09-23 19:13:08 +02:00
helgeerbe
3843a46de9 Merge remote-tracking branch 'tbnobody/OpenDTU/master' 2022-09-22 09:36:36 +02:00
Thomas Basler
950b211fd5 Set getLocalTime timeout to 0 to prevent watchdog triggers
This happens especially when no WiFi is configured and the user enters the NTP info page
2022-09-19 20:45:44 +02:00
helgeerbe
bee600bfd8 Merge remote-tracking branch 'tbnobody/OpenDTU/master' 2022-09-19 10:49:41 +02:00
Thomas Basler
9cda41f5e9 Use uint32_t, rather than the C type long 2022-09-15 19:00:38 +02:00
Thomas Basler
c07b18a9d8 Use static_cast<float>(...) instead C-style cast 2022-09-15 18:53:41 +02:00
Thomas Basler
c43346134d Use static_cast<int>(...) instead C-style cast 2022-09-15 18:48:22 +02:00
Thomas Basler
088ba58827 Mark Single-parameter constructors explicit 2022-09-13 22:50:33 +02:00
Thomas Basler
de33b9ff88 Do not use namespace using-directives. Use using-declarations instead. 2022-09-13 21:35:51 +02:00
Thomas Basler
abcabf7fb6 Added header guard 2022-09-13 21:11:32 +02:00
Thomas Basler
b0460c7f14 Add documentation of current class hierarchy 2022-09-09 20:53:15 +02:00
Thomas Basler
b7961024a1 Fetch limit every 10 minutes 2022-09-09 20:17:52 +02:00
Thomas Basler
3e5fb00248 Fetch inverter limit at least once 2022-09-09 18:41:54 +02:00
Thomas Basler
c28a532bf1 Added base classes for SystemConfigPara 2022-09-09 18:41:07 +02:00
Thomas Basler
185fea987d Added some initializations to prevent missunderstandings and errors 2022-09-05 21:53:50 +02:00
Thomas Basler
31e56f6c2b Code hardening: introduce const keyword 2022-09-05 21:41:45 +02:00
helgeerbe
3e4e1bcea4 Merge remote-tracking branch 'tbnobody/OpenDTU/master' 2022-08-24 15:59:21 +02:00
Thomas Basler
26268479fb Fix #96 and #95 : Reworked handling of inverter editing 2022-08-24 02:53:34 +02:00
helgeerbe
48e5b567cb frame handler with string and map 2022-08-20 17:06:56 +02:00
helgeerbe
7140574c37 sk 2022-08-19 15:53:18 +02:00
helgeerbe
b8ffa37e97 end poll latest at 500ms 2022-08-17 20:25:46 +02:00
helgeerbe
17abb57ed6 Stop polling after one successful frame read 2022-08-17 18:39:22 +02:00
helgeerbe
0d08c6a136 Check poll intervall 2022-08-17 13:40:38 +02:00
helgeerbe
865c9cdac5 Merge branch 'master' into ve.direct 2022-08-17 12:25:07 +02:00
helgeerbe
25094ae5b6 last update is now set after poll full frame 2022-08-17 12:15:12 +02:00
Thomas Basler
1456974616 Fix #76: Null Pointer exception when adding a inverter with unkonwn serial number 2022-08-16 19:47:51 +02:00
helgeerbe
d9bf0ab2e9 ve.direct:
- add poll rate
- add data_age and age_critical to rest api
2022-08-16 16:26:08 +02:00
helgeerbe
72c0e8579a ve.direct rest api 2022-08-16 14:02:19 +02:00
helgeerbe
2ff8f84387 loop für ve.direct 2022-08-15 10:56:37 +02:00
helgeerbe
c7c1506e42 First version 2022-08-11 17:26:00 +02:00
Thomas Basler
991838ae2c Added reactive power output and display 2022-08-10 20:40:26 +02:00
Thomas Basler
528c56eaa6 Added parser and commands for hardware version and part nr 2022-08-10 20:12:52 +02:00
Thomas Basler
c3a043b1ce Improve handling of firmware data fetch 2022-08-10 19:03:02 +02:00
Thomas Basler
f566a8c522 Implemented parser methods and publish to mqtt 2022-08-10 19:03:02 +02:00
Thomas Basler
ee339fa9bd Use Parser class in Statistics and Alarm parser 2022-08-10 19:03:02 +02:00
Thomas Basler
8715320282 Implemented DevInfo command 2022-08-10 19:03:02 +02:00
Thomas Basler
ef5d549f8a Fix exception when deleting a inverter 2022-08-09 21:46:40 +02:00
Thomas Basler
6c088a9898 Implemented channel hopping on TX frequencies
Every sent package changes the frequency
2022-08-04 20:10:44 +02:00
Thomas Basler
4ff6433b90 Added first empty classes for DevControl and ParaSet 2022-08-03 20:36:35 +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
3abc7d7e3d Increase max receiveable packages to 12
* Required for large eventlogs
2022-08-03 19:21:52 +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
a73707380f RequestFrameCommand can now be configured individually for each command
If the return value equals nullptr, a retransmit is not performed
2022-08-02 21:14:41 +02:00
Thomas Basler
c35f12c7be Fixed CRC calculation 2022-07-30 12:50:07 +02:00
Thomas Basler
0d26337575 Fixed retransmit count 2022-07-30 11:59:01 +02:00
Thomas Basler
442b27e859 Fixed assignment of router and target address 2022-07-30 11:10:04 +02:00
Thomas Basler
4413b603e3 Replace inverter_transaction with new command classes 2022-07-30 00:37:54 +02:00
Thomas Basler
4daa121663 Added several classes to encapsulate the packet generation 2022-07-29 23:31:28 +02:00
Thomas Basler
b2e41a1cfd Fix #37: Typo in statistics name (will lead to incompatible mqtt topic) 2022-07-24 12:38:00 +02:00
Thomas Basler
0fed0ba614 Update AlarmLogParser
* Show times > 12:00:00
* Fixed parsing of StartTime
2022-07-19 21:17:15 +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
4373ee651f Added YieldTotal and YieldDaily to 1 channel inverters to CH0 2022-07-15 18:49:17 +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
4259df9ee6 Hoymiles Lib: Allow configuration of all pins 2022-07-12 18:42:52 +02:00
Thomas Basler
5bb9acdbc6 Refactored Hoymiles Lib: Move statistics parser into separate class 2022-07-12 18:27:56 +02:00
Thomas Basler
d9ecb64a4d Only add timezone offset if value > 0 2022-07-08 18:22:35 +02:00
Thomas Basler
f7eb54fa41 First version of webapi for event log 2022-07-08 18:22:35 +02:00
Thomas Basler
b9bb753906 First try to implement Alarm Log fetching 2022-07-08 18:22:35 +02:00
Thomas Basler
4f2d705314 Added possibility to override pin assignments 2022-07-08 18:20:36 +02:00
Thomas Basler
dfdf8d9054 Added event log count to 1 channel invterers 2022-07-08 18:08:56 +02:00
Thomas Basler
56f764d10f Fixed queue handling and added event log count 2022-07-04 19:36:58 +02:00
Thomas Basler
0f75c4a6a4 Introduced some pin defines 2022-07-02 11:58:31 +02:00
Thomas Basler
839720ee8a Fix compilation warning
warning: backslash-newline at end of file
2022-07-01 17:46:51 +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
b2271373a4 Print inverter serial as hex 2022-06-30 21:06:23 +02:00
Thomas Basler
54b7673f1a Replace magic numbers by some constants 2022-06-30 18:58:55 +02:00
Thomas Basler
e9e5c715f5 Remove duplicated variable
The content of _activeSerial is also available in currentTransaction.target
2022-06-27 21:56:55 +02:00
Thomas Basler
65fb13fa41 Better detection of invalid dates (no NTP sync) 2022-06-27 21:06:54 +02:00
Thomas Basler
10de26bcb8 Better handling of rerequest of complete packets 2022-06-27 19:37:03 +02:00
Thomas Basler
ab6261da92 Move the whole stats request into the inverter class
This enables in future releases so send multiple requests for e.g. MI inverters
2022-06-27 19:26:16 +02:00
Thomas Basler
7a0394151a First implementation of TX queue
This is required to implement some features of e.g. MI Inverters or to read the event log of HM inverters
2022-06-27 19:09:52 +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
bce3fc78e8 Renamed field names which are used for mqtt and web ui 2022-06-24 18:03:44 +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
db0a3da803 Generate a second class abstraction to support different inverter types in future 2022-06-24 17:49:14 +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
8d2b71cd04 Implemented resend of whole requests 2022-06-20 20:47:21 +02:00
Thomas Basler
5221c80d36 Added channel 40 to RX channel list 2022-06-19 12:53:33 +02:00
Thomas Basler
865d00d3d0 Code cleanup 2022-06-18 12:26:37 +02:00
Thomas Basler
52b5cdbdb6 Remove not required include 2022-06-16 14:34:21 +02:00
Thomas Basler
583bc7f366 Don't disable interrupts
Not needed as the flow is more less independent
2022-06-16 14:10:14 +02:00
Thomas Basler
1ea2990fe9 Remove not supported field 2022-06-16 01:18:39 +02:00
Thomas Basler
bab5beb170 Move strings from RAM to Flash 2022-06-15 22:21:50 +02:00
Thomas Basler
c9e603b2de Replace EVERY_N_SECONDS with millis
EVERY_N_SECONDS is not updated without a reboot of the controller
2022-06-15 22:15:02 +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
37dbb343a9 Added additional inverter definitions 2022-06-14 21:02:51 +02:00
Thomas Basler
effd983e6d Added class to handle timeouts 2022-06-08 23:04:45 +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
ded6dc5977 Fixed hex vs dec in inv dectection 2022-06-05 13:10:25 +02:00
Thomas Basler
d9d6c3b27d Find inverter on fragment receive 2022-05-31 19:37:28 +02:00
Thomas Basler
0d9b994c92 Added function t retrieve a inverter just by a given payload fragment 2022-05-31 19:29:05 +02:00
Thomas Basler
87da5ef63d Renamed packet_t to fragment_t and implemented fragment crc check 2022-05-31 18:53:45 +02:00
Thomas Basler
0d07e3e09f WIP: Very rough first draft of Hoymiles library 2022-05-30 21:50:08 +02:00
Thomas Basler
6943782726 Added library to manage a circular buffer 2022-05-25 22:25:40 +02:00
Thomas Basler
6cd0531f4a Added library to execude code every x time 2022-05-25 22:24:11 +02:00
Thomas Basler
d139c3d9e5 Lib Hoymiles: Added required CRC functions 2022-05-24 23:02:26 +02:00
Thomas Basler
6c994f3cf6 Lib Hoymiles: First basic files 2022-05-24 23:01:52 +02:00
Thomas Basler
8fcaf8b1ca Added library to get the mcu reset reason 2022-04-14 11:30:27 +02:00
Thomas Basler
54dc566473 Initial commit 2022-04-09 11:05:14 +02:00