First, a little background. A long time ago, I rigged a little system using my Mac, my stereo, and a wemo motion sensor so that I could create motion-sensor-triggered spoken reminders during certain hours of certain days. The motion sensor is by the door. The reminders would be something like "Don't forget to take out the trash" or "Don't forget to bring your workout clothes".
The tab-delimited file where I keep the reminder settings are in dropbox and for the longest time, I would just go in and edit it manually. Recently, I created a Siri Shortcut that walked me though a series of select lists to create the reminders by using IFTTT to append to a dropbox file. There's more to it, but that's essentially it.
That all worked well for a long time, but it stopped working awhile back and I only recently discovered that it's because I started using the wemo nodes in Node Red and apparently, the WemoServer I'd installed on my mac keeps losing its subscription to the motion sensor (because the device can only handle one subscription at a time - so I can't have my node red wemo on the Pi and my WemoServer on my mac both subscribed to motion events at the same time).
So I want to be able to transfer the whole setup to node red. I can re-write my script that decides when to issue the reminders based on the tab-delimited file, no problem.
The problem is that I want to be able to create the reminders using my phone from anywhere and I'd rather not install dropbox on my rPi for various reasons, the main ones being cycles and disk space. I want to be able to delete reminders (a tab-delimited line of text in the file) and edit or add new lines - ideally using the Siri Shortcut I created, which sends a webhook to IFTTT with a line of text to append to the dropbox file.
I'm looking for ideas. I could set up an rsync with the dropbox file on my mac using a cron job. Is there a better way?
Not sure about "better", but there are certainly other ways.
For example, if you wanted to avoid file sync issues, you could create a simple Telegram bot that you could send commands to containing the text. Simple and secure.
That also has the advantage of being truly cross-platform and it is as easy to create a new entry on the Mac (or PC) itself as it is from iOS or Android since the Telegram platform is available on all.
I think that would be my preferred approach unless the amount of text or the structure of the data was too complex.
Interesting. I would like to leave open the option of edit & delete though. I haven't implemented a way to do that other than editing the dropbox file, but that currently works.
I wonder if I can just send the whole file anytime I make a change and have the pi just overwrite it.
Edit and delete are simply 2 more commands. The trick is to have a memorable ID that you can give whether that is a date, date/time, date and number or something else. Another command would let you list the available ID's.
It really is quite easy. For example, in my case, I have a bot that lets me send commands to turn on and off lamps at home. Another command queries the status of all the lamps. Another queries the humidity sensors and another the temperature. Sky's the limit really.
Telegram also has a built-in feature for providing command hints too which is particularly helpful for those ones that you only use rarely.
You could also go further and build a conversational interface that gives some flexibility in how you word things with the bot coming back to you to ask questions if needed.
If you wanted to get really clever, you could wire the bot up to a natural language AI API (Google, Microsoft, etc). Make your own mini-Alexa.
You might want to start simple though. Still, these things can be addictive, you've been warned
On the Node-RED end, you could retain your files if you wished which would let you continue to interact with your previous system too.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.