DIY Boat Automation, Monitoring, and Alarm Project

Dude_HimselfDude_Himself Member Posts: 596 ✭✭✭
I've always believed there is big money in aftermarket automation for vehicles. I've rewired portions of every vehicle I've owned to add pulsing brake lights, remote start, auto up windows, turn signal cancellation, cameras, etc. If you started with a few popular models and had an easy, nearly plug-n-play harness (think of something that piggybacks on the fuse blocks and switch connectors) you could easily turn any car into a more user-friendly auto.

Just my thoughts as I start planning a partial automation system for my Rinker. Right now that includes an rPi, wifi, and various sensors to allow:
  1. remote monitoring of battery voltage, GPS location, bilge pump status, and motion/perimeter/door sensor
  2. streaming media for both wireless devices and the cabin TV's
  3. streaming music for the TV's and radios, including casting from mobile devices
  4. auto blower/starting of the genny when anchored out to maintain battery voltage
  5. long-range wifi acquisition and rebroadcasting, with a 4G/LTE failover capability
  6. an alarm for dragging anchors, combustible gasses, water in the bilge, warming fridge, CO/CO2, low potable water, high blackwater, etc. with a simple dashboard (so the wife is less concerned about being left on anchor while I paddle off).

The great thing is these systems sell for thousands, but with under $250 and a weekend I can build out 90% of the capabilities, and given another weekend I can even make it pretty and more robust.

This is a placeholder - the build will hopefully start once the boat is ready for the season.

