Giter VIP home page Giter VIP logo

esp8266-intexsbh20's People

Contributors

drealine avatar elektroarzt avatar jnsbyr avatar piitaya avatar stevengoossensb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp8266-intexsbh20's Issues

error parsing config file: NoMemory

HI,

when i enter mqtt user and password in config file it cannot be read cause of insufficient memory. In console i receive this error: error parsing config file: NoMemory.

Arduino IDE 2.0: Errors on compiling and compiled code enters a fatal exception loop

During compiling the warnings below are flagged.

Compiling completed and can be uploaded to the WEMO D1, but then enters a continuous crash loop.

/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/MQTTPublisher.cpp: In member function 'void MQTTPublisher::loop()':
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/MQTTPublisher.cpp:132:13: warning: comparison of constant '255' with boolean expression is always true [-Wbool-compare]
132 | if (b != SBH20IO::UNDEF::BOOL)
| ~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.h:34,
from /Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/MQTTPublisher.cpp:30:
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/common.h: At global scope:
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/common.h:128:22: warning: 'long unsigned int diff(unsigned int, unsigned int)' defined but not used [-Wunused-function]
128 | static unsigned long diff(unsigned int newVal, unsigned int oldVal)
| ^~~~

/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/ConfigurationFile.cpp: In member function 'bool ConfigurationFile::load(const char*)':
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/ConfigurationFile.cpp:73:31: warning: catching polymorphic type 'class std::runtime_error' by value [-Wcatch-value=]
73 | catch (std::runtime_error re)
| ^~

In file included from /Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/OTAUpdate.cpp:31:
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/common.h:128:22: warning: 'long unsigned int diff(unsigned int, unsigned int)' defined but not used [-Wunused-function]
128 | static unsigned long diff(unsigned int newVal, unsigned int oldVal)
| ^~~~
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/common.h:115:22: warning: 'long unsigned int timeDiff(long unsigned int, long unsigned int)' defined but not used [-Wunused-function]
115 | static unsigned long timeDiff(unsigned long newTime, unsigned long oldTime)
| ^~~~~~~~
In file included from /Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/MQTTClient.cpp:29:
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/common.h:128:22: warning: 'long unsigned int diff(unsigned int, unsigned int)' defined but not used [-Wunused-function]
128 | static unsigned long diff(unsigned int newVal, unsigned int oldVal)
| ^~~~
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp: In member function 'void SBH20IO::setup(LANG)':
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp:203:66: warning: 'static void SBH20IO::clockRisingISR(void*)' is deprecated: Use IRAM_ATTR in place of ICACHE_RAM_ATTR to move functions into IRAM [-Wdeprecated-declarations]
203 | attachInterruptArg(digitalPinToInterrupt(PIN::CLOCK), SBH20IO::clockRisingISR, this, RISING);
| ^~~~~~~~~~~~~~
In file included from /Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp:29:
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.h:281:31: note: declared here
281 | static ICACHE_RAM_ATTR void clockRisingISR(void* arg);
| ^~~~~~~~~~~~~~
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp:203:94: warning: 'static void SBH20IO::clockRisingISR(void*)' is deprecated: Use IRAM_ATTR in place of ICACHE_RAM_ATTR to move functions into IRAM [-Wdeprecated-declarations]
203 | attachInterruptArg(digitalPinToInterrupt(PIN::CLOCK), SBH20IO::clockRisingISR, this, RISING);
| ^
In file included from /Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp:29:
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.h:281:31: note: declared here
281 | static ICACHE_RAM_ATTR void clockRisingISR(void* arg);
| ^~~~~~~~~~~~~~
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp: In static member function 'static void SBH20IO::clockRisingISR(void*)':
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp:576:23: warning: 'static void SBH20IO::decodeDisplay()' is deprecated: Use IRAM_ATTR in place of ICACHE_RAM_ATTR to move functions into IRAM [-Wdeprecated-declarations]
576 | decodeDisplay();
| ^
In file included from /Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp:29:
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.h:282:38: note: declared here
282 | static ICACHE_RAM_ATTR inline void decodeDisplay();
| ^~~~~~~~~~~~~
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp:582:19: warning: 'static void SBH20IO::decodeLED()' is deprecated: Use IRAM_ATTR in place of ICACHE_RAM_ATTR to move functions into IRAM [-Wdeprecated-declarations]
582 | decodeLED();
| ^
In file included from /Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp:29:
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.h:283:38: note: declared here
283 | static ICACHE_RAM_ATTR inline void decodeLED();
| ^~~~~~~~~
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp:588:22: warning: 'static void SBH20IO::decodeButton()' is deprecated: Use IRAM_ATTR in place of ICACHE_RAM_ATTR to move functions into IRAM [-Wdeprecated-declarations]
588 | decodeButton();
| ^
In file included from /Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp:29:
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.h:284:38: note: declared here
284 | static ICACHE_RAM_ATTR inline void decodeButton();
| ^~~~~~~~~~~~
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/esp8266-intexsbh20.ino: In function 'void setup()':
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/esp8266-intexsbh20.ino:128:31: warning: catching polymorphic type 'class std::runtime_error' by value [-Wcatch-value=]
128 | catch (std::runtime_error re)
| ^~
In file included from /Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.h:34,
from /Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/esp8266-intexsbh20.ino:53:
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/common.h: At global scope:
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/common.h:128:22: warning: 'long unsigned int diff(unsigned int, unsigned int)' defined but not used [-Wunused-function]
128 | static unsigned long diff(unsigned int newVal, unsigned int oldVal)
| ^~~~

