Comments (9)
@GoRo33 , If you mean the sdkconfig.defaults file (and not defaults within ESP8266_RTOS_SDK itself), then yes, atleast for the examples that have floats, this needs to be set.
from esp-homekit-sdk.
@GoRo33 seems some issue with printing float numbers. In order to confirm this, please add a call hap_http_debug_enable()
before hap_start()
in your app_main.c
and check if you see this line in the GET /accessories response
"characteristics":[{"iid":12,"value":,"type":"11","perms":["pr","ev"],"ev":false,"format":"float","minValue":,"maxValue":,"minStep":,"unit":"celsius"}
As you can see, the values are missing for multiple keys. Since this is not a valid JSON, iOS rejects this.
Please search for the below config option in your sdkconfig file and change it from y
to n
.
CONFIG_NEWLIB_NANO_FORMAT=y
Let me know if it fixes the issue for you.
from esp-homekit-sdk.
@shahpiyushv Hi!
Thanks for the help. This solves my problem. As far I know there are some error with printing float numbers on ESP8266 RTOS SDK. When using printf
or ESP_LOG
, float format don't work.
Should I this solution be in default config for ESP8266?
from esp-homekit-sdk.
Hi there,
I'm having the same issue while using the lightbulb example.
For my use case I wanted to add some DHT22 sensor to read temperature and humidity from.
In my test, I only used the temperature and passed it to the hap characteristics without updating the temperature later on.
When reading and printing the information from the sensor as int everything works fine.
Additionally, the CONFIG_NEWLIB_NANO_FORMAT=y
is set by default to yes but unfortunately I cannot print any float values.
I removed line hap_enable_mfi_auth(HAP_MFI_AUTH_HW);
as I'm not using the MFI variant of sdk.
Any suggestion what I might be missing?
@GoRo33 do you have any example code for your solution?
Thanks in advance!
from esp-homekit-sdk.
@Mike09 , as you can see in my comment above, search for CONFIG_NEWLIB_NANO_FORMAT=y
and change it from y to n. Probably you misread the comment and retained CONFIG_NEWLIB_NANO_FORMAT=y
?
from esp-homekit-sdk.
Thanks @shahpiyushv for your quick reply!
you were right, I was misreading that line.
I tried your suggestion, but now I get following error:
Fatal exception (28):
epc1=0x40001800, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000080, depc=0x00000000
I saw from the espressif docs that the cause is a access to invalid address.
To exclude an issue with the DHT file, I excluded that one and passed a fixed float value to the characteristics, but the issue stays the same.
Did someone encounter similar issues?
from esp-homekit-sdk.
In my experience, disabling CONFIG_NEWLIB_NANO_FORMAT
resulted in code size being too large for the ESP8266, which produces the Fatal exception (28)
error. Enabling release optimizations with CONFIG_OPTIMIZATION_LEVEL_RELEASE=y
will reduce code size sufficiently to fix the problem.
from esp-homekit-sdk.
I'm having the same issue on ESP32:
######## Starting Pair Verify ########
Pair Verify M1 Received
Pair Verify M2 Successful
Pair Verify M3 Received
I (6198) HAP Lightstrip: Controller 73611AA3-78CF-4BFC-9316-98E46855FED2 Connected
HomeKit Session active
Pair Verify Successful for 73611AA3-78CF-4BFC-9316-98E46855FED2
Decryption error/Connection lost. Marking session as invalid
I (11588) HAP Lightstrip: Controller 73611AA3-78CF-4BFC-9316-98E46855FED2 Disconnected
HomeKit Session terminated
HomeKit SDK commit (master): eade505a
ESP-IDF commit (v4.4): 8153bfe412
I've tried the troubleshooting steps that @shahpiyushv suggested above, but this did not work. I also tried commenting out all ESP_LOGI()
calls with float values - again, same problem. Restarting my modem, router, DHCP server, etc. has not made any difference.
At this point I'm at a loss for what could be going on or how to properly debug it.
Here is the output from hap_http_debug_enable()
Any help would be much appreciated!
from esp-homekit-sdk.
UPDATE:
I was finally able to resolve this issue. Going into the Home app on my iPhone to "Delete my home" fixed everything. Once I added my HomeKit device again, it worked on the first try.
Step-by-step instructions for this can be found here
from esp-homekit-sdk.
Related Issues (20)
- Unable to find components to build examples for ESP8266 HOT 2
- How to cleanly add or remove accessories ? (bridge) HOT 2
- HTTPD init error HOT 2
- ESP8266无法使用
- Accessory Not Found HOT 6
- Update examples CMakeLists.txt
- hap_platform_httpd_start failing HOT 1
- Is it possible to remove nvs? HOT 2
- More than 1 accessory support without using bridge HOT 6
- How to change Homekit TCP port? HOT 2
- esp-homekit-sdk network allocation HOT 2
- Lightbulb: save status on flash HOT 3
- Change serial number without re-build source code HOT 2
- Is it possible to return the device status outside the hap_serv_set_write_cb callback function? HOT 3
- idf.py menuconfig fails for aws-iot example
- Mfi license HOT 5
- homekit bridge Decryption error/Connection lost HOT 2
- Problem with some services and features HOT 5
- httpd_start() don't start, has problem with create stack ESP32-S3 SPIRAM 8MB (IDFGH-13325) HOT 3
- Accessories stuck in 'opening' or 'closing' states
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 esp-homekit-sdk.