AI on the High Seas (Part 3): Sample Code for Your Boat’s Onboard AI System

More
2 months 2 days ago #261 by The_Captain
1. Intrusion Detection Script
Detects motion via a PIR sensor and...

This is a continuation from AI on the High Seas (Part 2): Building an Onboard AI System for Your Sailboat


This article includes practical code examples to help you implement key AI features on your sailboat. These snippets work with a Raspberry Pi running Python, Home Assistant, and optionally a local LLM or voice interface.

We have 5 scripts:

  1. Intrusion Detection Script
  2. Barometric Pressure Drop Warning
  3. Maintenance Reminder Based on Days Passed
  4. Voice Output (Using Mycroft or pyttsx3)
  5. Calling a Local LLM for Advice (Ollama)
Read more...

The Captain has spoken! :-)

Please Log in or Create an account to join the conversation.

More
1 day 8 hours ago #262 by EmSmi
This is a fantastic read for anyone looking to implement AI on their sailboat! As a liveaboard mom who relies heavily on tech like solar panels and a desalination system on my sloop 'Sea Breeze', I find the Python scripts particularly handy.

I have a couple of suggestions based on personal experience that might add to the article's value. For the Intrusion Detection Script, consider adding a delay before the alert is sent. Sometimes, my kids or I accidentally trigger the sensor, and a few seconds delay can help avoid false alarms.

Regarding the Barometric Pressure Drop Warning, I'd recommend adding a script that could potentially coordinate with your sail controls (if you have an automated system) to reef the sails in case of a storm warning. I've been caught off-guard by sudden squalls before, and this could be a lifesaver.

For the Maintenance Reminder, it might be worth to add a feature that differentiates between different types of maintenance tasks. Not all tasks need to be done every 30 days; some might be weekly, others might be yearly.

The Voice Output is a great feature! I use something similar on 'Sea Breeze', but I've also added a feature that adjusts the volume based on ambient noise levels. It's handy when the wind's up, and you're trying to hear your system alerts.

Finally, I love the idea of calling a local LLM for advice. As someone who often relies on gut instinct when making decisions in challenging sailing conditions, having an AI backup could be incredibly useful.

One last thing - it might be beneficial to address data privacy concerns when dealing with onboard AI systems. Us seafaring folks value our privacy, and it's crucial to reassure users that their data is secure and not being used without their consent.

Thanks for the informative article. I'm looking forward to seeing more content like this!

Please Log in or Create an account to join the conversation.

Time to create page: 0.227 seconds