/Users/jrsouthern/Documents/Arduino/libraries/PubSubClient/src/PubSubClient.cpp: In member function 'boolean PubSubClient::publish_P(const char*, const uint8_t*, unsigned int, boolean)':
/Users/jrsouthern/Documents/Arduino/libraries/PubSubClient/src/PubSubClient.cpp:523:16: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
523 | return (rc == expectedLength);
| ~~~^~~~~~~~~~~~~~~~~

Simplify PCB

To simplify soldering PCB, is it possible to use a board level shifter and the capacitor?
The guy here: https://github.com/RealByron/PicoW-Intex-PureSpa only uses capacitor and commercial level shifter to connect to a Raspberry pico W.
Obviously the board would not be so robust but without termometer, fusible and using commercial board that act as level shifter, things become easier.

I understand this should be possible with Wemos D1

Please confirm if this is possible.

Thanks a million.

How to build without electronic background?

Hello, It's a really good work man, so again congratulations. I've the same spa and I'm really interested in connecting it to my home system.
But electronic is not my speciality. :(

  • How can I build it easily?
  • do you have references of each component used?
  • Do you have more pictures that can help me?

Sorry, too much questions :)

Integrated Webserver

Would it be possible (even if it's not so secure as you stated in the overview) to add a small webserver / frontend to see and set the values for testing or direct adjustment?
I am not so deep into esp or arduino programming but if somebody could do the first steps I could maybe make the frontend more secure and / or functional.
I guess many people would be interested in having the option to use a small web front-end on this device additionally or instead of the mqtt option.
I really appreciate your work so far.
Thank you and best regards maddevil84

Pool topics changes continuously

Hi
First of all thanks for the great job and detailed description.

I have built the PCB following the provided schematics and programmed the ESP8266 using PlatformIO IDE.

Once the board was connected to my SPA, it connected correctly to my WiFi and through MQTT Explorer I was able to see the status topics of the pool. The problem I have is that the topics power, bubble and filter constantly change between on and off and it does not reflect the real state of the SPA. The temperature does show correctly and I have managed to activate the bubbles from my PC after many attempts.

Has this ever happened to you? Do you have any idea what could be the reason why the topics are not received well or that they constantly change?

Thanks in advance

BOM, CPL files and 3D printed housing

Can you export the BOM and CPL from the Pool SB-H20 WiFi MQTT.fzz file and/or add to the repo? I've installed fritzing but cant find an option to export those files.

Need some code explanation

Hi Jens,
I drop you a request after someone told me about your work. Really nice actually !!
I already start the same project but from Jof. I follow the schematics from his GitHub but today it doesn't work

  • MQTT is ok (verified) : Rx and Tx
  • Decoding frames are ok as well
  • Nonetheless button press simulation are not ok at all; and honestly I don't understand the schematics base on SN74HC595 and CD4051.

You solution has the main advantage to perform everything from ESP8266 in sw.

However reading your code I don't understand how it works though :) The main question is how you emulate the "Press Button"
Starting from poolIO.setPowerOn (MTTQ Cmd) for example
pressButton(buttons.togglePower); (Still ok)

How this simple statement ends up to a "Power on button press" ?!?
I see ICACHE_RAM_ATTR inline void SBH20IO::decodeButton() but here I don't get how this works either
If Power On is for instance Off, I assume else if (isrState.frameValue & FRAME_BUTTON::POWER) is false. ... so my interrogation

Would you mind to clarify this point please

Thanks in advance and best regards

Homekit

Hello!

I'm working on a HomeKit version but I've some trouble with tempset command that crash HomeKit part : https://github.com/louis49/esp8266-intexsbh20/tree/homekit. If someone can take a look ;-)
I'm using an adapted version of https://github.com/Mixiaoxiao/Arduino-HomeKit-ESP8266 that rename #define NO_INLINE because of a conflict with ArduinoJson

Waiting to find a solution, I published a homebridge plugin for interested people.

You can find it here : https://www.npmjs.com/package/homebridge-intexsbh20

Have a good day

Wirering

Hallo. Hat jemand einen genauen Anschlussplan? Mich verwirrt das ich jeden Anschluss 2 mal habe (J1 und J2) An J1 schließe ich die Pumpe an? Und an J2 die Steuerung? LG Florian

Hello. Does anyone have a detailed wiring diagram? It confuses me that I have two connections for each connection (J1 and J2) Do I connect the pump to J1? And at J2 the controller? LG Florian

arduino flash ESP error

Hello, when I want to flash the ESP D1, I get the following error message:

C:\Users\XxX\Desktop\esp8266-intexsbh20-1.0.3.3\esp8266-intexsbh20\esp8266-intexsbh20.ino: In function 'void setup()':
esp8266-intexsbh20:145:31: error: exception handling disabled, use -fexceptions to enable
catch (std::runtime_error re)
^
esp8266-intexsbh20:147:22: error: 're' was not declared in this scope
Serial.println(re.what());
^
exit status 1
exception handling disabled, use -fexceptions to enable

Has anyone studied the possibility of connecting a solar panel ?

I discovered that this spa consumes a lot of electricity and I would like to be able to partly heat the water with solar panels by adding them between the SPA and the pump (and thus use the pump through the solar panels).
Some questions :

  • Do you think the pump can hold the style of assembling?
  • Could a solenoid valve be added without consuming too much electricity (on 5v pin) and then allow the temperature to be limited to the maximum temperature of the SPA?
  • Can solar panels allow to go near to the maximum temperature of the SPA? What gain is possible ?

Thank you

Support for Intex SJB-HS

Hello,
I have a intex sjb hs with salt electrolyse + jet streams.
Do you think it is possible to add this functionality?

all the best Peter

Cant bring it to work

have tried to compile aover arduino IDE 1.8 and platform IO
on PIO i bacome an error Tasmota 8266 not avaible

so ich change the platformio.ini
[env:d1_mini]
board = d1_mini
board_build.f_cpu = 160000000L
board_build.filesystem = littlefs
build_flags =
-D PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
-D PIO_FRAMEWORK_ARDUINO_ENABLE_EXCEPTIONS
-D VTABLES_IN_IRAM
platform = https://github.com/platformio/platform-espressif8266.git
platform_packages =
[email protected]
monitor_speed = 74880

it build but didnt work no ip adress in my network and no mqtt messages . the can anybody help me ?

Build error: no matching function for call to MQTTClient::setup

C:\Users\Wemos\Arduino\sketch_may30b\esp8266-intexsbh20\esp8266-intexsbh20.ino: In function 'void setup()':
esp8266-intexsbh20:115:114: error: no matching function for call to 'MQTTClient::setup(const char*, const char [21], const char [11], const char [8])'
115 | mqttClient.setup(config.get(CONFIG_TAG::MQTT_SERVER), CONFIG::POOL_MODEL_NAME, MQTT_TOPIC::STATE, "offline");
| ^
In file included from C:\Users\Wemos\Arduino\sketch_may30b\esp8266-intexsbh20\esp8266-intexsbh20.ino:55:
C:\Users\Wemos\Arduino\sketch_may30b\esp8266-intexsbh20\MQTTClient.h:50:8: note: candidate: 'void MQTTClient::setup(const char*, const char*, const char*, const char*, const char*, const char*)'
50 | void setup(const char* mqttServer, const char* mqttUsername, const char* mqttPassword,const char* clientId, const char* willTopic, const char* willMessage);
| ^~~~~
C:\Users\Wemos\Arduino\sketch_may30b\esp8266-intexsbh20\MQTTClient.h:50:8: note: candidate expects 6 arguments, 4 provided
Using library ArduinoJson at version 6.19.4 in folder: C:\Users\Wemos\Arduino\libraries\ArduinoJson
Using library ESP8266WiFi at version 1.0 in folder: C:\Users\Wemos\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266WiFi
Using library PubSubClient at version 2.8 in folder: C:\Users\Wemos\Arduino\libraries\PubSubClient
Using library LittleFS at version 0.1.0 in folder: C:\Users\Wemos\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\LittleFS
Using library ESP8266httpUpdate at version 1.3 in folder: C:\Users\Wemos\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266httpUpdate
Using library ESP8266HTTPClient at version 1.2 in folder: C:\Users\Wemos\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\libraries\ESP8266HTTPClient
exit status 1
no matching function for call to 'MQTTClient::setup(const char*, const char [21], const char [11], const char [8])'

disable power when enable filters or thermostat - esphome

Hello
I install from https://esphome-intexsbh20.piitaya.fr/en and add to my Home Assistant.


substitutions:
  name: intex-pure-spa-297627
  friendly_name: Intex Pure Spa 297627
packages:
  piitaya.esphome-intex-pure-spa: github://piitaya/esphome-intexsbh20/intex-pure-spa.yaml@main
esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}
api:
  encryption:
    key: **************************************
