Rename flowratemeter

This commit is contained in:
Norbert Richter 2022-04-27 16:49:16 +02:00
parent ff3adb9bf0
commit b1933f7c0e
No known key found for this signature in database
GPG Key ID: 6628701A626FA674
35 changed files with 161 additions and 185 deletions

View File

@ -216,7 +216,7 @@ Note: `minimal` variant is not listed as it shouldn't be used outside of the [up
| USE_HRE | - | - / x | - | x | - | - |
| USE_A4988_STEPPER | - | - / - | - | - | - | - |
| USE_NEOPOOL | - | - / - | - | - | - | - |
| USE_FLOWMETER | - | - / - | - | - | - | - |
| USE_FLOWRATEMETER | - | - / - | - | - | - | - |
| | | | | | | |
| Feature or Sensor | l | t | k | s | i | d | Remarks
| USE_DISPLAY | - | - / - | - | - | - | x |

View File

@ -11,7 +11,7 @@ All notable changes to this project will be documented in this file.
- Command ``EnergyExportActive<phase>`` to (p)reset energy export active for supported devices. Currently ADE7880 only (#13515)
- Sonoff SPM delayed SetPowerOnState (#13447)
- Command ``SetOption139 0/1`` to switch between pressure unit "mmHg" (0) or "inHg" (1) when ``SO24 1`` (#15350)
- Support for flow meter
- Support for flowrate meters like YF-DN50 and similary
### Changed

View File

@ -73,7 +73,7 @@ const be_const_member_t lv_gpio_constants[] = {
{ "ETH_PHY_POWER", (int32_t) GPIO_ETH_PHY_POWER },
{ "EXS_ENABLE", (int32_t) GPIO_EXS_ENABLE },
{ "FALLING", FALLING },
{ "FLOWMETER_SIGNAL", (int32_t) GPIO_FLOWMETER_IN },
{ "FLOWRATEMETER_SIGNAL", (int32_t) GPIO_FLOWRATEMETER_IN },
{ "FTC532", (int32_t) GPIO_FTC532 },
{ "GPS_RX", (int32_t) GPIO_GPS_RX },
{ "GPS_TX", (int32_t) GPIO_GPS_TX },

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "A"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Wagwoord geverifieer" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Fout" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowmeter"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "A"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Password verified" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Грешка" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "A"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Password verified" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Error" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "A"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Übereinstimmung" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Fehler" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Durchflussmesser"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "A"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Password verified" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Error" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "A"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Password verified" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Error" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "A"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Clave Correcta" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Error" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "A"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Mot-de-passe vérifié" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Erreur" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "A"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Password verified" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Error" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "A"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Password verified" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Error" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -1056,9 +1056,8 @@
#define D_FP_PASSVERIFY "Jelszó ellenőrizve" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Hiba" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -1056,9 +1056,8 @@
#define D_FP_PASSVERIFY "Password verificata" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Errore" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "A"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Password verified" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Error" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "A"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Wachtwoord herkend" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Fout" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "A"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Zweryfikowano poprawnie" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Błąd" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "A"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Senha verificada" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Erro" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "A"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Password verified" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Error" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "A"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Password verified" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Error" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "А"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Password verified" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Error" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "A"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Password verified" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Error" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "A"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Password verified" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Error" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "A"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Password verified" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Error" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "А"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Password verified" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Error" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "A"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Password verified" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Error" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "A"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Password verified" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Error" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -866,7 +866,7 @@
#define D_GPIO_SHIFT595_SER "74x595 SER"
#define D_SENSOR_CM11_TX "CM110x TX"
#define D_SENSOR_CM11_RX "CM110x RX"
#define D_SENSOR_FLOWMETER "Flowmeter"
#define D_SENSOR_FLOWRATEMETER "Flowrate"
// Units
#define D_UNIT_AMPERE "安培"
@ -1057,9 +1057,8 @@
#define D_FP_PASSVERIFY "Password verified" // 0x21 Verify the fingerprint passed
#define D_FP_UNKNOWNERROR "Error" // Any other error
// xsns_96_flowmeter.ino
#define D_FLOWMETER_NAME "Flowmeter"
#define D_FLOWMETER_RATE "Rate"
// xsns_96_flowratemeter.ino
#define D_FLOWRATEMETER_NAME "Flowrate"
// xsns_83_neopool.ino
#define D_NEOPOOL_MACH_NONE "NeoPool" // Machine names

View File

@ -948,7 +948,7 @@
//#define USE_NEOPOOL // Add support for Sugar Valley NeoPool Controller - also known under brands Hidrolife, Aquascenic, Oxilife, Bionet, Hidroniser, UVScenic, Station, Brilix, Bayrol and Hay (+6k flash, +60 mem)
// #define NEOPOOL_MODBUS_ADDRESS 1 // Any modbus address
//#define FLOWMETER // Add support for water flow meter YF-DN50 and similary (+1k5 code)
//#define FLOWRATEMETER // Add support for water flow meter YF-DN50 and similary (+1k5 code)
// -- Thermostat control ----------------------------
//#define USE_THERMOSTAT // Add support for Thermostat

View File

@ -351,7 +351,7 @@ typedef union {
uint8_t data;
struct {
uint8_t spare0 : 1;
uint8_t flowmeter_unit : 1; // Sensor96 9,x - unit l/min (0) or m³/h (1)
uint8_t flowratemeter_unit : 1; // Sensor96 9,x - unit l/min (0) or m³/h (1)
uint8_t bh1750_2_resolution : 2;
uint8_t bh1750_1_resolution : 2; // Sensor10 1,2,3
uint8_t hx711_json_weight_change : 1; // Sensor34 8,x - Enable JSON message on weight change
@ -782,7 +782,7 @@ typedef struct {
uint8_t free_f61[23]; // F61 - Decrement if adding new Setting variables just above and below
// Only 32 bit boundary variables below
uint16_t flowmeter_calibration[2]; // F78
uint16_t flowratemeter_calibration[2];// F78
int32_t energy_kWhexport_ph[3]; // F7C
uint32_t eth_ipv4_address[5]; // F88
uint32_t energy_kWhtotal; // F9C

View File

@ -806,8 +806,8 @@ void ResponseAppendFeatures(void)
#ifdef USE_IMPROV
feature8 |= 0x04000000; // xdrv_62_improv.ino
#endif
#ifdef USE_FLOWMETER
feature8 |= 0x08000000; // nsns_96_flowmeter.ino
#ifdef USE_FLOWRATEMETER
feature8 |= 0x08000000; // xsns_96_flowratemeter.ino
#endif
// feature8 |= 0x10000000;

View File

@ -187,7 +187,7 @@ enum UserSelectablePins {
GPIO_RESET, // Generic reset
GPIO_MS01, // Sonoff MS01 Moisture Sensor 1wire interface
GPIO_SDIO_CMD, GPIO_SDIO_CLK, GPIO_SDIO_D0, GPIO_SDIO_D1, GPIO_SDIO_D2, GPIO_SDIO_D3, // SD Card SDIO interface, including 1-bit and 4-bit modes
GPIO_FLOWMETER_IN, // Flow Meter Pin
GPIO_FLOWRATEMETER_IN, // Flowrate Meter
GPIO_SENSOR_END };
enum ProgramSelectablePins {
@ -419,14 +419,14 @@ const char kSensorNames[] PROGMEM =
D_SENSOR_SDIO_D1 "|"
D_SENSOR_SDIO_D2 "|"
D_SENSOR_SDIO_D3 "|"
D_SENSOR_FLOWMETER "|"
D_SENSOR_FLOWRATEMETER "|"
;
const char kSensorNamesFixed[] PROGMEM =
D_SENSOR_USER;
#define MAX_MAX31865S 6
#define MAX_FLOWMETER 2
#define MAX_FLOWRATEMETER 2
#define MAX_A4988_MSS 3
#define MAX_WEBCAM_DATA 8
#define MAX_WEBCAM_HSD 3
@ -977,8 +977,8 @@ const uint16_t kGpioNiceList[] PROGMEM = {
AGPIO(GPIO_CM11_RXD), // CM110x Serial interface
#endif
#if defined(USE_FLOWMETER)
AGPIO(GPIO_FLOWMETER_IN) + MAX_FLOWMETER, // Flow meter Pin
#if defined(USE_FLOWRATEMETER)
AGPIO(GPIO_FLOWRATEMETER_IN) + MAX_FLOWRATEMETER, // Flow meter Pin
#endif
/*-------------------------------------------------------------------------------------------*\

View File

@ -1,8 +1,8 @@
/*
xsns_96_flowmeter.ino - flowmeter support for Tasmota
Up to two flowmeter YF-DN50 and similary supported
(f = 1 Hz up to 5 kHz)
Uses the FreqRes resolution
xsns_96_flowratemeter.ino - flowratemeter support for Tasmota
- up to two flowratemeter YF-DN50 and similary
- flow rate frequencies f = 1 Hz up to 5 kHz
- uses the FreqRes resolution
Copyright (C) 2022 Norbert Richter
@ -20,7 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef USE_FLOWMETER
#ifdef USE_FLOWRATEMETER
// The Arduino standard GPIO routines are not enough,
// must use some from the Espressif SDK as well
@ -30,43 +30,45 @@
#define XSNS_96 96
#define FLOWMETER_WEIGHT_AVG_SAMPLE 20 // samples
#define FLOWMETER_MIN_FREQ 1 // Hz
#define FLOWRATEMETER_WEIGHT_AVG_SAMPLE 20 // samples
#define FLOWRATEMETER_MIN_FREQ 1 // Hz
#define D_JSON_FLOWMETER_RATE "Rate"
#define D_JSON_FLOWMETER_VALUE "Value"
#define D_JSON_FLOWMETER_UNIT "Unit"
#define D_JSON_FLOWMETER_VALUE_AVG "average"
#define D_JSON_FLOWMETER_VALUE_RAW "raw"
#define D_JSON_FLOWRATEMETER_RATE "Rate"
#define D_JSON_FLOWRATEMETER_VALUE "Value"
#define D_JSON_FLOWRATEMETER_UNIT "Unit"
#define D_JSON_FLOWRATEMETER_VALUE_AVG "average"
#define D_JSON_FLOWRATEMETER_VALUE_RAW "raw"
#ifdef USE_WEBSERVER
const char HTTP_SNS_FLOWMETER[] PROGMEM =
"{s}" D_FLOWMETER_NAME "-%d " D_FLOWMETER_RATE "{m}%*_f %s{e}"
const char HTTP_SNS_FLOWRATEMETER[] PROGMEM =
"{s}" D_FLOWRATEMETER_NAME "-%d{m}%*_f %s{e}"
;
#endif // USE_WEBSERVER
int32_t flowmeter_period[MAX_FLOWMETER] = {0};
float flowmeter_period_avg[MAX_FLOWMETER] = {0};
uint32_t flowmeter_count[MAX_FLOWMETER] = {0};
volatile uint32_t flowmeter_last_irq[MAX_FLOWMETER] = {0};
int32_t flowratemeter_period[MAX_FLOWRATEMETER] = {0};
float flowratemeter_period_avg[MAX_FLOWRATEMETER] = {0};
uint32_t flowratemeter_count[MAX_FLOWRATEMETER] = {0};
volatile uint32_t flowratemeter_last_irq[MAX_FLOWRATEMETER] = {0};
bool flowmeter_valuesread = false;
bool flowmeter_raw_value = false;
bool flowratemeter_valuesread = false;
bool flowratemeter_raw_value = false;
void IRAM_ATTR FlowMeterIR(uint16_t irq)
{
uint32_t gpio_status = GPIO_REG_READ(GPIO_STATUS_ADDRESS);
uint32_t time = micros();
#if defined(ESP8266)
uint32_t gpio_status = GPIO_REG_READ(GPIO_STATUS_ADDRESS);
GPIO_REG_WRITE(GPIO_STATUS_W1TC_ADDRESS, gpio_status);
if (irq < MAX_FLOWMETER) {
if ((time - flowmeter_last_irq[irq]) < (1000000 / FLOWMETER_MIN_FREQ)) {
flowmeter_period[irq] = time - flowmeter_last_irq[irq];
#endif
if (irq < MAX_FLOWRATEMETER) {
if ((time - flowratemeter_last_irq[irq]) < (1000000 / FLOWRATEMETER_MIN_FREQ)) {
flowratemeter_period[irq] = time - flowratemeter_last_irq[irq];
} else {
flowmeter_period[irq] = 0;
flowratemeter_period[irq] = 0;
}
flowmeter_valuesread = true;
flowmeter_last_irq[irq] = time;
flowratemeter_valuesread = true;
flowratemeter_last_irq[irq] = time;
}
}
// GPIO_STATUS is always 0 (?), so can only determine the IR source using this way
@ -81,61 +83,61 @@ void IRAM_ATTR FlowMeter2IR(void)
void FlowMeterRead(void)
{
for (uint32_t i = 0; i < MAX_FLOWMETER; i++) {
if ((micros() - flowmeter_last_irq[i]) >= (1000000 / FLOWMETER_MIN_FREQ)) {
flowmeter_period[i] = 0;
flowmeter_period_avg[i] = 0;
for (uint32_t i = 0; i < MAX_FLOWRATEMETER; i++) {
if ((micros() - flowratemeter_last_irq[i]) >= (1000000 / FLOWRATEMETER_MIN_FREQ)) {
flowratemeter_period[i] = 0;
flowratemeter_period_avg[i] = 0;
}
// exponentially weighted average
if (flowmeter_count[i] <= FLOWMETER_WEIGHT_AVG_SAMPLE) {
flowmeter_count[i]++;
if (flowratemeter_count[i] <= FLOWRATEMETER_WEIGHT_AVG_SAMPLE) {
flowratemeter_count[i]++;
}
flowmeter_period_avg[i] -= flowmeter_period_avg[i] / flowmeter_count[i];
flowmeter_period_avg[i] += float(flowmeter_period[i]) / flowmeter_count[i];
flowratemeter_period_avg[i] -= flowratemeter_period_avg[i] / flowratemeter_count[i];
flowratemeter_period_avg[i] += float(flowratemeter_period[i]) / flowratemeter_count[i];
}
}
void FlowMeterInit(void)
{
void (* irq_service[MAX_FLOWMETER])(void)= {FlowMeter1IR, FlowMeter2IR};
void (* irq_service[MAX_FLOWRATEMETER])(void)= {FlowMeter1IR, FlowMeter2IR};
flowmeter_valuesread = false;
for (uint32_t i = 0; i < MAX_FLOWMETER; i++) {
pinMode(Pin(GPIO_FLOWMETER_IN, i), INPUT);
attachInterrupt(Pin(GPIO_FLOWMETER_IN, i), irq_service[i], RISING);
flowratemeter_valuesread = false;
for (uint32_t i = 0; i < MAX_FLOWRATEMETER; i++) {
pinMode(Pin(GPIO_FLOWRATEMETER_IN, i), INPUT);
attachInterrupt(Pin(GPIO_FLOWRATEMETER_IN, i), irq_service[i], RISING);
}
}
void FlowMeterShow(bool json)
{
if (json) {
ResponseAppend_P(PSTR(",\"" D_FLOWMETER_NAME "\":{\"" D_JSON_FLOWMETER_RATE "\":["));
ResponseAppend_P(PSTR(",\"" D_FLOWRATEMETER_NAME "\":{\"" D_JSON_FLOWRATEMETER_RATE "\":["));
}
for (uint32_t i = 0; i < MAX_FLOWMETER; i++) {
float flowmeter_rate_avg_float = 0;
for (uint32_t i = 0; i < MAX_FLOWRATEMETER; i++) {
float flowratemeter_rate_avg_float = 0;
if (flowmeter_period[i]) {
flowmeter_rate_avg_float =
((Settings->SensorBits1.flowmeter_unit ? (1000000.0 / 1000.0) : (1000000 / 60.0)) / 2.0)
/ (flowmeter_raw_value ? flowmeter_period[i] : flowmeter_period_avg[i])
* (Settings->flowmeter_calibration[i] ? (float)Settings->flowmeter_calibration[i] : 1000.0);
if (flowratemeter_period[i]) {
flowratemeter_rate_avg_float =
((Settings->SensorBits1.flowratemeter_unit ? (1000000.0 / 1000.0) : (1000000 / 60.0)) / 2.0)
/ (flowratemeter_raw_value ? flowratemeter_period[i] : flowratemeter_period_avg[i])
* (Settings->flowratemeter_calibration[i] ? (float)Settings->flowratemeter_calibration[i] : 1000.0);
}
if (PinUsed(GPIO_FLOWMETER_IN, i)) {
if (PinUsed(GPIO_FLOWRATEMETER_IN, i)) {
if (json) {
ResponseAppend_P(PSTR("%s%*_f"),
i ? PSTR(",") : PSTR(""),
Settings->flag2.frequency_resolution, &flowmeter_rate_avg_float
Settings->flag2.frequency_resolution, &flowratemeter_rate_avg_float
);
#ifdef USE_WEBSERVER
} else {
WSContentSend_PD(HTTP_SNS_FLOWMETER,
WSContentSend_PD(HTTP_SNS_FLOWRATEMETER,
i+1,
Settings->flag2.frequency_resolution, &flowmeter_rate_avg_float,
Settings->SensorBits1.flowmeter_unit ? D_UNIT_CUBICMETER_PER_HOUR : D_UNIT_LITER_PER_MINUTE
Settings->flag2.frequency_resolution, &flowratemeter_rate_avg_float,
Settings->SensorBits1.flowratemeter_unit ? D_UNIT_CUBICMETER_PER_HOUR : D_UNIT_LITER_PER_MINUTE
);
#endif // USE_WEBSERVER
@ -143,11 +145,11 @@ void FlowMeterShow(bool json)
}
}
if (json) {
ResponseAppend_P(PSTR("],\"" D_JSON_FLOWMETER_VALUE "\":\"%s\""),
flowmeter_raw_value ? PSTR(D_JSON_FLOWMETER_VALUE_RAW) : PSTR(D_JSON_FLOWMETER_VALUE_AVG)
ResponseAppend_P(PSTR("],\"" D_JSON_FLOWRATEMETER_VALUE "\":\"%s\""),
flowratemeter_raw_value ? PSTR(D_JSON_FLOWRATEMETER_VALUE_RAW) : PSTR(D_JSON_FLOWRATEMETER_VALUE_AVG)
);
ResponseAppend_P(PSTR(",\"" D_JSON_FLOWMETER_UNIT "\":\"%s\"}"),
Settings->SensorBits1.flowmeter_unit ? D_UNIT_CUBICMETER_PER_HOUR : D_UNIT_LITER_PER_MINUTE
ResponseAppend_P(PSTR(",\"" D_JSON_FLOWRATEMETER_UNIT "\":\"%s\"}"),
Settings->SensorBits1.flowratemeter_unit ? D_UNIT_CUBICMETER_PER_HOUR : D_UNIT_LITER_PER_MINUTE
);
}
}
@ -194,7 +196,7 @@ bool FlowMeterCommand(void) {
switch (XdrvMailbox.payload) {
case 0: // Unit
if (any_value) {
Settings->SensorBits1.flowmeter_unit = value & 1;
Settings->SensorBits1.flowratemeter_unit = value & 1;
ResponseCmndNumber(value & 1);
show_parms = false;
}
@ -202,14 +204,14 @@ bool FlowMeterCommand(void) {
case 1: // Sensor calibration value
case 2:
if (any_value) {
Settings->flowmeter_calibration[XdrvMailbox.payload - 1] = value;
Settings->flowratemeter_calibration[XdrvMailbox.payload - 1] = value;
ResponseCmndNumber(value);
show_parms = false;
}
break;
case 9: // avg/raw values
if (any_value) {
flowmeter_raw_value = value & 1;
flowratemeter_raw_value = value & 1;
ResponseCmndNumber(value & 1);
show_parms = false;
}
@ -218,15 +220,15 @@ bool FlowMeterCommand(void) {
if (show_parms) {
Response_P(PSTR("{\"Sensor%d\":{\"" D_JSON_POWERFACTOR "\":["), XSNS_96);
for (uint32_t i = 0; i < MAX_FLOWMETER; i++) {
float flowmeter_factor = Settings->flowmeter_calibration[i] ? (float)Settings->flowmeter_calibration[i] / 1000 : 1;
ResponseAppend_P(PSTR("%s%3_f"), i ? PSTR(",") : PSTR(""), &flowmeter_factor);
for (uint32_t i = 0; i < MAX_FLOWRATEMETER; i++) {
float flowratemeter_factor = Settings->flowratemeter_calibration[i] ? (float)Settings->flowratemeter_calibration[i] / 1000 : 1;
ResponseAppend_P(PSTR("%s%3_f"), i ? PSTR(",") : PSTR(""), &flowratemeter_factor);
}
ResponseAppend_P(PSTR("],\"" D_JSON_FLOWMETER_VALUE "\":\"%s\""),
flowmeter_raw_value ? PSTR(D_JSON_FLOWMETER_VALUE_RAW) : PSTR(D_JSON_FLOWMETER_VALUE_AVG)
ResponseAppend_P(PSTR("],\"" D_JSON_FLOWRATEMETER_VALUE "\":\"%s\""),
flowratemeter_raw_value ? PSTR(D_JSON_FLOWRATEMETER_VALUE_RAW) : PSTR(D_JSON_FLOWRATEMETER_VALUE_AVG)
);
ResponseAppend_P(PSTR(",\"" D_JSON_FLOWMETER_UNIT "\":\"%s\"}}"),
Settings->SensorBits1.flowmeter_unit ? D_UNIT_CUBICMETER_PER_HOUR : D_UNIT_LITER_PER_MINUTE
ResponseAppend_P(PSTR(",\"" D_JSON_FLOWRATEMETER_UNIT "\":\"%s\"}}"),
Settings->SensorBits1.flowratemeter_unit ? D_UNIT_CUBICMETER_PER_HOUR : D_UNIT_LITER_PER_MINUTE
);
}
@ -241,7 +243,7 @@ bool Xsns96(uint8_t function)
{
bool result = false;
if (PinUsed(GPIO_FLOWMETER_IN, GPIO_ANY)) {
if (PinUsed(GPIO_FLOWRATEMETER_IN, GPIO_ANY)) {
switch (function) {
case FUNC_INIT:
FlowMeterInit();
@ -268,4 +270,4 @@ bool Xsns96(uint8_t function)
return result;
}
#endif // USE_FLOWMETER
#endif // USE_FLOWRATEMETER

View File

@ -299,6 +299,6 @@ BL6523_RX = GPIO_BL6523_RX
ADE7880_IRQ = GPIO_ADE7880_IRQ
RESET = GPIO_RESET
FLOWMETER_SIGNAL = GPIO_FLOWMETER_IN
FLOWRATEMETER_SIGNAL = GPIO_FLOWRATEMETER_IN
SENSOR_END = GPIO_SENSOR_END