-->
Page 1 of 1

Generate (network) system message from ESP to my PC

PostPosted: Sun Jul 04, 2021 12:58 pm
by ArjenV
The title might be a bit cryptic. Here's the thing:

Got an ESP8266, battery powered. It measures the temperature every 5min and sends it to Thingspeak, along with the time it took to be active and the battery power left. I have coded it such that it goes to deep sleep mode. The 'on' time is only some 1.3 secs/5 minutes. It measures the temperature and the battery Voltage, connects to Thingspeak, sends the data and goes to deepsleep for the next 5 minutes (all within these 1.3 secs) . So far so good.

I have it running now from may 17, 2021. It is still operative. Battery is down to 3.77V (from 4.2 fully charged). It is an old battery from an old phone, however, if it runs for 2 months without recharging now, I am happy with it.

The problem is that I do not monitor it daily anymore. So what I'd like to add is a warning signal from the ESP whenever the battery is drained to, say, 3.3V. A former battery I used was drained empty to 0V and I had to revive it, but it is now weak.

I found snippets of software to mail it via e.g gmail, Could work, probably will, but I am not happy with the detour via gmail. I operate the ESP and my main computer in the same home-network. My main computer is a linux operated computer. When I e.g. shut it down with the curse 'sudo shutdown -h now' it gives me a system message 'shutdown in ... secs'. I would like such a message to originate from the ESP to my PC.

Or any other direct message from ESP to my PC would do, but without installing any software in my PC for it. Just a 'hey! Charge me now' message or something like it. Or even an email from the ESP to my mailbox but without outside interference. (Hope I am clear).

Your input on this is welcome.....

Thanks Arjen

Re: Generate (network) system message from ESP to my PC

PostPosted: Mon Jul 05, 2021 1:49 am
by schufti
you could use a syslog message (syslogd should allready run on your linux box) and have some script scanning the syslog and alert you if something from esp arrives. All the necessary sw should allready be on your linux box. Other than that - nope, even M$ got ist that running an unsecured messaging service on an open port is not a good idea ...

Re: Generate (network) system message from ESP to my PC

PostPosted: Tue Jul 06, 2021 1:33 am
by davydnorris
Get ThingSpeak to do the alerting, not the ESP - you're already sending the raw data to the platform so make the platform do the analytics and reporting for you

Re: Generate (network) system message from ESP to my PC

PostPosted: Tue Jul 06, 2021 5:11 am
by ArjenV
davydnorris wrote:Get ThingSpeak to do the alerting, not the ESP - you're already sending the raw data to the platform so make the platform do the analytics and reporting for you


I didn't know that was even an option. I'll look into that. Thanks