ota:
  platform: esphome
  password: "******************"
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

Bubble switch and water temperature works ok. When i switch to ON, bubble pomp works good.
When i switch Thermostat, set temperature and heat, power switch go back to OFF. The sound of the pump is heard for a moment.
What is wrong? I built it according to the diagram, I have an independent 5V power supply. There are errors in diagnostics, but I don't know what type and what causes them.

image
image

Regards
Marcin

How to use a different mqtt Port

Hi,

i am trying to use your Project on a Intex SimpleSpa
At first step i want to flash my d1 mini and also get it in iobroker.
my problem is, that i have to use a different port for mqtt, for example 4321.
In you project mqtt is using the standardport which is 1883.
can you describe me how/where i have to change the mqtt-port in you project to use (for example) 4321?
Thanks a lot!

Temperature setting less than 20 degrees

Hello all,

we have now really rocked a lot and I'm just playing with the idea of leaving the hot tub in the winter. So that the part does not always heats to 20 degrees, would it be possible from your point of view, the minimum temperature to trick? eg to 10 degrees

Communicate with arduino

Dear Sir,

Thanks for sharing your project. It is very interesting.

I expose my issue:

My solar inverter closes a relay when reaching some photovoltaic sun irradiance parameters.
I want to turn on the Intex spa heater when that relay is closed to derive photovoltaic power excedents to heat the spa.

