Widget with temperature

Hello :blush:

I have esp32 Lolin32 d32 that sends data from ds18b20 and dth22 sensors every 30 minutes and goes into deepsleep.
Is there an app that would allow me to display the temperature on the phone screen as a Widget? (not after opening arduino cloud or blynk, the old blynk had it but now it is not possible).

I want to do this on my Grandma's phone for her. Something that would work automatically without any intervention. Like a weather widget but with the temperature from my sensor.

Can you help me?

You can setup a simple web server accessible from web browser.
Then make a shortcut to that on your phone home screen.
This works in local network, not over internet (without additional tinkering).

1 Like

Trivial with the FREE Arduino Cloud, no idea otherwise.

I need something over internet :pensive:

That's the difficult part, to get the esp and the phone in contact. What internet conn are avail for those devices?

I'm not able to tell you what cloud provider is best for your need.
But if you want to try something simple, create a public channel with Thingspeak, update it with your Esp and set a browser shortcut on home screen to your channel address.
This is one random public address, could be yours:
https://thingspeak.mathworks.com/channels/701593/widgets/50417

But it will be a shortcut to the page. I want it as a Widget on the phone screen. I tried to do it using "google home" but I don't know why I don't have the "Widget" option :pensive:

Wifi for both but the phone will use a different wifi

Either it's done by some cloud provider, or if you setup a little server where the ESP is located.

ESP - server with wireguard - router with a port open to server - internet - router - phone connects to server over wireguard.

Get a RPI, run Home assistant on it and you don't need any widget in the mobile, works on both iPhone and Android as well as other platforms / browsers.

OP asked to have widget on home screen, so even with HA it's still needed.
While I think HA would be good/best solution to many cases on this forum, for one DHT-sensor it might be overkill.
I think OP needs to find right settings for android/iphone widgets or some app that takes care of it (I have no experience).

Right, there's Home assistant for both Android and iOS, they features widgets as well.

I can easily get data from the device using BLYNK.CLOUD HTTPS API.

Using

https://sgp1.blynk.cloud/external/api/get?token=**TOKEN**&**VPINNUMBER**

And add it to kwgt kustom widget app.

$wg("https://sgp1.blynk.cloud/external/api/get?token=**TOKEN**&**VPINNUMBER**", txt)$

I still have a problem with showing the last update time and forcing more frequent updates

Small steps :smiling_face:

I solved the problem :smiling_face_with_sunglasses::grin:

Blynk is hopeless because every data read from http api from every sensor reduces the connection limit in the basic version very quickly.

I use Firebase. It's a really amazing tool. It's free. And the only limitation is simultaneous connections (100), which is a huge reserve. Additionally, you can create a second path and store data and later use it, for example, on a website or display it on an epaper connected to a second esp. And you can actually connect almost an unlimited number of devices.

I'll post the code later.
I added a few improvements to the standard library. Data transfer time measurement. Attempts to connect to the server (with a limited number of attempts and critical timeouts to avoid blocking the rest of the code), reports login or data transfer errors

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.