Pebble smartwatch app for boats

I really should get on and write some instructions so people can try out the current version. It still needs some tidying up, but the basic functionality seems to work. I'll see what I can do...

Dear Cardo,

I saw something about a different smart watch, please do not discard the pebble idea!
I would really like to try your setup, as i FINALY (as of yesterday) have a Pebble watch...

I am more than happy to contribute to the beer/cruising fund, just tell me where and when!

Best regards
Asle
 
Dear Cardo,

I saw something about a different smart watch, please do not discard the pebble idea!
I would really like to try your setup, as i FINALY (as of yesterday) have a Pebble watch...

I am more than happy to contribute to the beer/cruising fund, just tell me where and when!

Best regards
Asle

The Pebble version has sadly been discontinued as I got fed up with it not working well with iOS. In future we will be releasing a similar app for the Apple Watch.

However, the version of Pebble Boat Remote that we got up to does work, even if it is a little rough around the edges, so we have made it available. You will need some knowledge of computing to get the server app working, but we have provided instructions that should hopefully help.

The project is open source and anyone can feel free to pick it up and run with it.

The page we've knocked up for it is...
http://www.codewithasmile.co.uk/boat/boat-remote/

Good luck!
 
I'm very interested in this effort too. I've looked at your Pebble watch and server components. I already have vyacht (linux server) multiplexing the NMEA data and broadcasting the NMEA stream over TCP/IP. This is easily used by iNavX, iRegatta, SeaNav and others. Essentially, that works kinda like the Boat Remote server on the Pi; however, it looks to me that the Boat Remote server goes a bit further and digests the NMEA data into mini data structures. Then, the Boat_Remote.pbw listens for this data and sends to the Pebble watch.

Do I understand this correctly? Or, does the server just multiplex and broadcast the full NMEA data and the Boat_Remote.pbw digests the data and sends to the watch? If not, I'd like to figure a way to get the server component to work on my vyacht box. I'm hoping the data can be output to a different port, so I keep the raw NMEA data for the nav apps and the digested/summarized data for the Pebble.

I would appreciate any further into/help on making this work. This is a fantastic idea and ties together all this technology and makes the boat data readily available via the watch. This is the missing piece!
Thanks
 
I'm very interested in this effort too. I've looked at your Pebble watch and server components. I already have vyacht (linux server) multiplexing the NMEA data and broadcasting the NMEA stream over TCP/IP. This is easily used by iNavX, iRegatta, SeaNav and others. Essentially, that works kinda like the Boat Remote server on the Pi; however, it looks to me that the Boat Remote server goes a bit further and digests the NMEA data into mini data structures. Then, the Boat_Remote.pbw listens for this data and sends to the Pebble watch.

Do I understand this correctly? Or, does the server just multiplex and broadcast the full NMEA data and the Boat_Remote.pbw digests the data and sends to the watch? If not, I'd like to figure a way to get the server component to work on my vyacht box. I'm hoping the data can be output to a different port, so I keep the raw NMEA data for the nav apps and the digested/summarized data for the Pebble.

I would appreciate any further into/help on making this work. This is a fantastic idea and ties together all this technology and makes the boat data readily available via the watch. This is the missing piece!
Thanks

The Boat Remote Server part of the software is not an NMEA multiplexer. What Boat Remote Server does is take an NMEA feed, for example from your multiplexer running on the vyacht and converts it to a format the Pebble understands, in this case JSON. Ideally we wouldn't need Boat Remote Server, but unfortunately the Pebble is extremely limited in what it can read without the help of a companion app on the phone.
If you use the anchor watch feature, the GPS location is also stored by Boat Remote Server.

If your vyacht box is a linux server and you have CLI access to it, you should be able to run Boat Remote Server on it alongside the multiplexing software. The output port from Boat Remote Server is configurable in the settings, by default it is 8082 and should not conflict with an NMEA server.

