Launch a command/script/rsync with a Telegram phrase

Hello,
I am looking for a solution to launch « when I want from my smartphone and simply » a rsync.

I thought that Gladys, who gives me the weather, could understand my request and launch a script in response, right?

I can’t figure out how… is it possible and I don’t know how to search? or is it not possible yet but it’s a great idea?

Thank you

Hello,

The idea of interaction is very good and a feature request had already been opened for that.

What is your exact need for rsync?

You can already more or less do this by tinkering with Node-RED :slight_smile:

You configure Node-RED with Gladys:

Then you create a device in Gladys in the MQTT integration, you give it a « light ON/OFF » type, and you put it in a fake room (example you call your room « rsync »)

Then in Node-RED you create a scenario that starts when you receive a message on MQTT and that runs a script

Finally, in Gladys you say « Turn on rsync » and voilà it will turn on the « rsync » room, which will contact Node-RED via MQTT and run your script :wink:

It’s a bit convoluted but it works

If it’s for backup, I recently discovered restic, which works great with cloud storage, local storage, via ssh, etc.
It’s versioned like git and encrypted, so it can be stored anywhere easily :grinning_face:

Hello, it’s a classic rsync from point A (cloud) to point B (local nas) that I want to launch without intervening on my PC. My rsync works. I put it in a cron that runs every 10 minutes with a dry-run to see if I have something to recover. In short, everything is in place.

But during my research, I thought I didn’t have to wait 10 minutes for the recovery and that Gladys could help me.

After a week of setup, I thought I wasn’t ready for 10 minutes anyway :slight_smile:

Hello,
I’ll take a look, even though my need has changed, as I have other use cases that can be managed via Gladys and a voice launch.

Thank you very much

I just watched the video, it really opens up possibilities, while waiting for it to arrive in Gladys, it’s great!

Thank you for the quality of your video and your very concrete examples.

Node-red installed, your examples set up, everything works, let’s go!

Thanks again!

A remark, I had considered migrating my Gladys from a rasp to the docker of my OpenMediavault (OMV).

While the Gladys docker works wonderfully, the installation of mqtt is far from simple. Whether via Gladys or manually, mqtt and Gladys cannot see each other. It might be due to my docker skills :slight_smile:

For now,
gladys and mqtt on a rasp
node_red on my OMV

Awesome :sunglasses: it’s great to read that!

Did you set up MQTT manually or through Gladys?

When you say « Gladys doesn’t see it, » what exactly isn’t working?

Hello @pierre-gilles,

On my rasp, to install mqtt, I just need to click on install in the mqtt configuration and it works

On my nas, after installing Gladys, checking that it was working well, I do the same action and I always have the message « An error occurred while saving the configuration. » whether the option « Use a broker in a Docker container. » is enabled or not.

But the fact that gladys cannot manage my docker alone, I find it logical, so I start a manual installation of mosquito

And I have an error « Request failed with status code 400 » that bothers me…

But by writing this post, I realize that my mapping is wrong, I correct it and Mosquitto is installed.

I still have my link between Gladys and mqqt.
By disabling the option « Use a broker in a Docker container », while Mosquitto is indeed in a docker but NOT the gladys docker, the connection chain is set up!
I have reparameterized node-red to land on the right mqqt, I have modified your examples « lamp, cpu and bitcoin » and EVERYTHING IS OK!

As feared, it came from my docker skills and perhaps the « Use a broker in a Docker container » parameter which can be misleading :slight_smile: Maybe it should be put « …in a local docker container »

So, everything is on the docker of my NAS, one for gladys, one for mqqt, one for node-red. I have gained a rasp in my installation.

Thank you again, your follow-up allowed me to review the configuration and find my mistake.

Have a good day

Yes, the term is misleading, it’s more like « Let Gladys manage the Mosquitto container »

Great! :slight_smile:

Indeed, I created a github issue to keep track:
https://github.com/GladysAssistant/Gladys/issues/1444