My problem is that the inverter is 12 meters away from the spa and I don't have wired cable from one to another.
My first idea was to pair 2 arduino using RF 433 Mhz (one in each side) and modify your code in the arduino that controls the ESP8266 in order to turn on heater when the first arduino detects solar inverter relay closed.

However, I wonder if a simpler solution using MQQT or Home Assistant is possible.

Any help is much apreciated.

Thank you very much in advance
Kind regards from Spain

Desired temperature regressions

Hi,

First, thanks a lot the great work on the project!

While playing with the latest release 1.0.8.0, I've discovered few issues:

  • Desired temperature field is always empty, it seems like blinking detection code is failing.
  • Up/Down buttons aren't being triggered, not by using setDesiredWaterTempCelsius() method, not by calling changeWaterTemp() directly

I'm having MODEL_SB_H20 pool.

Panel buttons not working with Wi-Fi controller plugged in

Hi, I followed the electrical scheme and the device is working fine and I'm able to control everything via MQTT but whenever the controller is plugged to the pool panel, I'm not able to control the pool using phisical buttons anymore.
I noticed that if I disconnect the DATA pin to the panel, it works again. Can you help me? Thanks

Node Red Flow

Hi Jens,
big congrats to you for your excellent work! I got the PCB with a D1 Mini to work and made an integration in HomeKit via Node Red which is beta at the moment. Did you - by chance - also made some Node Red Flows behind your MQTT Broker? If so, I would be very interested in this for my reference.

As I made a PCB out of your schematic (tested design) I also like to share Fritzing and Gerber data if you like to reshare in your repository for free usage in the community. If you are further interested in a ready-to-go PCB, please let me know and I will send you one or two.

Thanks and best regards,
Thomas

ESP Home installation failed.

Hello. When installing on the wemos d1 mini, I keep getting errors. I've attached the log. maybe you can do something with it. Would appreciate any help.
logs_esphome-web-819576_run.txt

ESPHome 2023.5.4
INFO Reading configuration /config/esphome/esphome-web-819576.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing esphome-web-819576 (board: esp01_1m; framework: arduino; platform: platformio/[email protected])

