Send data to Webservice at time intervals #270
Replies: 2 comments 10 replies
-
Hey. We are currently working on an implementation of this feature without third-party workarounds. There's no ETA for now. Also, not all the BLE functionality is available, however. Your case seems to rely on the device's timer and that timer cannot work without the UI. But since you are using a Background Service, there's no UI. We will bring some updates into our docs to clarify this part. The current suggestion would be to use hmBLE directly or a MessageBuilder for this case. You also might have to rely on AOD to make sure that the device's internal timer always works @AFumi39 |
Beta Was this translation helpful? Give feedback.
-
This is the working version for me. Needs a "nightly" version of ZML library (not sure if it's been released as stable yet). It works flawlessy for more than 2 months now. You just need to replace the webservice url with yours, and change the data structure |
Beta Was this translation helpful? Give feedback.
-
Hello to everyone,
I'm trying to develop something (for personal use, I will publish the code on github, but not the app on the store) that can read sensor data from Amazfit Balance (ZOS 3.0) every X minutes and send all to external endpoint (my WS on a remote server).
I did some test building a Device App that do an httpRequest() to my endpoint, and it works well (using ZML Library). Then I proceeded adding a time-based app-service that reads sensors last value every 10 minutes, and it works well.
Then, I'm currently stuck at this point, because I can't do the httpRequest() (or even the request()) inside the app-service. It give me a "SBEngine: TypeError: not a function" error.
BLE functionality are in the "availability list" of app-service, so I'm expecting that this communication is possible. But I can't figure a way to do it...
Maybe there's some method that permits to "send a message" to "something" that receive the message and do a httpRequest()?
Or maybe there's a way to develop a side-service that get sensor data and sends data to remote endpoint, at regular intervals?
If you have suggestions, please tell me so I can try it.
Thank you
Beta Was this translation helpful? Give feedback.
All reactions