mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 11:16:34 +00:00
Add Sugar Valley NeoPool Controller
This commit is contained in:
parent
ffb169b070
commit
d4c2282170
@ -24,7 +24,7 @@ TasmotaModbus::TasmotaModbus(int receive_pin, int transmit_pin) : TasmotaSerial(
|
||||
mb_address = 0;
|
||||
}
|
||||
|
||||
uint16_t CalculateCRC(uint8_t *frame, uint8_t num)
|
||||
uint16_t TasmotaModbus::CalculateCRC(uint8_t *frame, uint8_t num)
|
||||
{
|
||||
uint16_t crc = 0xFFFF;
|
||||
|
||||
|
@ -32,6 +32,8 @@ class TasmotaModbus : public TasmotaSerial {
|
||||
|
||||
int Begin(long speed = TM_MODBUS_BAUDRATE, int stop_bits = 1);
|
||||
|
||||
uint16_t CalculateCRC(uint8_t *frame, uint8_t num);
|
||||
|
||||
void Send(uint8_t device_address, uint8_t function_code, uint16_t start_address, uint16_t register_count);
|
||||
|
||||
bool ReceiveReady();
|
||||
|
@ -784,6 +784,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "A"
|
||||
|
@ -783,6 +783,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "A"
|
||||
|
@ -784,6 +784,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "A"
|
||||
|
@ -784,6 +784,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "A"
|
||||
|
@ -784,6 +784,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "A"
|
||||
|
@ -784,6 +784,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "A"
|
||||
|
@ -784,6 +784,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "A"
|
||||
|
@ -780,6 +780,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "CarteSD CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "A"
|
||||
|
@ -784,6 +784,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "A"
|
||||
|
@ -784,6 +784,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "A"
|
||||
|
@ -784,6 +784,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "A"
|
||||
|
@ -784,6 +784,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "A"
|
||||
|
@ -784,6 +784,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "A"
|
||||
|
@ -784,6 +784,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "A"
|
||||
|
@ -784,6 +784,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "A"
|
||||
|
@ -784,6 +784,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "A"
|
||||
|
@ -784,6 +784,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "А"
|
||||
|
@ -784,6 +784,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "A"
|
||||
|
@ -784,6 +784,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "A"
|
||||
|
@ -784,6 +784,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "A"
|
||||
|
@ -784,6 +784,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "А"
|
||||
|
@ -784,6 +784,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "A"
|
||||
|
@ -784,6 +784,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "安"
|
||||
|
@ -784,6 +784,9 @@
|
||||
#define D_SENSOR_SDCARD_CS "SDCard CS"
|
||||
#define D_SENSOR_WIEGAND_D0 "Wiegand D0"
|
||||
#define D_SENSOR_WIEGAND_D1 "Wiegand D1"
|
||||
#define D_SENSOR_NEOPOOL_TX "NeoPool Tx"
|
||||
#define D_SENSOR_NEOPOOL_RX "NeoPool Rx"
|
||||
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "安培"
|
||||
|
@ -796,6 +796,9 @@
|
||||
|
||||
//#define USE_PROMETHEUS // Add support for https://prometheus.io/ metrics exporting over HTTP /metrics endpoint
|
||||
|
||||
//#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
|
||||
|
||||
// -- Thermostat control ----------------------------
|
||||
//#define USE_THERMOSTAT // Add support for Thermostat
|
||||
#define THERMOSTAT_CONTROLLER_OUTPUTS 1 // Number of outputs to be controlled independently
|
||||
|
@ -147,6 +147,7 @@ enum UserSelectablePins {
|
||||
GPIO_ADC_PH, // Analog PH Sensor
|
||||
GPIO_BS814_CLK, GPIO_BS814_DAT, // Holtek BS814A2 touch ctrlr
|
||||
GPIO_WIEGAND_D0, GPIO_WIEGAND_D1, // Wiegand Data lines
|
||||
GPIO_NEOPOOL_TX, GPIO_NEOPOOL_RX, // Sugar Valley RS485 interface
|
||||
GPIO_SENSOR_END };
|
||||
|
||||
enum ProgramSelectablePins {
|
||||
@ -314,6 +315,7 @@ const char kSensorNames[] PROGMEM =
|
||||
D_SENSOR_ADC_PH "|"
|
||||
D_SENSOR_BS814_CLK "|" D_SENSOR_BS814_DAT "|"
|
||||
D_SENSOR_WIEGAND_D0 "|" D_SENSOR_WIEGAND_D1 "|"
|
||||
D_SENSOR_NEOPOOL_TX "|" D_SENSOR_NEOPOOL_RX "|"
|
||||
;
|
||||
|
||||
const char kSensorNamesFixed[] PROGMEM =
|
||||
@ -741,6 +743,10 @@ const uint16_t kGpioNiceList[] PROGMEM = {
|
||||
AGPIO(GPIO_WIEGAND_D0), // Date line D0 of Wiegand devices
|
||||
AGPIO(GPIO_WIEGAND_D1), // Date line D1 of Wiegand devices
|
||||
#endif
|
||||
#ifdef USE_NEOPOOL
|
||||
AGPIO(GPIO_NEOPOOL_TX), // Sugar Valley RS485 Interface
|
||||
AGPIO(GPIO_NEOPOOL_RX), // Sugar Valley RS485 Interface
|
||||
#endif
|
||||
|
||||
/*-------------------------------------------------------------------------------------------*\
|
||||
* ESP32 specifics
|
||||
|
1403
tasmota/xsns_83_neopool.ino
Normal file
1403
tasmota/xsns_83_neopool.ino
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user