HARDWARE: ESP8266 160MHz, 80KB RAM, 1MB Flash
Dependency Graph
|-- ESPAsyncTCP-esphome @ 1.2.3
|-- ESPAsyncWebServer-esphome @ 2.1.0
| |-- ESPAsyncTCP-esphome @ 1.2.3
| |-- Hash @ 1.0
| |-- ESP8266WiFi @ 1.0
|-- DNSServer @ 1.1.1
|-- ESP8266WiFi @ 1.0
|-- ESP8266mDNS @ 1.2
|-- noise-c @ 0.1.4
| |-- libsodium @ 1.10018.1
Compiling /data/esphome-web-819576/.pioenvs/esphome-web-819576/src/esphome/components/intexsbh20/SBH20IO.cpp.o
Compiling /data/esphome-web-819576/.pioenvs/esphome-web-819576/src/esphome/components/intexsbh20/SBHClimate.cpp.o
src/esphome/components/intexsbh20/SBH20IO.cpp:1:1: error: expected unqualified-id before '.' token
1 | ../../../SBH20IO.cpp
| ^
Compiling /data/esphome-web-819576/.pioenvs/esphome-web-819576/src/esphome/components/intexsbh20/intexsbh20.cpp.o
Compiling /data/esphome-web-819576/.pioenvs/esphome-web-819576/src/esphome/components/md5/md5.cpp.o
*** [/data/esphome-web-819576/.pioenvs/esphome-web-819576/src/esphome/components/intexsbh20/SBH20IO.cpp.o] Error 1
In file included from src/esphome/components/intexsbh20/intexsbh20.h:6,
from src/esphome/components/intexsbh20/intexsbh20.cpp:1:
src/esphome/components/intexsbh20/SBH20IO.h:1:1: error: expected unqualified-id before '.' token
1 | ../../../SBH20IO.h
| ^
In file included from src/esphome/components/intexsbh20/intexsbh20.cpp:2:
src/esphome/components/intexsbh20/SBHSwitch.h:10:77: error: 'IntexSBH20' was not declared in this scope
10 | class SBHSwitch : public esphome::switch_::Switch, public esphome::Parented
| ^~~~~~~~~~
src/esphome/components/intexsbh20/SBHSwitch.h:10:87: error: template argument 1 is invalid
10 | class SBHSwitch : public esphome::switch_::Switch, public esphome::Parented
| ^
src/esphome/components/intexsbh20/SBHSwitch.h: In member function 'virtual void esphome::sbh20::SBHSwitch::write_state(bool)':
src/esphome/components/intexsbh20/SBHSwitch.h:27:4: error: 'get_parent' was not declared in this scope; did you mean 'get_name'?
27 | get_parent()->sbh()->setBubbleOn(state);
| ^~~~~~~~~~
| get_name
src/esphome/components/intexsbh20/SBHSwitch.h:31:4: error: 'get_parent' was not declared in this scope; did you mean 'get_name'?
31 | get_parent()->sbh()->setFilterOn(state);
| ^~~~~~~~~~
| get_name
src/esphome/components/intexsbh20/SBHSwitch.h:35:4: error: 'get_parent' was not declared in this scope; did you mean 'get_name'?
35 | get_parent()->sbh()->setPowerOn(state);
| ^~~~~~~~~~
| get_name
src/esphome/components/intexsbh20/SBHSwitch.h:43:7: error: 'get_parent' was not declared in this scope; did you mean 'get_name'?
43 | if (get_parent()->sbh()->isOnline())
| ^~~~~~~~~~
| get_name
In file included from src/esphome/components/intexsbh20/intexsbh20.h:6,
from src/esphome/components/intexsbh20/SBHClimate.h:4,
from src/esphome/components/intexsbh20/SBHClimate.cpp:1:
src/esphome/components/intexsbh20/SBH20IO.h:1:1: error: expected unqualified-id before '.' token
1 | ../../../SBH20IO.h
| ^
In file included from src/esphome/components/intexsbh20/SBHClimate.cpp:1:
src/esphome/components/intexsbh20/SBHClimate.h:9:95: error: 'IntexSBH20' is not a member of 'esphome::sbh20'
9 | class SBHClimate : public esphome::climate::Climate, public esphome::Parentedesphome::sbh20::IntexSBH20
| ^~~~~~~~~~
src/esphome/components/intexsbh20/SBHClimate.h:9:105: error: template argument 1 is invalid
9 | class SBHClimate : public esphome::climate::Climate, public esphome::Parentedesphome::sbh20::IntexSBH20
| ^
src/esphome/components/intexsbh20/SBHClimate.cpp: In member function 'void esphome::sbh20::SBHClimate::update()':
src/esphome/components/intexsbh20/SBHClimate.cpp:8:2: error: 'SBH20IO' was not declared in this scope
8 | SBH20IO* sbh = get_parent()->sbh();
| ^~~~~~~
src/esphome/components/intexsbh20/SBHClimate.cpp:8:11: error: 'sbh' was not declared in this scope; did you mean 'sbh20'?
8 | SBH20IO* sbh = get_parent()->sbh();
| ^~~
| sbh20
src/esphome/components/intexsbh20/SBHClimate.cpp:8:17: error: 'get_parent' was not declared in this scope; did you mean 'get_name'?
8 | SBH20IO* sbh = get_parent()->sbh();
| ^~~~~~~~~~
| get_name
src/esphome/components/intexsbh20/SBHClimate.cpp:30:44: error: 'SBH20IO' is not a class, namespace, or enumeration
30 | this->target_temperature = (targetTemp != SBH20IO::UNDEF::USHORT) ? targetTemp : SBH20IO::WATER_TEMP::SET_MIN;
| ^~~~~~~
src/esphome/components/intexsbh20/SBHClimate.cpp:30:83: error: 'SBH20IO' is not a class, namespace, or enumeration
30 | this->target_temperature = (targetTemp != SBH20IO::UNDEF::USHORT) ? targetTemp : SBH20IO::WATER_TEMP::SET_MIN;
| ^~~~~~~
src/esphome/components/intexsbh20/SBHClimate.cpp:32:20: error: 'SBH20IO' is not a class, namespace, or enumeration
32 | if (targetTemp == SBH20IO::UNDEF::USHORT)
| ^~~~~~~
src/esphome/components/intexsbh20/SBHClimate.cpp: In member function 'virtual void esphome::sbh20::SBHClimate::control(const esphome::climate::ClimateCall&)':
src/esphome/components/intexsbh20/SBHClimate.cpp:46:3: error: 'get_parent' was not declared in this scope; did you mean 'get_name'?
46 | get_parent()->sbh()->setDesiredWaterTempCelsius(*tt);
| ^~~~~~~~~~
| get_name
src/esphome/components/intexsbh20/SBHClimate.cpp:52:3: error: 'get_parent' was not declared in this scope; did you mean 'get_name'?
52 | get_parent()->sbh()->setHeaterOn(*mode == climate::CLIMATE_MODE_HEAT);
| ^~~~~~~~~~
| get_name
src/esphome/components/intexsbh20/SBHClimate.cpp: In member function 'virtual esphome::climate::ClimateTraits esphome::sbh20::SBHClimate::traits()':
src/esphome/components/intexsbh20/SBHClimate.cpp:60:32: error: 'SBH20IO' has not been declared
60 | rv.set_visual_min_temperature(SBH20IO::WATER_TEMP::SET_MIN);
| ^~~~~~~
src/esphome/components/intexsbh20/SBHClimate.cpp:61:32: error: 'SBH20IO' has not been declared
61 | rv.set_visual_max_temperature(SBH20IO::WATER_TEMP::SET_MAX);
| ^~~~~~~
In file included from src/esphome/components/intexsbh20/intexsbh20.cpp:3:
src/esphome/components/intexsbh20/SBHClimate.h: At global scope:
src/esphome/components/intexsbh20/SBHClimate.h:9:95: error: 'IntexSBH20' is not a member of 'esphome::sbh20'
9 | class SBHClimate : public esphome::climate::Climate, public esphome::Parentedesphome::sbh20::IntexSBH20
| ^~~~~~~~~~
src/esphome/components/intexsbh20/SBHClimate.h:9:105: error: template argument 1 is invalid
9 | class SBHClimate : public esphome::climate::Climate, public esphome::Parentedesphome::sbh20::IntexSBH20
| ^
src/esphome/components/intexsbh20/intexsbh20.cpp:8:6: error: 'IntexSBH20' has not been declared
8 | void IntexSBH20::setup()
| ^~~~~~~~~~
src/esphome/components/intexsbh20/intexsbh20.cpp: In function 'void esphome::sbh20::setup()':
src/esphome/components/intexsbh20/intexsbh20.cpp:10:2: error: 'sbh_' was not declared in this scope
10 | sbh_.setup(LANG::EN);
| ^~~~
src/esphome/components/intexsbh20/intexsbh20.cpp:10:13: error: 'LANG' has not been declared
10 | sbh_.setup(LANG::EN);
| ^~~~
src/esphome/components/intexsbh20/intexsbh20.cpp: At global scope:
src/esphome/components/intexsbh20/intexsbh20.cpp:13:6: error: 'IntexSBH20' has not been declared
13 | void IntexSBH20::loop()
| ^~~~~~~~~~
src/esphome/components/intexsbh20/intexsbh20.cpp: In function 'void esphome::sbh20::loop()':
src/esphome/components/intexsbh20/intexsbh20.cpp:15:2: error: 'sbh_' was not declared in this scope
15 | sbh_.loop();
| ^~~~
src/esphome/components/intexsbh20/intexsbh20.cpp: At global scope:
src/esphome/components/intexsbh20/intexsbh20.cpp:18:6: error: 'IntexSBH20' has not been declared
18 | void IntexSBH20::update()
| ^~~~~~~~~~
src/esphome/components/intexsbh20/intexsbh20.cpp: In function 'void esphome::sbh20::update()':
src/esphome/components/intexsbh20/intexsbh20.cpp:20:7: error: 'sbh_' was not declared in this scope
20 | if (!sbh_.isOnline())
| ^~~~
src/esphome/components/intexsbh20/intexsbh20.cpp:22:3: error: 'status_set_error' was not declared in this scope
22 | status_set_error();
| ^~~~~~~~~~~~~~~~
src/esphome/components/intexsbh20/intexsbh20.cpp:26:6: error: 'status_has_error' was not declared in this scope
26 | if (status_has_error())
| ^~~~~~~~~~~~~~~~
src/esphome/components/intexsbh20/intexsbh20.cpp:27:3: error: 'status_clear_error' was not declared in this scope
27 | status_clear_error();
| ^~~~~~~~~~~~~~~~~~
src/esphome/components/intexsbh20/intexsbh20.cpp:29:19: error: 'sbh_' was not declared in this scope
29 | int errorValue = sbh_.getErrorValue();
| ^~~~
src/esphome/components/intexsbh20/intexsbh20.cpp:32:3: error: 'status_set_warning' was not declared in this scope
32 | status_set_warning();
| ^~~~~~~~~~~~~~~~~~
src/esphome/components/intexsbh20/intexsbh20.cpp:34:7: error: 'error_text_' was not declared in this scope; did you mean 'error_t'?
34 | if (error_text_)
| ^~~~~~~~~~~
| error_t
src/esphome/components/intexsbh20/intexsbh20.cpp:37:11: error: 'status_has_warning' was not declared in this scope
37 | else if (status_has_warning())
| ^~~~~~~~~~~~~~~~~~
src/esphome/components/intexsbh20/intexsbh20.cpp:39:3: error: 'status_clear_warning' was not declared in this scope
39 | status_clear_warning();
| ^~~~~~~~~~~~~~~~~~~~
src/esphome/components/intexsbh20/intexsbh20.cpp:41:7: error: 'error_text_' was not declared in this scope; did you mean 'error_t'?
41 | if (error_text_)
| ^~~~~~~~~~~
| error_t
src/esphome/components/intexsbh20/intexsbh20.cpp:45:6: error: 'switch_bubble_' was not declared in this scope
45 | if (switch_bubble_)
| ^~~~~~~~~~~~~~
src/esphome/components/intexsbh20/intexsbh20.cpp:47:6: error: 'switch_filter_' was not declared in this scope
47 | if (switch_filter_)
| ^~~~~~~~~~~~~~
src/esphome/components/intexsbh20/intexsbh20.cpp:49:6: error: 'switch_power_' was not declared in this scope
49 | if (switch_power_)
| ^~~~~~~~~~~~~
src/esphome/components/intexsbh20/intexsbh20.cpp:52:6: error: 'climate_' was not declared in this scope; did you mean 'climate'?
52 | if (climate_)
| ^~~~~~~~
| climate
*** [/data/esphome-web-819576/.pioenvs/esphome-web-819576/src/esphome/components/intexsbh20/SBHClimate.cpp.o] Error 1
*** [/data/esphome-web-819576/.pioenvs/esphome-web-819576/src/esphome/components/intexsbh20/intexsbh20.cpp.o] Error 1
========================== [FAILED] Took 9.74 seconds ==========================