In my case, my Pi runs an NMEA multiplexer (Laika's Kplex) and Boat Remote Server. I can pick up NMEA data from Kplex on my laptop, instruments, etc. and the Pebble picks up the JSON formatted data from Boat Remote Server.
 
The Boat Remote Server part of the software is not an NMEA multiplexer. What Boat Remote Server does is take an NMEA feed, for example from your multiplexer running on the vyacht and converts it to a format the Pebble understands, in this case JSON. Ideally we wouldn't need Boat Remote Server, but unfortunately the Pebble is extremely limited in what it can read without the help of a companion app on the phone.
If you use the anchor watch feature, the GPS location is also stored by Boat Remote Server.

If your vyacht box is a linux server and you have CLI access to it, you should be able to run Boat Remote Server on it alongside the multiplexing software. The output port from Boat Remote Server is configurable in the settings, by default it is 8082 and should not conflict with an NMEA server.

In my case, my Pi runs an NMEA multiplexer (Laika's Kplex) and Boat Remote Server. I can pick up NMEA data from Kplex on my laptop, instruments, etc. and the Pebble picks up the JSON formatted data from Boat Remote Server.
I figured that's the purpose of Boat Remote Server. I'm looking into whether vYacht can host the Boat Remote server w/python. It looks like Boat Remote Server will listen for NMEA data on NMEA_HOST and NMEA_PORT and output the JSON on HTTP_HOST and HTTP_PORT. It sounds like I just need to make the proper settings and this should work. I'll look at both source codes further and sort out what I need to do to get Boat Remote Server to run on vYacht. This sounds very promising!!
 
Last edited:
Progress of sorts - before trying to install Python and boat_remote_server on my boat's RT3050 Carambola wifi device, I thought I would first experiment with my Windows PC laptop. I believe I have everything setup properly and boat_remote_server appears to be working. My wireless input NMEA data is 192.168.1.1:9990; my laptop wireless is 192.168.1.22 w/gateway 192.168.1.1 connected to wireless server; my iPhone is 192.168.1.14, also w/gateway 192.168.1.1 connected to wireless server. On the laptop, when I open the browser to 192.168.1.22/watch, I see the JSON data, {"boat_speed":"~","wind_speed":"~",.....,"lon":"-xxx\u00b...W",xxx"lat":"xxx\u00bxxxN",....} (xxx's replace lat/lon numbers). This tells me that boat_remote_server is fetching the data from my GPS and outputting JSON to the boat_remote_server local machine.

Note, I only have GPS data, not wind, depth, speed, etc. available in the NMEA data.

There's a problem with both the boat_remote_server throwing errors and the Pebble either unable to connect or crashing (both seem to be occurring). I believe the problem is due to my not having all the required NMEA data, e.g., wind_speed, btw, temp, drift, wind_angle, wpt_lon, wpt_lat, xte, waypoint, distance_reset, and dtw, e.g., "~".

The error in boat_remote_server, line 65, in do_GET self.wfile.write(data), UnboundLocalError: local variable 'data' referenced before assignment.

Is there an initialization missing that can easily be added to the JSON data? Alternately, perhaps I need to set default values instead of "~". I may look at more tomorrow.

Thanks in advance for help,
Don
 
Well having built my own Arduino based boat monitor which updates my website via GPRS , this thread inspired me to go and read up on JSON. As there is a commercial JSON reader app for Pebble it was simply a matter of getting my system to respond in JSON format. So.....

regal2250_2.jpg


Feeling very pleased with myself!
 
Well having built my own Arduino based boat monitor which updates my website via GPRS , this thread inspired me to go and read up on JSON. As there is a commercial JSON reader app for Pebble it was simply a matter of getting my system to respond in JSON format. So.....

regal2250_2.jpg


Feeling very pleased with myself!

Both this and the Pebble app are pretty cool. could you tell me more about your boat monitor. ;) :confused:
I am a Computing student and i'd love to play around with this however I'm not to knowledgable about NMEA.
How are you getting a reading from the battery? and Are you getting a data input from the instruments directly or are you doing this with the arduino some how?
 
Last edited:
Hi,

I am afraid it is nothing as sophisticated as an NMEA solution. The Arduino simply collects the information itself. The battery voltage comes from a simple divider resistor pair which reduces the voltage range to 0-5volts so the on-board A/D converter can give a voltage value and the Temperature/Humidity is read from a DHT22 sensor.

These readings are sent via the GSM modem as parameters to an HTTP command to my website.

My website runs a script which takes the HTTP parameters and writes them into a MySQL database. Once there I can then manipulate them as required. For the website itself I use "Google Gauges" to read and display the database. For the Pebble I use another script to present the information in JSON format. There is then a public app called "Pebble Cards" that can read JSON.

b2ap3_thumbnail_Drawing1.jpg


The write up of the whole project is appearing here (see link below)...however this has revealed a bug on the webserver software that exposes a capability to run scripts from the web front-end so the write up has bits missing at present whilst the developers of the web package furiously delve into their code!

http://www.sportsboat.org.uk/index.php/our-boat/news/entry/boat-monitor-full-write-up
 
