Thomas Basler
6127fbe940
Feature: Added option to set runtime values to zero when inverter becames unreachable
2023-09-02 12:22:22 +02:00
Thomas Basler
2c41be106e
Feature: Allow setting of the Reachable Threshold per inverter
2023-09-01 19:17:12 +02:00
Thomas Basler
b88030f76e
Feature: Re-Request DevInfo if it contains invalid data
...
It can sometimes occour that the DevInfo request returns invalid data. Currently this is identified if the firmware build year is < 2016. In this case the package will be re-requested now.
2023-08-25 11:04:14 +02:00
Thomas Basler
4bf9083b23
Prometheus Endpoint: Publish only relevant amount of digits
...
Implemented method to return the correctly formatted field value as string
2023-08-22 11:45:14 +02:00
Bernhard Roth
6eb3c63288
Fix issue #1256 (HMS-2000-4T reactive power should be signed)
2023-08-21 11:14:24 +02:00
Thomas Basler
188a6cf39d
Replace template by abstract class
2023-08-05 01:01:53 +02:00
Thomas Basler
22d9b128b9
Fix: Move setting of CMD_PENDING state into the right order
2023-08-04 23:44:18 +02:00
Thomas Basler
832df5a80e
Implement the command queue thread safe
...
The queue will be maybe filled from within another thread (mqtt/web) and handled from the main loop
2023-08-03 00:17:32 +02:00
Thomas Basler
be09c4052f
Fix: Ensure that only completly assembled packets are put into the command queue
2023-08-02 22:41:53 +02:00
Thomas Basler
686112e4ee
Fix: Wrong detection of HM-300 inverters
...
Was introduced in v23.8.1; Fixes #1198
2023-08-02 18:41:25 +02:00
Thomas Basler
5bbc67bc49
Fix: Clear parser buffers to prevent random numbers if no data was received
2023-07-31 22:52:38 +02:00
Thomas Basler
ef65094181
Fix: Prevent wrong values of devinfo data because of non-atomic transaction
2023-07-31 22:27:28 +02:00
Thomas Basler
74169c3b17
Fix: Prevent wrong values of systemconfigpara data because of non-atomic transaction
2023-07-31 22:06:04 +02:00
Thomas Basler
698ecbcd53
Fix: Prevent wrong values of alarm data because of non-atomic transaction and fix calculation of getEntryCount()
2023-07-31 22:06:04 +02:00
Thomas Basler
14305a9f12
Fix: Prevent wrong values of statistics data because of non-atomic transaction
2023-07-31 22:05:22 +02:00
Thomas Basler
9821c1905b
Fix: Uninitliazed variable used before first use
2023-07-31 21:44:50 +02:00
Thomas Basler
658a42db80
Apply code formatter without functional changes
2023-07-22 18:00:41 +02:00
Thomas Basler
0ffbba0cf5
Fix: Allow sending of ChannelChangeCommand even if EnableCommands is disabled
...
This is required to successfull move the inverter to another frequency and then polling it. Without this command its not even possible to poll a inverter.
Fixes #1127
2023-07-10 18:30:59 +02:00
jstammi
82038d3e2d
Fix: do not calc sizes multiple times
...
tbnobody/OpenDTU/issues/1022
2023-06-28 19:26:45 +02:00
jstammi
4ae6a2b4ef
Fix: calc expected statistics packet length per parser
...
tbnobody/OpenDTU/issues/1022
2023-06-28 16:53:38 +02:00
Thomas Basler
69aa247470
Added check in statistics data that at least all required bytes are received
...
It can occour for some inverters that incomplete fragments with valid crc but less bytes are received
This was mentioned in #1084
2023-06-27 18:59:54 +02:00
Thomas Basler
184c659197
Added new found HMS-400 to DevInfoParser
...
Fixes #1045
2023-06-19 11:33:06 +02:00
Thomas Basler
64c96c34f4
Revert "Fix: String numbers for HMT inverters are mirrored"
...
This reverts commit 593a33020f .
2023-06-14 21:44:55 +02:00
Thomas Basler
593a33020f
Fix: String numbers for HMT inverters are mirrored
...
Fixes : #1005
2023-06-07 18:05:51 +02:00
Thomas Basler
82b0272ceb
Removed duplicate code by moving it into the radio base class
2023-06-03 12:07:46 +02:00
Thomas Basler
c5a31de5a8
First try to output some dBm info for the NRF module
2023-06-03 11:54:23 +02:00
Thomas Basler
249436a303
Added possible description for alarm code 73
...
https://github.com/tbnobody/OpenDTU/discussions/590#discussioncomment-6049750
2023-05-31 19:23:35 +02:00
Thomas Basler
e0027d951b
Feature: Added new found HMS-900 to DevInfoParser
...
Fixes #967
2023-05-27 11:14:15 +02:00
Thomas Basler
5fea7ee066
Fix: Doublecheck if the MutiDataCommand begins with the correct ID
...
ID is 0x15 | 0x80
2023-05-24 22:06:58 +02:00
Thomas Basler
8f2a2b40b1
Fix: Filter incoming packages from CMT module for the right destination address
...
The CMT module receives every package on it's target frequency. Compared to the NRF module to filtering takes place. Therefor it's required to check if the package destination id is really the id of our dtu
2023-05-24 21:55:15 +02:00
Thomas Basler
fe90c863bf
Fix: Better handling of invalid fragment ids
2023-05-23 19:32:51 +02:00
Thomas Basler
295eeba556
Feature: Added new found HMS-450 to DevInfoParser
...
Fixes #911
2023-05-11 18:26:56 +02:00
Thomas Basler
7be5dd865a
Feature: Added new found HMS-1600 to DevInfoParser
2023-05-09 19:29:23 +02:00
Thomas Basler
99ab78d544
Feature: Added new found HMS-600 to DevInfoParser
2023-05-06 17:49:04 +02:00
Thomas Basler
74abc1ec1d
Feature: Added new found HMS-2000 to DevInfoParser
...
Fix #886
2023-05-06 12:16:05 +02:00
Markus Krause
a56d5adb77
fix SPI assignment across generations
2023-04-28 21:26:22 +02:00
Markus Krause
b086c6ace6
remove non-sensical octa-spi setting in FIFO mode
2023-04-28 21:26:22 +02:00
Markus Krause
a37b394139
try fix SPI driver for CMT
2023-04-28 21:26:22 +02:00
Markus Krause
14f9d1b3c6
avert SPI collision on S3/S2/C3
2023-04-28 21:26:22 +02:00
Thomas Basler
3504884836
Fix: xSemaphoreTake was useless
...
There was no check of the return value implemented therefore xSemaphoreTake was just executed and not locked
2023-04-28 21:02:10 +02:00
Thomas Basler
0441bbbe72
Fix: Queue consumed whole memory on inverter timeout
...
When the poll interval was e.g. 1sec it was possible that the queue ran full and consumed the whole memory.
Now new entries are only added to the queue automatically if the queue is empty. This issue also caused a lot of "DTU command failed" messages.
2023-04-25 19:24:56 +02:00
Thomas Basler
98da2b64e2
Rename FLD_PRA to FLD_Q
2023-04-24 22:29:59 +02:00
Thomas Basler
270a7f4933
Rename UNIT_VA to UNIT_VAR
2023-04-24 22:25:15 +02:00
Thomas Basler
793cd9db91
Fix: Possible crash when multiple tasks accessed the SPI bus
...
This could happen when the main loop and the web server callback accessed the SPI bus at the same time (e.g. to show the isConnected status)
2023-04-22 10:59:32 +02:00
Thomas Basler
f5c15a445b
Move byteAssignment to stack (avoid container) to save heap
2023-04-22 01:12:29 +02:00
Thomas Basler
0e9c666981
Implement method as static
2023-04-21 19:02:10 +02:00
Thomas Basler
5d2656550c
Optimize detection if RF module is configured
...
Use PinMapping method instead of dedicated method in Hoymiles lib --> Same result but reduces variables
2023-04-17 23:19:53 +02:00
Thomas Basler
af3a277e30
Introduced HoymilesRadio property to determine if a configuration attempt was done
2023-04-17 18:59:56 +02:00
Thomas Basler
1416efc6f9
Fix: Endless loop when CMT module was configured but not connected
2023-04-17 18:58:23 +02:00
Thomas Basler
7c37d289c0
Enabled additional statistics data for HMT inverters
...
Not yet shown in web ui and mqtt
2023-04-15 10:55:48 +02:00
Thomas Basler
6856ba9972
Fix: Change defines to get a correct calculation if base frequency of CMT module is different compared to Hoymiles base frequency
2023-04-15 10:55:48 +02:00
Thomas Basler
f3942bb647
Fix: Set correct frequency when changing it via web ui
...
Previously it could happen that the frequency was changed between saving old and recovering new frequency. Therefor an invalid frequency was saved in the CMT module
2023-04-15 10:55:48 +02:00
Thomas Basler
8356db94b9
Send ChannelChangeCommand only once per cycle as the inverter will not response at all
2023-04-15 10:55:48 +02:00
Thomas Basler
ac7b5dba11
Resend and Retransmit count is now implementable per command
2023-04-15 10:55:48 +02:00
Thomas Basler
e2aa29f117
Remove cmtProocess method and move RF logic into the cmt2300wrapper class
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
cfb37906ca
Rename cmtFreqToChan to getChannelFromFrequency and simplify handling of current channel
2023-04-15 10:55:48 +02:00
Thomas Basler
1259f09503
Replace multiple print calls by a single printf in HoymilesRadio_NRF
2023-04-15 10:55:48 +02:00
Thomas Basler
a11ee472c6
Optimize cmtChToFreq method to return float instead of string. Renamed also to getFrequencyFromChannel
2023-04-15 10:55:48 +02:00
Thomas Basler
2a92f67a9a
Implement get and set channel in cmt2300 wrapper class
2023-04-15 10:55:48 +02:00
Thomas Basler
fffd872b20
Replace HOY_BASE_FREQ by CMT_BASE_FREQ
2023-04-15 10:55:48 +02:00
Thomas Basler
5b648b63ac
Implemented blocking write method in CMT2300 driver and use it in sendEsbPacket.
2023-04-15 10:55:48 +02:00
Thomas Basler
6331210b94
IsReachable of the inverter was never reached
2023-04-15 10:55:48 +02:00
Thomas Basler
25722f6055
Adjust buffer size in StatisticsParser for inverters with more inputs
2023-04-15 10:55:48 +02:00
Thomas Basler
50ce7f014d
Expose min and max frequency in HoymilesRadio_CMT
2023-04-15 10:55:48 +02:00
Thomas Basler
6ea34b331d
Increase command timeouts to support inverters with 6 channels and more phases
2023-04-15 10:55:48 +02:00
Thomas Basler
1614b2ad2d
Add newline after log output
2023-04-15 10:55:48 +02:00
Thomas Basler
5e11f0b854
Implement property in HoymilesRadio_CMT to set the frequency during runtime
2023-04-15 10:55:48 +02:00
Thomas Basler
fe5e5bc4b1
Implement cmtBaseChOff860 as a define
2023-04-15 10:55:48 +02:00
Thomas Basler
4561e52735
Adjusted some comments
2023-04-15 10:55:48 +02:00
Thomas Basler
996404ceed
Introduce gpio2 for the CMT2300A module
...
This implements the sending interrupt instead of polling. On the other hand, gpio3 is made optional.
2023-04-15 10:55:48 +02:00
Thomas Basler
bec9870347
Move alarm messages from heap to stack
2023-04-15 10:55:47 +02:00
Thomas Basler
fc5f6887cb
Adjust name from CMT2300a to CMT2300A
2023-04-15 10:55:47 +02:00
Thomas Basler
098691af9d
First step towards a modular CMT2300 driver similar to the NRF24 one
2023-04-15 10:55:47 +02:00
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
Thomas Basler
299ba8f27a
Doc: Resolve Markdown Lint errors
2023-04-06 23:34:35 +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
Thomas Basler
8d8c7f8a71
Fixed typo: Successfull --> Successful
2023-03-23 23:30:55 +01:00
Thomas Basler
70130f47ae
Remove not required register keyword
2023-03-20 18:05:57 +01:00
Luca Kröger
cb40a07489
added support for ESP32S2
2023-03-07 15:39:05 +01:00
Thomas Basler
f423ce0a6b
Fix #644 : Added additional HM-400 to mapping table
2023-02-28 19:42:15 +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
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
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
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
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
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
Thomas Basler
6388be7a9e
Added new Hardware Part Number for HM-800
...
See #363
2022-11-21 17:52:27 +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
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
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
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
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
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