Change topic name "wifi" to "pool/wifi"

In environments where one MQTT server handles multiple devices it is quite confusing having a topic "wifi" without any information where it belongs to.
So move it under "pool" would be consistent

PCBs available

Hello together:

to everyone who is interested: I just placed an order for some PCBs for this project. If someone is interested I can offer them for 3€ + Shipping.

Sanitizer on SJB

Hi,
I saw that you based on the work of Geoffroy, he managed to integrate the control of the sanitizer.
Is this an option that your amazing system could integrate too ?

Temperature sensor

Hi,

I tried the temperature sensor part and discover 2 things :

  • Accuracy is best when inverting voltage divider bridge (R1-R2)
  • Consider that R1 has a 320k parallel resistance (made by an internal connexion between A0 and GND)

then, when computing temperature :

const int NTC_SAMPLES = 100;
const int NTC_PIN = A0;
const float NTC_BETA = 4300.f; // from https://cdn-reichelt.de/documents/datenblatt/B300/B57164K_ENG_TDS.pdf
const float NTC_VOLTAGE = 3.3f;
const float NTC_NOMINAL_RESISTANCE = 10000.f;
const float NTC_NOMINAL_TEMPERATURE = 25.f;
const float NTC_REF_RESISTANCE = 21600.f;
const float NTC_A0_RESISTANCE = 320000.f;

