I would like to download the body data from notehub into a csv file or similar. I am sure this is not the best way to get the data but I am pretty green with Blues and was looking for a simple method to get the data.
You can always manually download event data in JSON format using the “Download” button that appears in the top-right corner of the Events tab in your Notehub project.
However, the best practice is to route your data to another cloud endpoint as it comes in (or even manually through the Notehub UI if needed).
Thank you Rob,
I used the download button before I posted my question. How is the json data opened? When I open it it opens in visual studio and is one long line. I would like to be able to collect the body data (sensor readings) in a single column and open it in say, Excel. I will get to utilizing cloud services soon but right now my brain is black and blue from setting up twilio and I don’t want to go off on another journey right now. If I can easily grab the data manually, I can get to work geting the first controllers installed in the field and work on data presentation later.
Thank you for your help.
EDIT: I got it opened in excel but the body is just showing up a “record” . I see the date is unix time.
I just tried this online “JSON to CSV/Excel” converter and it worked surprisingly well!
Thank you Rob.
You are right on top of this. I appreciate your help. Can I ask another question?
Of course! Ask away…
Let me know if this question requires a new thread.
I have outlined three main general tasks I need to complete in order to begin deploying into the field. (These system are all owned by me so there are no clients.) With help from the forum and your help, I have completed two of the tasks. The last thing I need to do is learn how to send a command to the notecard. I have explored environment variables and have that aspect working satisfactorily. As a general example of what I need to do consider the on-board LED on the swan. I would like to send a message that issues a one-time command to blink the LED one time or a one-time comand that turns the LED on and then send another command that turns the LED off. Environment variables do not seem well suited for this task and I don’t think twilio accommodates two-way communication. I reviewed the Valve-Monitor accelerator but that example goes well beyond my knowledge and immediate need. Could you please let me know if there is a simple way to accomplish this task and if so, point me in the right direction?
Thank you Rob,
I actually think environment variables are very well suited to this task! In the on/off scenario, you could:
- Set an environment variable in Notehub, provide some arbitrary name like
onand set it to
- In your firmware, depending on whether this is battery powered or not, you could use the
sync:trueargument in your hub.set request which will very quickly sync any environment variable changes to your device(s). (Or if you’re battery powered you’ll likely want to wait for the next periodic inbound sync to retrieve env var changes.)
- Use the env.get API to read the value of the
onenv var, and enable/disable the LED as needed.
Let me know if that doesn’t make sense!
You are right. Thank you. I overlooked that possibility.
You’re pretty good at this Rob.