Accessing Dive Info on the UEMIS SDA

Please register or login

Welcome to ScubaBoard, the world's largest scuba diving community. Registration is not required to read the forums, but we encourage you to join. Joining has its benefits and enables you to participate in the discussions.

Benefits of registering include

  • Ability to post and comment on topics and discussions.
  • A Free photo gallery to share your dive photos with the world.
  • You can make this box go away

Joining is quick and easy. Log in or Register now!

UEMIS could have opened the standard and let other take care of the logging part and concentrate on the rest.

However as we now know they were not too forthcoming with info.

This is sadly what a lot of companies are completely missing (and not just dive computer makers). They need to understand where community development can help them reach more customers and add more features (dive log, visualization, connection to social networks). And where their own development needs to focus in order to provide differentiation (trimix and dive planning updates - which sadly it seems will never see the light of day).

Clearly UEMIS didn't get this at all.

Thankfully we were able to work around this - but this could easily have failed had UEMIS decided to require a cryptographic handshake with their server :-(

So in this sense we were rather lucky.
 
I am working on providing a web version of the parser...

I'm happy with whatever people want to do with it (which is why I put it under a permissive license). But I really want to see native version on the three main OSs. No offense to you, Scubacastor - but we don't want to replace one webservice that could disappear any moment (UEMIS) with another one (yours).

Still, all these different ideas will help us to create better infrastructure overall, and different people have different preferences when it comes to how they want their dive logging to work. Or (to prevent another response from Scott L), don't log at all...
 
Fore sure, I don't want to recreate the cloud stuff from UEMIS but since I personaly prefer to store my dives online than on my hard drives, I am developing stuff to keep my dives online and I am just willing to share the files for people who might want to do the same. The files and everything else (documentation of the format) will be available for download. Any person who owns a website will be able to pick the files and install it somewhere else or to simply use the webparser to work on their own files.

It's always better to have several options :) , that was what was missing with uemis.com
 
Please test if you are on a Mac or on Linux

I was able to get all this working on a Mac and on Linux. Windows is so far resisting my attempts.
If you have access to either a Mac or a Linux system, please help us improve the code. Sorry, this is command line based. You need to have curl and java installed.

Open a Terminal
Unpack the zip file below
A Mac binary is included - if you are on Linux, please just compile the sources (gcc -o parse_uemis parse_uemis.c)
Change into the LocalDownloadTest directory
Edit check-dives.sh and add your username and password for the uemis website as well as the path to the uemis USB filesystem (usually /Volumes/UEMISSDA)

Then run

sh ./check-dives.sh NR [NR ...]

(e.g., sh ./check-dives.sh 7 9 12 16 in order to check those four dives). The numbers are dive numbers on the SDA - the script figures out the matching dive IDs on the uemis website.

Afterwards you should have six files for each dive:
diveNNN.SDA divelogNNN.SDA diveNNN.xml divelogNNN.xml diveNNN.uemis.xml divelogNNN.uemis.xml

The .SDA files are the raw files extracted from the SDA
The .xml files are the result of running our parser against these files
The .uemis.xml are the corresponding files that we downloaded from the uemis website.

Using diff -w -u diveNNN.xml diveNNN.uemis.xml you can compare the results.
Similarly diff -w -u divelogNNN.xml divelogNNN.uemis.xml for the divelog files.

The files will not be identical, but should be good enough for import into divelog (please test). Here are the differences we know about:

diveNNN.xml:
- format of floats is not always consistent
- divesite information is missing (not extracted from SDA)
- gear information is missing (not extracted from SDA)

divelogNNN.xml:
- date_time item isn't parsed
- various pressures are mis-calculated
- mod and tcd in the gas section aren't parsed

if you find other inconsistencies (or want to help us by providing more sample data), please post all six corresponding files to the ScubaBoard thread: diveNNN.SDA divelogNNN.SDA diveNNN.xml divelogNNN.xml diveNNN.uemis.xml divelogNNN.uemis.xml

If you have problems with these files, please let me know.

View attachment LocalDownloadTest.zip
 
Windows binary

This may or may not work for you. In 25 years of being a software developer this is my first ever Windows program (no kidding). I had hoped to package the DLLs that you need with the binary in the zip file but it turns out that cygwin1.dll is too large. You can get this file here (http://65.23.157.151/cygwin1.zip) - please simply drop it in the same folder that you unpack the zip file below into.
That file below also includes the myuemis.jar for your convenience (same as in the previous post for Mac and Linux). You obviously need to have Java installed (this was tested on 64bit Win7 with the latest JRE from Oracle).

One oddity about using myuemis.jar - something goes wrong when setting paths. The only way I got this to work was to have my working directory on C: be the directory you unpack these files, then switch to the drive which is the UEMISSDA. And then run
java -jar C:myuemis.jar -fD: -d NR -o c:diveNR.SDA
java -jar C:myuemis.jar -fD: -s NR -o c:divelogNR.SDA


The parser is used just like on the real OSs - on the command line:

parse_uemis.exe diveNNN.SDA

one more oddity - occasionally it appears to add a random letter to the end of the file name. I'm sure I'm doing something wrong but couldn't figure it out. So I have it print out the file names of the input and output files to help you track what's what.

Finally, none of the fancy scripts I did for Mac/Linux. This is all manual at this point (packaging curl and figuring out how .BAT files work seemed overkill).

Same rules apply - please send the six corresponding files if you run into trouble.

View attachment uemis.zip
 
On my windows side, the alternate command line is (wherever you are in terms of drive and D: as the UEMISSDA drive)

java -jar myuemis.jar -f=\D:\ -d NR -o diveNR.SDA
java -jar myuemis.jar -f=\D:\ -s NR -o divelogNR.SDA
 
UEMIS.zip is coming up as corrupted zip on my XP machine - will try a Win7 Machine later.

This may or may not work for you. In 25 years of being a software developer this is my first ever Windows program (no kidding). I had hoped to package the DLLs that you need with the binary in the zip file but it turns out that cygwin1.dll is too large. You can get this file here (http://65.23.157.151/cygwin1.zip) - please simply drop it in the same folder that you unpack the zip file below into.
That file below also includes the myuemis.jar for your convenience (same as in the previous post for Mac and Linux). You obviously need to have Java installed (this was tested on 64bit Win7 with the latest JRE from Oracle).

One oddity about using myuemis.jar - something goes wrong when setting paths. The only way I got this to work was to have my working directory on C: be the directory you unpack these files, then switch to the drive which is the UEMISSDA. And then run
java -jar C:myuemis.jar -fD: -d NR -o c:diveNR.SDA
java -jar C:myuemis.jar -fD: -s NR -o c:divelogNR.SDA


The parser is used just like on the real OSs - on the command line:

parse_uemis.exe diveNNN.SDA

one more oddity - occasionally it appears to add a random letter to the end of the file name. I'm sure I'm doing something wrong but couldn't figure it out. So I have it print out the file names of the input and output files to help you track what's what.

Finally, none of the fancy scripts I did for Mac/Linux. This is all manual at this point (packaging curl and figuring out how .BAT files work seemed overkill).

Same rules apply - please send the six corresponding files if you run into trouble.

View attachment 98808
 
Weird - seems to work here. Just in case, I put a new zip file at the same server: http://65.23.157.151/uemis.zip

That zip file has been tested...

UEMIS.zip is coming up as corrupted zip on my XP machine - will try a Win7 Machine later.
 
Today I did the real test. After a couple of great dives in Hoodsport, WA, I disconnected my laptop from the Internet (to make absolutely sure that nothing in this process needed access to the site), connected the UEMIS, extracted and parsed the dives, imported them into Diveinglog and everything came out perfectly.

Thank you, UEMIS - I don't need your stupid portal with its annoying Flash based dive log software anymore.
 

Back
Top Bottom