ADC_MODE(ADC_TOUT)

void setup() {
Serial.begin(115200);
}

void loop() {
float average = 0.0f;
for (uint8_t i=0; i<NTC_SAMPLES; i++) {
  average += analogRead(NTC_PIN);
  delay(10);
}

float V_OUT = average / NTC_SAMPLES;
V_OUT /= 1024;
V_OUT *= NTC_VOLTAGE;

float PAR_EQ = (NTC_REF_RESISTANCE*NTC_A0_RESISTANCE)/(NTC_REF_RESISTANCE+NTC_A0_RESISTANCE);  
float DIV_R2 = (V_OUT/NTC_VOLTAGE) * PAR_EQ/(1 - (V_OUT/NTC_VOLTAGE));

float t_k = 1 / (
  (1.f / (NTC_NOMINAL_TEMPERATURE + 273.15f)) + 
  (1.f / NTC_BETA) *
  (log(DIV_R2 / NTC_NOMINAL_RESISTANCE))
  );
  float t_c = t_k - 273.15f;

LOG_D("V_OUT : %f ; Resistance : %f ; %f ; %f", V_OUT, PAR_EQ, DIV_R2, t_c);
}

Have you observed such a thing?

Just code for comunication with SBH-20

Hello,
I want to use your code to communicate with SUPLA DEVICE.
I don't want mqtt. Can you show me what can I delete in your code and what function i must use to change temp, and on/off button etc. (i just want to leave: common.h; PureSpaIO.cpp; PureSpaIO.h ) - if I leave just this it will be working good??