Comments

  • Dude_HimselfDude_Himself Member Posts: 596 ✭✭✭
    To show just how easy I believe this will be:

    A raspberry Pi will act as the brains of the network, so it'll run Linux with network services to include: DHCP, DNS, File Sharing (Multimedia streaming), and it'll likely run the cockpit TV, with a second ChromeCast dongle on it. That knocks out 2, 3, and 5, and paves the way for remote connectivity.

    1, 4, and 6 will be utilized either by GPIO on the rPi, or with an aftermarket I/O module of some sort. Little chinese things cost $12 shipped and give you some 32 addressable input/output, so each would be either a sensor channel or a relay control. Then you add a few circuits in parallel to other switches, and all you have left to do is script your automation. HomeAssistant makes that super easy, and even gives you a pretty, easily customizable WebUI, so once you're done you navigate to a website and see the status of your boat from anywhere. GPS coordinates, drift, bilge counter, battery voltage, etc!
  • Handymans342Handymans342 Member Posts: 10,375 ✭✭✭✭✭
    Is this hackproof??
  • IanIan Member Posts: 2,860 ✭✭✭✭
    Nothing is hack proof, you can make it as secure as you can until someone circumvents it.

    Regards,

    Ian

    The Third “B”

    Secretary, Ravena Coeymans Yacht Club

    https://www.rcyachtclub.com/

  • StodgeStodge Member Posts: 2,738 ✭✭✭✭
    Box this bad boy up and sell it as a turn-key boat monitor.  

    2002 FV 342 on Lake St. Clair - Past Commodore SHC - Vessel Examiner USCGAUX

  • LaReaLaRea Member, Moderator Posts: 7,754 mod
    There are at least a couple interesting angles here.  

    1) Do what existing commercial products do, but better and at a fraction of the price.  For example, most commercial monitoring systems include a bilge monitor.  But if I could do it without spending $1000 plus monthly fees?  Yes please.

    2) Come up with brand-new applications that don't yet exist in the market.  There are so many cool components and sensors out there ... N2K gateways, cameras, ultrasonic distance sensors, inertial measurement units, relays, stepper motors ... the possibilities are endless.  The hardest part is coming up with the idea.  

    A video camera costs $20.  A 3.5" touchscreen display, $45.  


  • reneechris14reneechris14 Member Posts: 3,134 ✭✭✭✭✭
    Very interesting but way over my head.
    2005 Rinker FV342  Pawcatuck river,Ct
  • IanIan Member Posts: 2,860 ✭✭✭✭
    edited March 2019
    Need to be sure anything in the engine room is certified for marine use/ non sparking. 
    Post edited by Ian on

    Regards,

    Ian

    The Third “B”

    Secretary, Ravena Coeymans Yacht Club

    https://www.rcyachtclub.com/

  • Handymans342Handymans342 Member Posts: 10,375 ✭✭✭✭✭
    At what point do you keep spending money on stuff you dont need
  • Dream_InnDream_Inn Member, Moderator Posts: 7,662 mod
    At what point do you keep spending money on stuff you dont need

    For most people, when you die! :)

    Dream 'Inn III -- 2008 400 Express

  • LaReaLaRea Member, Moderator Posts: 7,754 mod
    Needs, feh.  Stuff like this is a form of creative expression, like composing music or painting watercolors.  C'mon Handy, what's a feature you'd like to have in your land yacht RV?  Use your imagination.  
  • randy56randy56 Member Posts: 4,083 ✭✭✭✭✭
    5 g is coming late this year,it's going to be interesting.
    Boat Name : 

  • skennellyskennelly Member Posts: 2,196 ✭✭✭✭
    I'm techy by trade.  Write code all day long and love messing with embedded projects.  I've built a controller for my aquarium that automates everything.  I get all hyped about an idea and then life stops me from hiding away coding and building after coming home after 8+ hours of the same.

    Good luck @Dude_Himself with your project.
    2002 - 270FV Mag 350 B3
  • StodgeStodge Member Posts: 2,738 ✭✭✭✭
    At what point do you keep spending money on stuff you dont need
    So people need large boxes on wheels??   ;)

    2002 FV 342 on Lake St. Clair - Past Commodore SHC - Vessel Examiner USCGAUX

  • StodgeStodge Member Posts: 2,738 ✭✭✭✭
    Like @skennelly I'm an IT guy by trade.  I also tinker for fun.  

    I think the project is very cool.  I have a few Raspberry PIs around the house.  But not for anything as ambitious.  One is my arcade, another is a media server, another is the music player for my pirate radio station, then of course I have the tester.  

    I haven't considered being "that" connected to the boat.  It lives in the back yard when the water is soft.  I am considering adding a presence sensor to the boat so the smart home hub will know when it's home.  Then I can have the back yard light come on when we come home at night, and have the back door unlock any time we come home.

    Maybe when I completely run out of things to tinker with I'll give something like this a look.  It would be neat to have a PI driven console down below with these features.

    There are a few jillion things I'd like to catch up on in the mean time like my ham radio hobby which has been horribly neglected since I started boating.  Or putting up a marine VHF antenna on the house so I can reach the admiral when she's out on the little boat, etc, etc, etc..

    2002 FV 342 on Lake St. Clair - Past Commodore SHC - Vessel Examiner USCGAUX

  • Dude_HimselfDude_Himself Member Posts: 596 ✭✭✭
    Is this hackproof??
    Nothing is hackproof, but for remote connectivity this would likely use reverse-proxy SSH tunneling like a VPN. In layman's terms: instead of the boat listening for connections from the internet, it will actively connect to a known host (a secured server I run), then allow access to the services over that connection. The first time you set it up in person, on the boat, and tell the boat automation that you're going to connect a new device - then you use the device with a username/password combo to authenticate. The two devices will share a private key (secret) that they'll use to 'prove' the trust relationship moving forward. Any different devices using that secret will cause the secret to expire - preventing a man-in-the-middle type attack.

    With physical access anything is easy to compromise, but this won't be able to access critical systems on the boat - that would be dangerous.

    LaRea said:
    There are at least a couple interesting angles here.  

    1) Do what existing commercial products do, but better and at a fraction of the price.  For example, most commercial monitoring systems include a bilge monitor.  But if I could do it without spending $1000 plus monthly fees?  Yes please.

    2) Come up with brand-new applications that don't yet exist in the market.  There are so many cool components and sensors out there ... N2K gateways, cameras, ultrasonic distance sensors, inertial measurement units, relays, stepper motors ... the possibilities are endless.  The hardest part is coming up with the idea.  

    A video camera costs $20.  A 3.5" touchscreen display, $45.  


    The N2K to IP adapters exist, and there's a few big brains out there working with that, but because they're "marine" technology you pay 10x the cost. I would build most of this out using regular IT protocols, but that wouldn't stop someone from adding that NMEA gateway and having it speak to the chartplotter, etc. 

    And that might be a bad example: my Simrad GO5 XSE has wifi built in, and when there's a wifi network any Android/iOS device can see/interact* with the display wirelessly anywhere on the boat.

    *that's what I've read, but I've never played with it because on a 280 every part of the boat is 5 steps away.
  • Dude_HimselfDude_Himself Member Posts: 596 ✭✭✭
    Is this hackproof??
    Nothing is hackproof, but for remote connectivity this would likely use reverse-proxy SSH tunneling like a VPN. In layman's terms: instead of the boat listening for connections from the internet, it will actively connect to a known host (a secured server I run), then allow access to the services over that connection. The first time you set it up in person, on the boat, and tell the boat automation that you're going to connect a new device - then you use the device with a username/password combo to authenticate. The two devices will share a private key (secret) that they'll use to 'prove' the trust relationship moving forward. Any different devices using that secret will cause the secret to expire - preventing a man-in-the-middle type attack.

    With physical access anything is easy to compromise, but this won't be able to access critical systems on the boat - that would be dangerous.

    LaRea said:
    There are at least a couple interesting angles here.  

    1) Do what existing commercial products do, but better and at a fraction of the price.  For example, most commercial monitoring systems include a bilge monitor.  But if I could do it without spending $1000 plus monthly fees?  Yes please.

    2) Come up with brand-new applications that don't yet exist in the market.  There are so many cool components and sensors out there ... N2K gateways, cameras, ultrasonic distance sensors, inertial measurement units, relays, stepper motors ... the possibilities are endless.  The hardest part is coming up with the idea.  

    A video camera costs $20.  A 3.5" touchscreen display, $45.  


    The N2K to IP adapters exist, and there's a few big brains out there working with that, but because they're "marine" technology you pay 10x the cost. I would build most of this out using regular IT protocols, but that wouldn't stop someone from adding that NMEA gateway and having it speak to the chartplotter, etc. 

    And that might be a bad example: my Simrad GO5 XSE has wifi built in, and when there's a wifi network any Android/iOS device can see/interact* with the display wirelessly anywhere on the boat.

    *that's what I've read, but I've never played with it because on a 280 every part of the boat is 5 steps away.
  • Dude_HimselfDude_Himself Member Posts: 596 ✭✭✭
    Weird, I posted this yesterday afternoon but it's showing 8:35am.

    My main motivation for this is the boat is huge and lives on the trailer, and the local ramps are getting worse and worse from overcrowding. It's frustrating - as a single hander I get cut out of the trailer line, the boat takes up a whole ramp/dock, and folks give me nasty looks when I'm running back and forth to recover (splashing is quick and painless).

    We want to splash the boat Thursday afternoon, then anchor it out for the weekend, but we don't want the same thing to happen to the boat as our crab traps: assholes using them as their own and us left cleaning up the mess. Pay $150 on quality traps, licenses, and bait, then find the trap empty, without bait, 200 yards from where you left it....

    So I want a way to monitor the boat so if something happens I can respond before there's damage/loss. Of course, with IoT it's in for a penny, in for a pound: adding additional services is as easy as running:

    apt-get install xxx
    <br>

    So, once the basics: GPS, camera, door sensor, battery voltmeter, and bilge counter/water alarm are met, I'll add onto it remotely from home when I find some free time.

    As @skennelly said I'll probably build a fraction of this before life overcomes, but posting here might keep me honest and motivate me to see it through instead of crashing in front of the latest Netflix series.
  • raybo3raybo3 Administrator Posts: 5,502 admin
    @Dude_Himself your post went to the spam file for some reason. I removed and had it posted. 
    2002 342 Fiesta Vee PC Point Of Pines YC Revere MA. popyc.org     raybo3@live.com
  • StodgeStodge Member Posts: 2,738 ✭✭✭✭
    @Dude_Himself So what apps are you installing to do the monitoring?  Or are you just taking raw data from the devices connected to the IO controller?

    2002 FV 342 on Lake St. Clair - Past Commodore SHC - Vessel Examiner USCGAUX

  • StodgeStodge Member Posts: 2,738 ✭✭✭✭
    Just had an idea.  Might try to cobble together a PI solution for the tank sensors.  I added some external tanks sensors to the water and waste tanks when I had the mid-berth torn apart.  But I don't have a display for them.  That might be good application for a PI on the boat.

    2002 FV 342 on Lake St. Clair - Past Commodore SHC - Vessel Examiner USCGAUX

  • Dude_HimselfDude_Himself Member Posts: 596 ✭✭✭
    And proving this to be a worthy investment: I'm working from the boat, on the trailer, in the storage yard, while running a portable genny to top off the batteries. At least I would be right now, if the BRAND NEW @$%#@%#$^% BATTERY wasn't dead. Without a sign of water, the midberth bilge pump switch activated and killed this battery in the last two weeks. The boat doesn't get water in the bilge from rain, and the bilge is still powdered with the spider dust I put down during winterizing (had a few Black Widow's last spring). So there's another $180 worth of battery wasted.

    Last season I designed a solar installation that would keep the batteries topped and disconnect them if they discharge more than 50%, but I ended up spending the money on EoH brakes, which are sitting in my garage still because the PO botched the brake controller wiring job and I need to spend a weekend re-wiring the full trailer lights harness on the E350.

    If I had a monitor it would have paid for itself already.
  • rasburyrasbury Member Posts: 8,406 ✭✭✭✭✭
    wow dude, this is very interesting and I'm following you closely on this one...by the way, can you help me program my remote to my VCR? That has been giving me trouble lately! Way over my head dude but I support you!
  • IanIan Member Posts: 2,860 ✭✭✭✭
    Is that the old push button type on Sanyo Betamax units? Just press the end Ras to pause the tape.  :)

    Regards,

    Ian

    The Third “B”

    Secretary, Ravena Coeymans Yacht Club

    https://www.rcyachtclub.com/

  • rasburyrasbury Member Posts: 8,406 ✭✭✭✭✭
  • LaReaLaRea Member, Moderator Posts: 7,754 mod
    Yeah, these days most any network can be hacked.  The mitigating factor for boaters is that there's no financial incentive to hack a boat's network.  
  • Handymans342Handymans342 Member Posts: 10,375 ✭✭✭✭✭
    Could a boat be hacked and self driven?? Like a plane??
  • Dude_HimselfDude_Himself Member Posts: 596 ✭✭✭
    Could a boat be hacked and self driven?? Like a plane??
    If you have an autopilot, DTS, and chartplotter all wired together with NMEA2k, yes. The NMEA traffic isn't encrypted - all I have to do is insert my own traffic (messages) and I could lie to the autopilot about the current position/direction/speed and effectively lead the boat around that way. Bigger ships (than ours) much more of the controls are electric nowadays, but they're using a similar control network protocol. Often there's some manual override somewhere near the engine/rudder actuators, but it would likely take a few minutes for the crew to realize their inputs were being ignored, and maybe a few more (depending on their drills and practice) to manually remove control from the ship's computers.

    Ironically this is a very similar event to the Fitzgerald collision near Japan: the crew was understaffed and those present for the night shift lacked basic seamanship - the ship was relying heavily on their high-tech combat center to supplement manpower. Those very automation systems were also degraded: the radar (SPS-67) was degraded, and required manual process to "hook" radar contacts to display on the AIS display with location and projected paths. That radar also required manual tuning, but that was inop at the time as well - so flocks of birds and other surface clutter would whitewash the display and prevent hooking real contacts. The SPS-73, the standby navigational radar, was inop: it would sometimes show the ship heading 180° away from, instead of towards, the navigational waypoints. The antenna was at the end of it's life and frequently shut down. The ship's targeting radar (critical as the Fitz is a Destroyer) had been patched together and operated at 1/12th the normal speed. The note in the log read "Problem known since 2012. Declared hopeless".

    The email system was failed - the crew was using gmail accounts to communicate between critical areas of the ship. The thermal camera used by the weapons specialist to help navigate in congested waters was unmanned - Combs was on a bathroom break (unheard of while standing watch). When suddenly the SPS-67 (still in long-distance mode due to the broken tuning) went white (because the ACX Crystal was literally towering over them at this point) they spun the camera and all they could see was the ship - it filled the entire field of view. It was impossible to tell which way it was travelling or how long before impact - the crew had to leave the bridge to put eyes on targets.

    There were supposed to be two lookouts - port and starboard - but the Navy cutbacks combined those duties to a single crew that would walk back and forth to stand watch. Parker, the lookout, was on a small metal deck off the bridge getting training in estimated distance and bearing - a weakness that prevented her from getting promoted on her previous ship. 

    Once they recognized the dangers, the helmsman-in-training (she had 25 whole minutes of experience behind the wheel) didn't know how to act on the commanding officer's orders to go "all ahead flank, hard left rudder". It took several moments for another Petty Officer to take notice and relieve her. The ships collided, and the damage knocked out the ships electronics, the starboard engine shaft, and flooded many compartments. The remaining engine had to be operated by hand, the steering done manually from aft steering (manually running the hydraulic valves to control the rudder's position), and the ship had to be dewatered manually using a bucket line.

    There's actually a really great article on ProPublica: https://features.propublica.org/navy-accidents/uss-fitzgerald-destroyer-crash-crystal/ - highly recommended reading. 
Sign In or Register to comment.