cvonk / opnpool Goto Github PK
View Code? Open in Web Editor NEWIntegrates the functionality of a Pentair pool controller into the smart home using ESP32 SoC.
License: GNU General Public License v3.0
Integrates the functionality of a Pentair pool controller into the smart home using ESP32 SoC.
License: GNU General Public License v3.0
When using hardcoded wifi credentials, I noticed an issue where the config object goes out of scope, but a pointer to the config is still passed to wifi_connect_start()
.
Here is a potential fix:
/*
* Connect to WiFi accesspoint.
* Register callbacks when connected or disconnected.
*/
static void
_connect2wifi_and_start_httpd(ipc_t * const ipc)
{
static wifi_connect_priv_t priv = {};
priv.ipc = ipc;
wifi_connect_config_t wifi_connect_config = {
.onConnect = _wifi_connect_cb,
.onDisconnect = _wifi_disconnect_cb,
.priv = &priv,
};
ESP_ERROR_CHECK(wifi_connect_init(&wifi_connect_config));
esp_err_t err = NULL;
#ifdef CONFIG_OPNPOOL_HARDCODED_WIFI_CREDENTIALS
if (strlen(CONFIG_OPNPOOL_HARDCODED_WIFI_SSID)) {
ESP_LOGW(TAG, "Using SSID from Kconfig");
wifi_config_t wifi_config = {
.sta = {
.ssid = CONFIG_OPNPOOL_HARDCODED_WIFI_SSID,
.password = CONFIG_OPNPOOL_HARDCODED_WIFI_PASSWD,
}
};
err = wifi_connect_start(&wifi_config);
} else
#endif
{
ESP_LOGW(TAG, "Using SSID from nvram");
err = wifi_connect_start(NULL);
}
if (err == ESP_ERR_WIFI_SSID) {
ESP_LOGE(TAG, "Wi-Fi SSID/passwd not provisioned");
_delete_task();
}
ESP_ERROR_CHECK(err);
}
Hi Coert,
Thanks for the project. I have built one of the boards and flashed your standard code. I then used the apk to install OPNpool on a Samsung S9.
When I attempt to provision by pressing Continue after Selecting Provision Device from the upper right menu the screen flashes up a very brief message and then returns to the blank page with the Continue button.
I used a slow-mo video recording to see what the text said:
To provision your device please make sure that your Phone's Bluetooth is turned on and within range of your new device.
Scanning for OPNpool devices
Attached is the console output from the LOLIND32 and a very short video of the S9.
Any help would be greatly appreciated.
Regards
Nick Shew
Hi, just curious, is it possible to use OPNpool with only the Intelliflo VS pump?
Due to massive changes in the ESP-IDF starting with version 5.0, I'm not able to compile. I attempted to install an older version of the extension, but that caused further issues (incorrect dependency versions, install of v4.4 and it's tools crashes during the python install step and cannot be used).
subprocess.CalledProcessError: Command '['D:\\espressif\\bin\\tools\\idf-python\\3.11.2\\python.exe', '-m', 'virtualenv', '--python', 'D:\\espressif\\bin\\tools\\idf-python\\3.11.2\\python.exe', '--seeder', 'pip', 'D:\\espressif\\bin\\python_env\\idf4.4_py3.11_env']' returned non-zero exit status 1.
ESP-IDF now requires components to be specified in the CMakeLists.txt file in order to use them properly. I've added all the ones I could tell it was pulling from, but I'm still not able to compile. I'm left with the following pair of compile issues:
In file included from C:/esp/esp-idf/components/vfs/vfs_uart.c:18: D:/GitHub/OPNpool/factory/components/driver/uart/include/driver/uart.h:52:3: error: conflicting types for 'uart_config_t'; have 'struct <anonymous>' 52 | } uart_config_t;
In file included from D:/GitHub/OPNpool/factory/components/driver/uart/include/driver/uart.h:21: C:/esp/esp-idf/components/hal/include/hal/uart_types.h:128:3: note: previous declaration of 'uart_config_t' with type 'uart_config_t' 128 | } uart_config_t;
In file included from C:/esp/esp-idf/components/esp_hw_support/sleep_modes.c:41: D:/GitHub/OPNpool/factory/components/driver/uart/include/driver/uart.h:52:3: error: conflicting types for 'uart_config_t'; have 'struct <anonymous>' 52 | } uart_config_t;
In file included from D:/GitHub/OPNpool/factory/components/driver/uart/include/driver/uart.h:21: C:/Users/necro/esp/esp-idf/components/hal/include/hal/uart_types.h:128:3: note: previous declaration of 'uart_config_t' with type 'uart_config_t' 128 | } uart_config_t;
and
C:/esp/esp-idf/components/esp_hw_support/sleep_modes.c:1512:21: error: 'UART_NUM_0' undeclared (first use in this function) 1512 | if (uart_num == UART_NUM_0)
C:/esp/esp-idf/components/esp_hw_support/sleep_modes.c:1514:28: error: 'UART_NUM_1' undeclared (first use in this function) 1514 | } else if (uart_num == UART_NUM_1)
CMakeLists.txt
I've attached the modified CMakeLists.txt let me know if there's some other component I'm still missing here.
Please update the files and instructions to reflect the changes in the toolpath.
Running clone through HTTPS: git clone --recursive https://github.com/cvonk/OPNpool.git
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of '[email protected]:cvonk/OPNpool_provisioning.git' into submodule path 'C:/Users/justl/Documents/Projects/OPNpool/android' failed
Failed to clone 'android' a second time, aborting
Running clone through SSH: git clone --recursive [email protected]:cvonk/OPNpool.git
Cloning into 'OPNpool'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
It is not possible to build the project on the current version of esp-idf as too many dependencies fail. Is there any chance that you update the project? (But, of course, there is a good chance that I'm doing something wrong)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.