to on/off filter:
If (virtualbutton==1){ pureSpaIO.setFilterOn(true)}; // Is this correect?

or
to change temperature
int Tzad=36;
pureSpaIO.setDesiredWaterTempCelsius(Tzad); // Is this correct?

or

to read actual temperature
int Tact= pureSpaIO.getActWaterTempCelsius();

or

to read actual state of filter pump
bool Pf;
pF= pureSpaIO.isFilterOn();

please help.

You did a very very hard job !!!
best seba.

MQTT authentication (user/pass)

Good day,

I need mqtt with authentication (user/pass). Where can I put user/pass in code or config.json?
I use iobroker as mqtt server. I would be grateful for help.

2nd question
Is it possible to change the prefix of the mqtt topic at a central point in the code?
So instead of pool/.. pool0/.. and pool1/..
I have 2 Intex pools in the house.
--- German ----
Guten Tag,

ich benötige mqtt mit authentifizuerung (user/pass). Wo kann ich user/pass im Code oder config.json einfügen?
Ich nutze iobroker als mqtt-Server. Ich wäre dankbar für Hilfe.

2.Frage.
Kann man den prefix des mqtt-Topic an Zentraler Stelle im Code ändern?
Also statt pool/.. pool0/.. und pool1/..
Ich habe 2 Intex-Pools im Haus.

Retain MQTT

Add retain option to maintain MQTT value when is using with Home Assistant

Need more information

Hello,
You are doing a great job.

Can you give us the list of components?
Also general diagram of all the architecture because I do not know if your module is in parallel or in series.
Thanks

Feature Request: Adapt to ESP32

Adapting to an ESP32 environment would have the advantage of a multi-core ECU, so the time-critical interfacing part could run on a seperate ECU, while all the WIFI and UI stuff runns on the other.

Wemos d1 mini version

Which version of the wemos d1 mini did you use?
I tried using a v4, but it keeps crashing on boot after I upload the code.

Both de normal D1 mini (clone) board and the D1 R2 & mini crash.
image

MQTT Server/Broker IP

Is ist possible to enter the IP of the MQTT-Server in the config.json?
Or what do I have to change to make it work?

Problem command

Hi,

I've a problem with the program.
I can view state of each function by manually button but i can't send command.
MQTT connection is ok.

How can I debug it ?

no reaction to commands

Hi
I love this project very much, but I don't get it fully working...
Everything works fine except the commands are not executed on the pool. After sending any command, there is no physical reaction of the pool. on MQTT the esp8266 sends an update of the old state.
In the attached example the filter is on and I send the command pool/command/filter off; but the filter stays on and the on the MQTT client we see the state update of the pool with pool/filter on.
Somehow the execution of the pressButton commands has no effect.

image

When I press the button on the pool panel, I get the correct state updates on the MQTT.

I have the SB-H20, WeMos D1 mini as ESP8266. Compiler settings are set as requested (160MHz, 4M, IRAM).

Any idea what could be wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.