Boat monitoring with Android and ebay bits

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,257
Location
Hopefully somewhere warm
Visit site
Well, that was a successful evening :cool:

Briefly ...
Extremely accurate little 4 channel volt meter electronics board is attached to the batteries, ads1115.
It talks to a little esp8266 microprocessor which has wifi.
An android tablet is running an app called Termux which is basically Linux, this is running a sort of graphical programming language called node-red.
Node-RED says hello to the esp8266 over wifi once a second and it gets this it sends back the voltage which node red stores in a file on the tablet with the time.
YAY! :)
Should work fine on a mobiles phone as well, if online then node red is really powerful, add some thermometers if it gets too cold send an email, tweet once an hour with anything interesting.

If anyone is actually interested I could post some code tomorrow.

Node red is free on the web for a play around, Google node red Fred.


http://nodered.org
https://en.m.wikipedia.org/wiki/ESP8266
http://www.ebay.co.uk/p/Ads1115-I2c-ADC-Module-4-Channels-Pro-Gain-Arduino-Esp8266/1970121841
 

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,257
Location
Hopefully somewhere warm
Visit site
Or spit it out for anything attached to the same network to se on a web page :cool:

Solar kicking in nicely!

gM7JEr4.png
 

matthew99

Member
Joined
18 Feb 2005
Messages
69
Visit site
Hi, Can this break out of a WiFi network?, ie. Can you access your node-red (effectively a server) tablet from home to get hold of the data, assuming it has a data SIM. Or will the tablet always have to collect the data and push it out.

I'm really thinking here of Home monitoring whilst on holiday.
 

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,257
Location
Hopefully somewhere warm
Visit site
Hi, Can this break out of a WiFi network?, ie. Can you access your node-red (effectively a server) tablet from home to get hold of the data, assuming it has a data SIM. Or will the tablet always have to collect the data and push it out.

I'm really thinking here of Home monitoring whilst on holiday.
You should be able do that , using emails, or tweets or another message service called mqtt. The esp8266 could talk to a marina wifi network but node red just makes the programming so much easier. WIth mqtt it should be too hard to set up 2 way communications from anywhere over the net.
Also, might be possible to save all the data to a file in dropbox so you can get to it anywhere.


Edit:Sending tweets works.
 
Last edited:

affinite

Well-known member
Joined
2 Feb 2005
Messages
1,239
Location
Eastern Med
Visit site
Well, that was a successful evening :cool:

Briefly ...
Extremely accurate little 4 channel volt meter electronics board is attached to the batteries, ads1115.
It talks to a little esp8266 microprocessor which has wifi.
An android tablet is running an app called Termux which is basically Linux, this is running a sort of graphical programming language called node-red.
Node-RED says hello to the esp8266 over wifi once a second and it gets this it sends back the voltage which node red stores in a file on the tablet with the time.
YAY! :)
Should work fine on a mobiles phone as well, if online then node red is really powerful, add some thermometers if it gets too cold send an email, tweet once an hour with anything interesting.

If anyone is actually interested I could post some code tomorrow.

Node red is free on the web for a play around, Google node red Fred.


http://nodered.org
https://en.m.wikipedia.org/wiki/ESP8266
http://www.ebay.co.uk/p/Ads1115-I2c-ADC-Module-4-Channels-Pro-Gain-Arduino-Esp8266/1970121841

Have you plumed this into Pi/Openplotter yet?
I have to admit to be a little lost now with OP. V0.9
I know that OP now includes NodeRed but it doesnt mean much to me
 

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,257
Location
Hopefully somewhere warm
Visit site
Have you plumed this into Pi/Openplotter yet?
I have to admit to be a little lost now with OP. V0.9
I know that OP now includes NodeRed but it doesnt mean much to me

Agree about openplotter v0.9. I've gone over to it and it's working but it seems a major change of direction from 8 with signalk being at the very core . There's still a working copy of v0.8 on an SD cd ready to roll for nav back in the real world. :)

Not had the xperia tablet node red talking (or mainly listening) to the Pi yet but definitely on the cards. Node red is perfect for the likes of me who can't sort of get some code working with tweaking cut and pasted code but it's so much easier. Javascript just makes my head hurt.
NodeRed is basically drag and drop plumbing , taking any data source like something from wifi or a serial port then messing with it and spitting it out somewhere else.
Well worth a play if you enjoy that sort of thing :cool:

https://fred.sensetecnic.com/
 

matthew99

