A few weeks ago I heard about n8n and I was looking for a way to use it, and I figured the best way was to create a challenge for myself and see if I could accomplish it. I have a Proxmox server running a few Linux VMs, an M1 Macbook Pro that I tinker with AI and random other things with, and a Gemini Pro account that came free with my phone. I had also been out the night before and just randomly saw the ISS flyover, so I figured I should try creating a tracker that will alert me whenever the ISS will be visible from my home.
When it comes to 'DevOps' I'm much more 'Ops' than 'Dev', but Gemini helps out a lot there (although, you still have to somewhat know what you're doing or it'll drive you mad with its stupid mistakes).
I first had it make the python script to determine when the ISS will be visible from my zip code over a period of 24 hours. It gathers the following information:
- time it will become visible,
- the direction in the sky it will appear,
- how high it will get,
- how long it will be visible,
- the time it will disappear, and
- the direction in the sky it will disappear.
This script sits on a Linux VM on my network, which is also connected to my Tailnet.
From here I moved over to my locally hosted n8n server where it is set to run every morning at 8am. It then connects to the Linux VM via SSH to run the Python script and then receives the relevant output data as JSON. Then n8n parses the data and then a summary message is sent to me immediately via Signal, and reminder messages are scheduled to be sent 15 minutes prior to any flyovers for the day.
I'm using Signal-cli to send the messages, and it has been working great! I wouldn't want to use Signal-cli manually, but it's great for when you want to programmatically send messages with Signal. I just wish there was a way to create 'Stories' using Signal-cli... but it doesn't look like that functionality is ready just yet.
To make things a bit more interesting I wanted to add a unique image to the summary message for days when there's a flyover. I decided to use Gemini for the prompt generation, just because I have access to it and wanted to see how difficult it would be (not difficult at all). I gave Gemini very broad instructions, something like "It has to be about the ISS, be creative, it needs to be less than 75 tokens, and provide the prompt in JSON format". I then send that prompt over to my locally hosted Automatic1111 instance and it returns an image. I pair that image with the summary message and send it out.
I worked on this off and on in my limited spare time for about 3 days, and found it extremely powerful and easy to accomplish. The parsing of the data is done with Python, and I'm able to access my other computers via SSH and remotely run commands, and the tools for interacting with various AI tools makes n8n very attractive to me for future projects. I'm looking at converting my smart home over to Home Assistant in the very near future, and I have a feeling that n8n is going to allow me to do some very incredible things.
Here's what my completed n8n workflow looks like:
This was a very fun project and I can't wait to get started on my next one!
I wanted to edit this to include that the data in the image was test data... since there were no passes for the next few weeks I had to tweak it a bit in order to get info to show up. That's why it says '1 pass in the next 24 hours' but then lists the pass as being over 2 weeks out.
