opening Heartmath emwave2 database

Inspired by Dave Asprey's bulletproofexec post on the Heartmath emwave2 I decided to get one.

I found the device great to quantify meditation/mindfulness sessions. However the software is really limited, so I started to look around the harddrive for the data.It turns out you can find your emwave results stored in a sqlite database file in My Documents\emWave\emwave.emdb.

So I wrote an R script that is able to read directly that database and enhance the analysis from the emwave software. The code is on my github repository.

output from hrvsummary()

The aim is to allow a user to run his own ad-hoc analysis on his data in R and add some of the analysis functions also found in Kubios. If you are alaready familiar with Kubios, in the meantime you can export the emwave data as ascii files with the function hrvexport() found in my R script and then import these in Kubios.

Rating: 
Average: 3.5 (68 votes)

Comments

<p>Fehler in sqliteExecStatement(conn, statement, ...) : <br />&nbsp; RS-DBI driver: (error in statement: no such table: PrimaryData)</p>

Hi Martin, thanks for your interest.

the current script works only for the emwave version 2.x software.

Heartmath "upgraded" their emwave software to 3.x to include "HeartCloud" so they can grab your data, you don't actually gain anything substantial in the "upgrade". And to make matters worse, I noticed 3.x crashing while recording a session.

The database file is still there but the tables names have been changed. I will try to include an update on the script but I would recommend to downgrade and stay on version 2.x for now.

<p>Do you have a link to any of the 2.x versions, I simply cannot find any.&nbsp;</p>

<p>This is very cool, thank you for sharing your work. Do you know if R could be used to do real time analysis of the emdb database? I would like to perform calculations based on my heartbeat data as it is captured....still learning R...thank you</p>

Hi Jeb,

I doubt the emwave software writes to the database file while it is recording a session. I would have to verify that. If it does not write in real time then one would have to get the data directly from the USB port and pipe that to R. That would be great to completely avoid using the emwave software and the underlying Windows OS.

If you are using linux you can see the realtime output from the device by running the command: hexdump -Cv /dev/usb/hiddev1

00000050  75 00 00 ff 00 00 00 00  75 00 00 ff 01 00 00 00  |u.......u.......|
00000060  3d 00 00 00 00 00 00 00  32 00 00 00 01 00 00 00  |=.......2.......|
00000070  66 00 00 ff 00 00 00 00  66 00 00 ff 01 00 00 00  |f.......f.......|
00000080  35 00 00 00 00 00 00 00  37 00 00 00 00 00 00 00  |5.......7.......|

Now it's a question of interpreting the raw bytes..

<p>The connections seems not to work anymore. May you have an upgrade for the 3rd version?</p>
<p>&nbsp;</p>

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.