Member
Joined
18 Feb 2005
Messages
69
Visit site
You should be able do that , using emails, or tweets or ahnother message service called mqtt. The esp8266 could talk to a marina wifi network but node red just makes the programming so much easier. WIth mqtt it should be too hard to set up 2 way communications from anywhere over the net.
Also, might be possible to save all the data to a file in dropbox so you can get to it anywhere.

Thanks for the information. I think this solution relies on the tablet (running node-red) sending out regular messages, tweets or the data encoded in Mosquito. I was hoping the remote user could send requests to the tablet (node-red) and pull up the console in his browser. I know this works locally on the intranet but didn't know if you had found a way of doing this on the internet.
 

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,257
Location
Hopefully somewhere warm
Visit site
Thanks for the information. I think this solution relies on the tablet (running node-red) sending out regular messages, tweets or the data encoded in Mosquito. I was hoping the remote user could send requests to the tablet (node-red) and pull up the console in his browser. I know this works locally on the intranet but didn't know if you had found a way of doing this on the internet.
I know mqtt works to trigger actions in openplotter so should be same in node-red but that would only cover predefined actions, you could probably get much deeper in with Port forwarding but never done that no don't know anything about the nut really. Node red should easily cope with any number of keywords in emails or tweets once set up, like "turn on the fridge" then with a tiny bit of code it could email you back "your beer shall be cold upon your arrival, sir" :)
 

st599

Well-known member
Joined
9 Jan 2006
Messages
7,259
Visit site
MQTT is pretty easy to play with. You have a server sitting somewhere, Raspberry Pi at home.

You then have low power nodes that connect to it. They can either send data to message queues e.g.

/boat/electrics/batteries/1/voltage 12.34
/boat/electrics/fridge/power on

And other nodes can subscribe and receive messages either for specific queues, or for wildcards like

