Comments (8)
I hade the same issue, and it seems to be caused by a part of the code in indicator_city.c
Actually there is no issue with ssl but with the zonestr
To be precise it occurs in "static void __indicator_http_task(void *p_arg)"
I adjusted:
if( net_flag && ip_flag && !time_zone_flag) {
ESP_LOGI(TAG, "Get time zone...");
err = __time_zone_get(__g_city_model.ip);
if( err == 0) {
char zone_str[32];
float zone = __g_city_model.local_utc_offset / 3600.0;
if( zone >= 0) {
snprintf(zone_str, sizeof(zone_str) - 1, "UTC-%.1f", zone);
} else {
snprintf(zone_str, sizeof(zone_str) - 1, "UTC+%.1f", 0 - zone);
}
indicator_time_net_zone_set( zone_str );
time_zone_flag = true;
}
}
into
if( net_flag && ip_flag && !time_zone_flag) {
ESP_LOGI(TAG, "Get time zone...");
char zone_str[32];
snprintf(zone_str, sizeof(zone_str) - 1, "UTC-2:00");
indicator_time_net_zone_set( zone_str );
time_zone_flag = true;
}
I agree it is somewhat radical, and limits my zone to UTC-2:00, so please if you use this adjust this to your own zone
But it works till it gets fixed. With this error you have, it will continue to loop through this procedure which seems a waste of resources.
If others know of a better fix, please share
from sensecap_indicator_esp32.
Hey @metlinux
The actual issue is that the code fetches the UTC based on you IP address using an API.
This UTC is then not properly formatted in the code, which causes the time error.
Yes you can either hard code the UTC or change the snprintf line so that the UTC is formatted properly as expected by dependent code
You can check this #25 issue as it is a similar one and I have provided the fix there.
from sensecap_indicator_esp32.
I have a similar issue
but only with indicator_ha, indicator_basis uses identical code and does not produce this error. I do not understand why and how to fix it.
from sensecap_indicator_esp32.
@yupyvovarov It seems to be connection issue with your wifi ?
Is It able to connect with your wifi ?
The internal chip used here is esp32 which has issue connecting with 5 GHz wifi, so is you wifi having 2.4 Ghz ?
Have you used the same code provided in the release build ?
and have you tried flashing different (previous) release builds ?
from sensecap_indicator_esp32.
@the-confused-genius No it's not. The WiFi connection is OK. It can connect to the internet, retrieve location, and send metrics to HA, but do not set a time zone. As I mentioned, the basic example firmware works perfectly, the ha example - doesn't.
The Indicator HA update release firmware works as expected, but failed when I tried to build it by myself.
from sensecap_indicator_esp32.
I have a similar issue
but only with indicator_ha, indicator_basis uses identical code and does not produce this error. I do not understand why and how to fix it.
I also just had it with indicator_ha. Do try the workaround that I mentioned above....
from sensecap_indicator_esp32.
@metlinux Your fix will probably work. But I am curious why the same indicator_city code works for indicator_basic. What is the difference?
from sensecap_indicator_esp32.
that mbedtls_ssl_setup error implies that there isn't enough memory. If you check out components/mbedtls/mbedtls/include/mbedtls/ssl.h
, line 112 (of a checked out project) MBEDTLS_ERR_SSL_ALLOC_FAILED
is mapped to -0x7F00.
What's a bit interesting is I added a log for getting the current heap free (ESP_LOGI(TAG, "Heap Free: %i", esp_get_free_heap_size());
) just before the get request call (line 440 in examples/indicator_ha/main/model/indicator_city.c
) and it showed there was 5 meg free (I (8594) city: Heap Free: 5173796
), so it seems odd, unless i've got the wrong format specifier there
from sensecap_indicator_esp32.
Related Issues (20)
- Troubleshooting GPIO Compilation Errors with ESP-IDF 5.1 and Resolving Dependencies HOT 1
- IDF-SDK 5.1 cant compile HOT 3
- Patch release5.0_psram_octal_120m.patch fail HOT 5
- After flashin (ESP-IDF v5.1) the screen keeps flickering very fast (app is installed), can onyone help? HOT 1
- Build Error HOT 8
- Re-programming SenseCAP: not showing up as /dev/cu.usbserial-xxxx anymore HOT 4
- Timezone Issue HOT 3
- Still get static_assert about "FLASH and PSRAM Mode” even with patch applied HOT 3
- esp-library problem HOT 3
- Patch failed with last version of IDF HOT 3
- Compile error: unknown type name 'time_t' HOT 4
- Photo Example
- MicroPython support HOT 1
- Customizable MQTT Topics for Multiple Device Support
- Connecting to the AWS IoT core MQTT broker HOT 6
- Can Indicator RP2040 pull the image from Vision V2 faster? HOT 1
- Memory leaks cause system to crash and/or openAI requests to fail in indicator_openai example HOT 1
- Problem with flashing any example using wifi & screen HOT 4
- Tutorial for D1S Graphics Library Fails Compile. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sensecap_indicator_esp32.