Hi everyone,
Building on Cardo's amazing effort to date, I'm trying to get the boat remote server to work with Pebble watch. Does anyone have this working? On the iPhone, the boat remote app fails with "Check your internet connection and try again". My iPhone wifi is turned on and connected via wifi network to the server running the boat-remote server python script. I get the same failure if I turn off iPhone wifi. Apparently, the boat-remote app needs to have an internet connection (or a DNS server?). I'm not sure what is causing this problem and/or how to resolve.

Some details,

I'm broadcasting NMEA 0183 data using vYacht wifi router, multiplexer, with IP address 192.167.10.1 / 2947. Using Putty, I can see the NMEA sentences broadcast from vYacht.

For testing, I setup Windows 7 laptop with a "hostednetwork". Essentially, this creates a wifi hotspot, which I can broadcast the boat-remote-server JSON data. When the hostednetwork startss up, a new wireless network is created with IP address 192.168.137.1. On the laptop, open a browser to http://192.168.137.1:8020/watch, I see the JSON data,

{"boat_speed": "0.0 kts", "wind_speed": "5.8 kts", "btw": "224\u00b0", "distance_total": "~", "temp": "18.6 C", "sog": "~", "drift": "~", "wind_angle": "26 S", "lon": "~", "depth": "~", "wpt_lon": "", "xte": " N", "waypoint": "1", "cog": "~", "distance_reset": "~", "lat": "~", "wpt_lat": "", "dtw": "24.30 N", "heading": "054\u00b0"}

Moving to the iPhone; connect the iPhone to the hostednetwork, enter the security key, etc.., the iPhone has a wireless network with a DHCP IP addreess of 192.168.137.32. On the phone, entering the same URL, http://192.168.137.1:8020/watch, I see the same JSON data.

Additionally, the boat-remote-server displays a log message each time a request for data is made.

This tells me a lot. First, the boat-remote-server is receiving and parsing the NMEA 0183 data. Second, the hostednetwork publishes the disgested JSON data. Third, the iPhone Safari browser can request and display the JSON data.

It seems that the problem is the boat-remote Pebble app is trying to connect to the internet. Since it can't, it fails and displays "Check your internet connection and try again". On the Pebble side, the boat-remote app also fails with "Oh-no App-Crahsed | Boat Remote | Press any button".

Do we need to recompile the boat-remote Pebble app? Are there any changes needed to prevent the app from checking for an Internet connection? Any way to keep this from crashing on the Pebble?

I very much would like to see this work. Anyone have this working or can shed some light on what's going on and possibly how to fix?

Thanks
Don
 
Also, it is interesting that the JSON data doesn't pickup my NMEA 0183 longitude/latitude.

{"boat_speed": "0.0 kts", "wind_speed": "5.8 kts", "btw": "224\u00b0", "distance_total": "~", "temp": "18.6 C", "sog": "~", "drift": "~", "wind_angle": "26 S", "lon": "~", "depth": "~", "wpt_lon": "", "xte": " N", "waypoint": "1", "cog": "~", "distance_reset": "~", "lat": "~", "wpt_lat": "", "dtw": "24.30 N", "heading": "054\u00b0"}

Since this is on the boat-remote-server side, I can probably diagnose and fix this:)
 
Progress of sorts - I dummy'd up the boat_remote_server.py code to read a NMEA text file so I could test this at home. As mlines suggested, using a private IP address solved the problem of the iPhone, Pebble watch attempting to connect to the Internet. I also see latitude and longitude, so I'm not sure why these didn't come across on the boat. The parsing code seems OK.

However, the Pebble app on the watch keeps crashing . I'm thinking that it needs to be recompiiled with the latest SDK. I'll try that next.
Don
 
My Raymarine plotter transmits everything one needs to either Android or iPhone app. It would be great to selectively use this wi-fi data to show things on a Pebble. Is this possible?

TudorSailor
 
OK, finally got this project to work. Here are the changes I've made,

1) boat_remote_server.py - MyHandler - added elif(path=="favicon.ico"): ....
*** Need to ignore the icon. This may be because I'm using a Windows 7 to host the python pages ***
2) helper_function.py - format_latitude and format_longitude, added abs() around the degrees.
*** The Pebble display shows N/W, or E/W, so the sign is not needed ***
3) When setting the host server, I added "http://" to the IP address.
*** There is code to check and add the http:// to the URL; however, I decided to add this and voila - the Pebble app now works. I may try to figure out why the logic isn't working.
4) I recompiled using cloudpebble.net
*** I"m not sure if this was needed, but I was getting lots of Pebble errors before recompiling.

I would like to add AIS to this, now that it is basically working! Next, to retry on the boat and verify the display and missing(?) lat/lon.
Don
 
Top