/boat/electrics/*

It's really easy to include in code for visualising, write all messages to a database etc.
 

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,257
Location
Hopefully somewhere warm
Visit site
MQTT is pretty easy to play with. You have a server sitting somewhere, Raspberry Pi at home.

You then have low power nodes that connect to it. They can either send data to message queues e.g.

/boat/electrics/batteries/1/voltage 12.34
/boat/electrics/fridge/power on

And other nodes can subscribe and receive messages either for specific queues, or for wildcards like

/boat/electrics/*

It's really easy to include in code for visualising, write all messages to a database etc.
Openplotter Pi image has a dedicated tab to set up mqtt, will send any nmea or signalK data.
 

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,257
Location
Hopefully somewhere warm
Visit site
Next step, the node red bit ported straight across to windows 10 no problem so should be as easy getting it in the Pi running openplotter, then turn it into a signalk string.

Shame signalk hasn't been well supplied with many good ways to view it yet, there's an apple app looks quite nice but the couple I've tried on Android seemed a bit clunky.

Next on the cards as well is to wire up an instrument opamp off eBay to the battery monitor shunt and see how accurate amps in/out can be measured, that would be a great addition :cool:
all for a few quid..
 

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,257
Location
Hopefully somewhere warm
Visit site
Hi, Can this break out of a WiFi network?, ie. Can you access your node-red (effectively a server) tablet from home to get hold of the data, assuming it has a data SIM. Or will the tablet always have to collect the data and push it out.

I'm really thinking here of Home monitoring whilst on holiday.

Having another play around this morning..

thinger.io has been easy to set up , and took seconds on a tablet.

So graphing every second , just a random number for now but should be easy to get other data in there. And a switch to turn on and off the esp8266 in built LED. Looking hopeful for easy cheap web monitoring with little power.

Qay9NSF.png
 

Murv

Well-known member
Joined
14 Nov 2012
Messages
2,122
Location
Kent
Visit site
I really, really wished I understood a word of this!
I have a raspberry pi, but only used it as a media player so far. The intention was to learn to use it to monitor the boat or integrate with nav gear but just haven't got that far yet.
Do you have any links for recommended reading for absolute newbies? (And I do mean newbie, think of trying to explain it to a 2 Year old!) or do you have to have a certain level of programming knowledge first?
 

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,257
Location
Hopefully somewhere warm
Visit site
I really, really wished I understood a word of this!
I have a raspberry pi, but only used it as a media player so far. The intention was to learn to use it to monitor the boat or integrate with nav gear but just haven't got that far yet.
Do you have any links for recommended reading for absolute newbies? (And I do mean newbie, think of trying to explain it to a 2 Year old!) or do you have to have a certain level of programming knowledge first?


Openplotter is a download which you can burn onto a sd card and will make the Pi (which model?) into a powerful nav & boat monitoring computer, no real programming involved , pretty easy to set up.

https://www.gitbook.com/book/sailoog/openplotter-documentation/details
http://www.sailoog.com/en/blog/download-openplotter-rpi-v080-noobs
 

Murv

Well-known member
Joined
14 Nov 2012
Messages
2,122
Location
Kent
Visit site
Openplotter is a download which you can burn onto a sd card and will make the Pi (which model?) into a powerful nav & boat monitoring computer, no real programming involved , pretty easy to set up.

https://www.gitbook.com/book/sailoog/openplotter-documentation/details
http://www.sailoog.com/en/blog/download-openplotter-rpi-v080-noobs

Wonderful, thanks for that :)
Shamefully, I can't even remember what model it is, but it's a fairly recent one, it has the wifi and BT built in
 

agurney

Active member
Joined
10 Jun 2009
Messages
1,518
agurney.com
I really, really wished I understood a word of this!
I have a raspberry pi, but only used it as a media player so far. The intention was to learn to use it to monitor the boat or integrate with nav gear but just haven't got that far yet.
Do you have any links for recommended reading for absolute newbies? (And I do mean newbie, think of trying to explain it to a 2 Year old!) or do you have to have a certain level of programming knowledge first?

It's not trivial, but if you know what you want to do then in many cases you can take existing code and tweak it to suit your purposes.

I set up a system last season that ran a RPi on the boat with temperature & pressure sensors and webcam; it periodically took a photo and collected the measurements and sent them to a RPi at home that also runs my weather station, solar panels and a web server - http://agurney.myftp.org/aisling/

At some point over the next month or so I'll be digging the gubbins out of storage and updating it, at which point I'll try and write up what I've done, from connecting the sensors, setting up the periodic tasks, to connecting to a machine that's behind a public or marina wifi .. I don't know if it will be appropriate for a 2 year old, but I'll see what I can manage.
 

Murv

Well-known member
Joined
14 Nov 2012
Messages
2,122
Location
Kent
Visit site
Pi3 then, plenty fast enough :cool:

That's the one! Good news then :)

It's not trivial, but if you know what you want to do then in many cases you can take existing code and tweak it to suit your purposes.

I set up a system last season that ran a RPi on the boat with temperature & pressure sensors and webcam; it periodically took a photo and collected the measurements and sent them to a RPi at home that also runs my weather station, solar panels and a web server - http://agurney.myftp.org/aisling/

At some point over the next month or so I'll be digging the gubbins out of storage and updating it, at which point I'll try and write up what I've done, from connecting the sensors, setting up the periodic tasks, to connecting to a machine that's behind a public or marina wifi .. I don't know if it will be appropriate for a 2 year old, but I'll see what I can manage.

Wonderful, thanks for that :)
Of course, I don't need any of this stuff, but I adore gadgets and the idea of learning something new and if it can provide a useful function at the same time, then why not!
What about something like a bilge pump counter, could something be set up to monitor how frequently a pump is running? I have plenty of ideas for things I'd like to do, multiple temperatures monitoring could actually be very useful for example, and the idea of being able to glance at the engine bay from the comfort of an armchair is very appealing!
 

agurney

Active member
Joined
10 Jun 2009
Messages
1,518
agurney.com
Wonderful, thanks for that :)
Of course, I don't need any of this stuff, but I adore gadgets and the idea of learning something new and if it can provide a useful function at the same time, then why not!
What about something like a bilge pump counter, could something be set up to monitor how frequently a pump is running? I have plenty of ideas for things I'd like to do, multiple temperatures monitoring could actually be very useful for example, and the idea of being able to glance at the engine bay from the comfort of an armchair is very appealing!

Do a search for I2C on eBay and let your mind wander .. there are power sensors, GPS chips, pressure, humidity and temperature sensors, gyroscope to replace your gravity powered clinometer, LCD displays, and more, several of which are less than a pound including postage from China .. and then there's the USB stuff, such as webcams, SDR.

So, for your bilge pump, you could: count how often it is on, what its current draw is, measure how long it is on for, compare past results to see if there's a change, compare when the pump's working with your rain gauge to see if the rain's getting in .. alternatively you could measure the resistance (salinity) of the bilge water to identify the source of the water ... and so on ad nauseum :)
 
Top