[HN Gopher] DIY Boat Monitoring System
___________________________________________________________________
DIY Boat Monitoring System
Author : fnord77
Score : 132 points
Date : 2021-05-06 12:19 UTC (10 hours ago)
(HTM) web link (l-36.com)
(TXT) w3m dump (l-36.com)
| sathackr wrote:
| Very nice work overall, and I admit I haven't read the entire
| project, but it seems the entire authority to operate _both_
| pumps has been delegated to a microcontroller that becomes a
| single point of failure for the entire system.
|
| Given the cost of the system and chance for failure I think it
| would make sense to either add a second system or enable some
| sort of automatic override (possibly via mechanical float switch
| wired directly to large pump and set at a higher water level than
| the other two switches)
|
| So that there will be enough time between a potential large leak
| occuring and detection of controller failure(via lack of daily
| email) to prevent it from sinking the boat.
| rkangel wrote:
| That wasn't my read. My read was that they go off independently
| based on their own conditions (the large pump has a float
| switch that presumably isn't set off until _after_ the small
| pump should have taken care of it) and the monitor just records
| these things.
| sathackr wrote:
| Based on what was wrote I don't think that's the case. He
| included some special conditions like:
|
| >The monitor knows if I take the boat out when I turn on the
| main boat power and switches the small pump to auto and
| otherwise stops monitoring. But when the main power is back
| on, the pump will initially run every half hour and then
| every hour and then after about a day it will only be running
| once a day"
|
| Though reading closer there are only two relays, and the
| author talks about controlling both the small pump and the
| fan with relays, and there is language around the large pump
| that while isn't conclusive, may indicate it is indeed on a
| separate float switch and system and the ESP32 is only
| involved in the monitoring of it.
|
| > I have a large pump that only goes off if the small pump
| fails or the boat is trying to sink. If the float switch
| lifts, the monitor wakes up and sends an email alerting me.
| GreggHyram wrote:
| I built something similar using a RockBlock board and a PI once.
| The cost was a bit prohibitive in the end as as it was satellite
| data and not wifi.
| Tepix wrote:
| This is neat. The german sailing forum has some guys doing
| ambitious DIY boat related electronics:
|
| https://www.segeln-forum.de/board194-boot-technik/board195-o...
|
| https://open-boat-projects.org/
| kwdc wrote:
| Looks like a great student project. Those ESP modules are great
| for these types of applications. I'm thinking about adding a
| camera setup for mine.
| fest wrote:
| Ttgo Esp32 module with LCD (or was that an OLED?) is my go-to
| solution for one-offs and quick prototypes. Previously it was
| stm32, but I found myself fiddling with inconsistent SDK (ST's
| HAL) and myriad of configuration options for peripherals a lot
| more than when using SDK. The screen is also useful for
| debugging info (what's the IP of this device? what is the
| current state of inputs/outputs?).
|
| So far I've built controller for x-ray tube (turning AC on for
| required number of cycles), oil boiler consumption monitor,
| gate/garage door opener (to remotely open the gate for delivery
| courriers), remote power and monitoring for electrical boiler
| for sauna and some more.
| swiley wrote:
| Every time I go to use these I always run into weird show
| stopping bugs in the closed firmware.
|
| Maybe my expectations for microcontroller software are too
| high.
| shirleyquirk wrote:
| Can you elaborate? Ive been lucky so far but Id like to know
| what to look out for
| IgorPartola wrote:
| I am a huge fan of feeding this kind of info into Home Assistant
| via MQTT. It's a little convoluted since their data model is not
| what I expected it to be (each sensor has a device record, not
| the other way around), but overall I am able to read e.g. air
| quality measurements from around my house and create automations
| based on that.
|
| I used to get various telemetry read outs via email in the
| mornings and while they are nice they still require me to
| remember to read an email and more importantly to notice that an
| email is missing. A more positive feedback system is more secure:
| send me an alarm notification when something is wrong the one day
| a year that it is, not 364 notifications a year that everything
| is right.
| sathackr wrote:
| The issue with an alarm only when something is wrong, is that
| you don't know that your monitoring system is working until you
| actually get that notification. You could just check the system
| every day and avoid the 'heartbeat' email, but that's likely to
| be forgotten/missed more often than seeing/reading the received
| email.
|
| You could set up a monitoring system for the monitoring
| system...
| batch12 wrote:
| I do this in Splunk for some events. I alert for no events
| received within X period of time.
| IgorPartola wrote:
| HASS has the ability to send you alerts when a device/sensor
| is considered to be offline (so you could definite it as it's
| offline if it hasn't sent you an update in 28 hours or some
| such). You can also set it up to send you regular
| notifications too. Or you could just have this data in the
| dashboard and check it once in a while. Nothing really
| prevents you from doing all this but also utilizing a tool
| like that to WUPHF.com you soon as there is an issue.
| lostlogin wrote:
| Pingdom integration or similar may be an option. There are
| some very cheap or free options out there.
|
| Checking from outside is not ideal though as a network outage
| looks the same as a sinking, a leak or any other problem.
| Chris2048 wrote:
| > You could set up a monitoring system for the monitoring
| system...
|
| I'm considering this for a home automation system: a smaller,
| simpler device connected to the network, powered via battery
| (recharged from mains but surge protected) aka UPS, and able
| to send SMS messages via mobile network.
|
| The idea is it's a heartbeat/monitoring system for the
| essentials:
|
| - power cut/outage - network down/outage - main server down,
| or has some problem
|
| Then I can get an SMS telling me something's wrong.
| floathub wrote:
| Blatant self promotion, we do this at some scale:
|
| https://floathub.com
|
| And there's a guide to using our open source software-only option
| on a Pi:
|
| https://medium.com/@floathub/open-source-boat-monitoring-7ea...
|
| Contacting the author of the parent version now to compare notes
| :-)
| andrew_ wrote:
| I'd love to use this for overnight drops from the hi n dry. The
| one thing I didn't see mentioned is powering the unit with DC-
| only. I'm a PI newbie and I don't run an AC inverter on board.
| shirleyquirk wrote:
| Absolutely, and I certainly don't keep my inverter running
| when I'm not on board.
| floathub wrote:
| Super easy to power a Pi from DC only. Many (most) USB ports
| will work (the amperage draw can be a bit much for some older
| lighter-style USB power adapters).
|
| The power draw from our dedicated device
| (https://floathub.com/store) is much lower than a Pi, but you
| don't get the advantage of a general purpose computer that
| can run other stuff at the same time.
| andrew_ wrote:
| Appreciate the reply. It looks like there's a bunch of
| sensors I can hook up to the pi as well. Again, really
| appreciate you sharing this!
| lostlogin wrote:
| There are some great sensor options out there and they
| are dirt cheap (cents or a couple of dollars). ESP32 and
| ESP8266 are my chips of choice and they are also very
| cheap.
|
| Some great projects are easily achievable from Arduino.
| It seems to be slightly looked down on as a platform, but
| I'm not skilled enough to know why. It has an IDE and a
| language that's easy enough to use. There is also a huge
| community and a mass of projects out there. ESPHome is
| another excellent project which takes the coding down to
| just yaml config files and then you can makes automations
| one Home Assistant.
| walrus01 wrote:
| you can get really small dc-dc converters that are suitable
| for the power draw of a pi. Take input of 12, 24, 36, 48VDC,
| whatever, convert it to 5VDC and power the header pins of a
| pi.
|
| take a look in some of the subsections here:
| https://www.pololu.com/category/131/step-down-voltage-
| regula...
| FerretFred wrote:
| Is email the best option? I had a bunch of small servers that I
| dutifully monitored via email, until email stopped sending for
| whatever reason. I now use MQTT via a bash script: very reliable.
| whalesalad wrote:
| Email not sending is a good problem - it means someting is
| broken and you gotta look into it.
|
| Good thing about email is that it can be dismissed. It
| literally goes into an inbox where you are already looking at
| other things that need your attention - and then you can
| delete/archive when you see that everything is fine.
| walrus01 wrote:
| You can also do more complicated things on the receiving side
| of the email, with something like imapfilter (or just a
| thunderbird incoming mail rule on a desktop PC at your
| house), to auto sort alerts or notices of nominal condition
| into certain folders/subfolders.
|
| https://github.com/lefcha/imapfilter
| dataviz1000 wrote:
| I've had a novel idea from years ago. For the most part, there is
| no security on mega yachts. Moreover, they hire random people to
| wash them and maintain them. It's nothing to gain access to the
| all the electronics in the cave under the wheelhouse.
|
| So, the novel idea is this, a bunch of kids from MIT or CalTech
| or where ever decide to bug yachts. They get unassuming jobs as
| deckhands and stewards to give themselves time to install devices
| like this DIY boat monitoring system along with microphones
| behind all the panelling around the yachts which are owned by
| CEOs of major companies. More or less, the device caches all the
| audio recordings and waits for the ship to enter a marina where
| it connects to wifi and sends the information home. They are
| looking for stock trading information, mostly. They are in the
| Caribbean maybe in St. Martin and overhear some nasty things by
| the Russian mafia. Someone made a mistake and they get caught.
| That's the beginning. The rest of the novel is a bunch of nerdy
| kids having to MacGyver their way out of the Caribbean while
| being chased by the most powerful and dangerous people on Earth.
| lozaning wrote:
| A while back I got interested in sailing and paid for lessons
| on a Benetau 57. I was absolutely blown away by the ease with
| which one of these boats could be stolen.
|
| Granted anyone that has the time and money to actually learn
| how to sail the things is likely not in a position where boat
| heists have a great risk/reward.
| [deleted]
| throw0101a wrote:
| It's a bit of a thing:
|
| > _The group's modus operandi involved renting a yacht from a
| charter company with different passports in each case, paying
| all costs in cash, and then taking out the automatic
| identification system of the yacht and putting it in a remote
| control toy boat to make the renters think that the yacht was
| adrift in territorial waters. Meanwhile, the stolen yacht had
| already reached international waters._
|
| * http://theislander.net/member-of-yacht-robbery-group-
| arreste...
|
| Of course fencing a boat can be difficult, but I'm guessing
| they probably break it up for parts (engine, electronics,
| galley/kitchen, etc).
| Johnny555 wrote:
| If you're willing to get a fake job to plant a bug, why not
| pretend to be an office janitor and plant the bugs in the CEO's
| office and boardroom?
|
| You might even be able to hide it in the VoiP phone on his desk
| and steal both power _and_ network.
| batch12 wrote:
| Ha, at the beginning I read the word novel as new. I was
| getting a little disturbed by this until I read on to
| understand this was fiction. Wrong novel :). Embarrassingly,
| this took too long to realize...
| hnnnnnnng wrote:
| I interpreted it the same way but instead of being disturbed
| I searched for boat cleaning jobs and wondered how much the
| CIA and other intelligence agencies invest in bugging mega
| yachts.
| dataviz1000 wrote:
| Here is a popular list of available jobs.[0] The site
| started by listing day work jobs which means a job that is
| only day to day. The captain usually picks up the day
| workers in the morning who are crew between jobs and they
| sand the rails, varnish, clean bilges, wash the yachts, and
| detail the metal work. The site lists lots of other more
| permanent jobs too and is a popular resource for people in
| the industry.
|
| > "144192 5/4/2021 Yacht Looking for 8 day workers to wash
| and detail yacht on Monday May 10th. 8 hours. FT
| LAUDERDALE"
|
| That job probably pays $15 - $20 an hour cash under the
| table and the chef will make them all lunch. Not a bad gig
| job. 8 day workers? That's a lot, they wouldn't need that
| many people for 120 foot yacht[1]. The price of that yacht
| probably starts at something like $18,000,000. It would be
| a nothing burger to install anything on that boat with
| nobody noticing.
|
| [0] https://www.daywork123.com/JobAnnouncementList.aspx
|
| [1] https://www.denisonyachtsales.com/yachts-for-
| sale/?brand=&mi...
| nexuist wrote:
| You are not alone!
| walrus01 wrote:
| One question on this, how exactly is this ESP32 email library
| implemented? Because I think negotiating a TLS1.2 connection,
| might be beyond the abilities of an ESP32.
|
| You'd need your own 'friendly' email server that is expecting
| traffic from that specific IoT device, allowing outbound relay
| through it. One of the challenges of doing outbound SMTP from
| randomly located IoT devices is that due to weirdness of cellular
| or other uplinks, it might appear from a wide range of IPs.
|
| Normally if I have some old weird monitoring device on a network
| that needs to send unauthenticated SMTP outbound for alerting, I
| can give postfix an ACL for its specific static /32, but that
| can't be a good solution for something like this...
| avhon1 wrote:
| The ESP32 can negotiate TLS1.2, using, among other options,
| mbedtls.
|
| https://tls.mbed.org/api/
|
| > mbed TLS supports SSLv3 up to TLSv1.2
| walrus01 wrote:
| wow, well, tiny/cheap/low power stuff is certainly getting
| quite capable these days!
| japanuspus wrote:
| I have had a Lilygo T-Call [0] on my basement table all winter
| with the intention of building almost exactly this! (My idea was
| to use cellular instead of WiFi). Thank you very much for the
| write-up!
|
| [0]:
| http://www.lilygo.cn/prod_view.aspx?TypeId=50044&Id=1127&FId...
| coretx wrote:
| The author may want to consider using LORA as a backup for 3g/4g
| for connectivity as the use of jammers by thieves and burglars
| becomes more common as days pass.
| odonnellryan wrote:
| This is great. I will be on a mooring for the first time this
| year and it is very tempting to build something like this! But my
| boat will be close enough where I could almost look out my window
| to check on it. :)
| Johnny555 wrote:
| But will you be looking if the drain plug comes out at 2am and
| suddenly the only thing keeping the boat afloat is the bilge
| pump and the battery?
|
| Still seems like a good idea to have monitoring even if you can
| see the boat.
| samstave wrote:
| Still worth the attempt if youre going to be mooring anyway -
| just for fun.
| OldHand2018 wrote:
| Hey, if your boat is that close to you, skip the WiFi and send
| the daily report over marine VHF.
|
| In fact, if you decouple the delivery method from the report
| generation, you can have have it running even while under sail
| and do periodic data collection and logging. If you get a
| Marine SSB radio, you could even collect the data while
| crossing an ocean!
| yardie wrote:
| How would you send a report over VHF? From what I understand
| the only digital bands are DSC and AIS and that is broadcast
| only, anyone can listen in.
|
| SSB is not a set and forget communication. It's great for
| long distance communications but the operator has to be
| seriously fairly knowledgeable on how to make HF work. It's a
| 100W radio that can do some damage if used incorrectly.
| daniellarusso wrote:
| text to speech?
| johnnythunder wrote:
| Brilliant work, my initial thoughts are that it might be
| significantly less work to patch/seal/address the leaks in the
| hull than to engineer, build, install, monitor the electronics
| for this. Is this not the case?
| jdeibele wrote:
| https://99percentinvisible.org/episode/abandoned-ships/ just
| had an episode about ships where the crew is not able to get
| off for various reasons. One of them that I hadn't known was
| that if you leave before you get paid, you typically forfeit
| your pay.
|
| Connection to your comment: there was a huge explosion in
| Beirut. There were safety issues with a ship loaded with
| fertilizer. The port offloaded the fertilizer and let the crew
| leave. One consequence was the terrible explosion. The other
| was that before that the ship sank. Big ships are described in
| the podcast as needing constant maintenance to keep them from
| sinking, which is one of the reasons ports are reluctant to let
| the crew leave.
|
| Seems like it's similar for much smaller boats.
| rkangel wrote:
| It's a bit like saying "it's significantly less work to just
| fix the bugs than write unit tests".
|
| There are always bugs (leaks) and potential for bugs (leaks),
| some effort in both directions is usually a better use of time
| (and in this case, money).
| sathackr wrote:
| Something always leaks. If anything just the packings around
| the propeller shafts (though since this is a sailboat it may
| not have propeller shafts).
|
| And there is maintenance. Even if you seal up all of the leaks,
| something will always degrade and start leaking. If you are
| away from the boat for weeks at a time, you may find your leak-
| free boat on the bottom of the harbor.
|
| So yes, you could conceivably find and seal every single leak,
| especially if you don't have a rotating shaft that penetrates
| the hull, but it would not negate the need for monitoring.
| andrew_ wrote:
| Depending on the vessel, leaks are part of the design. Seals
| always leak. Salt water is highly corrosive and will always
| "find a way." I own a smallish boat on the Gulf of Mexico with
| outboards (lacking the shaft seals that inboard boats have) and
| water STILL finds a way into the bilge. I have three pumps, one
| main and two redundant, just in the event one of my scupper
| seals goes, something/someone strikes my boat hard enough to
| puncture the hull below the water line, or one of my through-
| hull fittings (like raw water pump) develops a leak, while the
| boat is out in the Gulf or sitting at the marina.
|
| Might seem like overkill where regular maintenance should be
| sufficient but you can never have too many redundancies to keep
| a boat afloat. Murphy's Law very much applies.
| krisoft wrote:
| These are not exclusive propositions. You fix/patch/seal any
| leak you know of and can fix and set up a pump to deal with the
| rest. And then you monitor both to check that the pump still
| operates and the leak rate did not increase.
| TYPE_FASTER wrote:
| Leaks can be intermittent, and hard to resolve. I had a job
| driving effectively a water taxi one summer. One customer was
| working with one of the local boat yards to fix a recurring
| leak. They eventually ended up rigging up an audible alarm,
| probably using a float switch or something. I was given a phone
| number to call if I heard it ringing, or just call the yard on
| the radio. They eventually figured it out.
___________________________________________________________________
(page generated 2021-05-06 23:01 UTC)