Author Topic: Dashboard NOOB help  (Read 4378 times)

brohan

  • Jr. Member
  • **
  • Posts: 59
Dashboard NOOB help
« on: June 11, 2016, 09:09:01 am »
Hello everyone.

For the last year or so my son and I have fiddled with the Spark, and more recently, began working on some of the Oak tutorials (we each have one with a breadboard).  We are not hardcore, but rather tinker in our free time together.

I read the announcement, and have logged into the dashboard. Now what. I am clueless as to what to do with the dashboard. Is there a tutorial / instructions / introduction somewhere that we can learn from?

Thank you.

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: Dashboard NOOB help
« Reply #1 on: June 11, 2016, 06:06:28 pm »
The freeboard platform that it is based on does have a tutorial if you create a free account there, but there are probably some youtube videos or guides around as well.

First thing you need to do is login with your particle credentials so the dashboard has access to the device events and logs. You then bookmark that page so you can get it back again, or save it as a local file somehow... haven't figured how that works just yet... probably just save the file in your browser, rather than the save to file option on the page (I think that just saves dashboard layout as a file).

In a nutshell, if you have your Oak publishing events (such as tempC in my case), you add a datasource at the top left, specify the type of event (Particle Event), give it a name (i.e. Temperature), specify you want it from your devices or from the public events group, and then specify the event name (tempC) and data type (NUMBER). This basically sets up your data source for use as a widget / gauge on the dashboard. You then click on the add pane link, and a little box appears with a plus, a wrench and a bin icon. You click on the '+' icon, and it asks what type of widget you want. I chose text, and then to fill in the 'value' box, I clicked on datasource link on the right, and then clicked on "Temperature"  > "tempC"  > "data". I set the units as 'C', changed 'include sparklines' to yes to see what it did, and saved it. Next time my Oak published a tempC event, it appeared on the dashboard. I then hit the '+' icon again, and added a gauge widget with the same value/datasource so I got some more visual :)... that's as far as I've gotten so far... hope that gives you some idea what to do!  ;D  ;D






brohan

  • Jr. Member
  • **
  • Posts: 59
Re: Dashboard NOOB help
« Reply #2 on: June 11, 2016, 08:30:27 pm »
Thank you for the reply. That makes more sense now. My mindset had been that one could program their device from this dashboard, vs the arduino on you system. I think I was stuck on this since I had downloaded the particle app, which recognized our devices, but of course couldn't do anything with them from what I could tell.

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: Dashboard NOOB help
« Reply #3 on: June 11, 2016, 09:36:44 pm »
Unfortunately no, doesn't look like you can program via the particle app for iOS, etc... is supposed to be used in conjunction with some other tinker firmware that Particle provides for their boards... Glad it help you ;)

lopemac

  • Newbie
  • *
  • Posts: 5
Re: Dashboard NOOB help
« Reply #4 on: June 16, 2016, 06:57:50 pm »
I followed the particle.variable() oak tutorial and tried getting variable data using the digistump dashboard, but nothing happens :(  It keeps saying "never" under last updated. I wish there were more tutorials.

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: Dashboard NOOB help
« Reply #5 on: June 17, 2016, 01:32:12 am »
I haven't tried myself to get variables to work on the dashboard (mainly as I was having trouble getting variables to be registered on Particle, let alone get anything else to then use them). I found out that if you don't register the variables AS SOON AS POSSIBLE - ie, make the Particle.variable() statements the first lines of your setup() function, then there is a good chance they won't be registered. It is a quirk in the way the Particle cloud interrogates the device (Oak, Photon, etc) to find out what functions and variables it will be making available.

I documented another way to do it which is more complex, but much more reliable method of getting variables to register on another forum post...

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Dashboard NOOB help
« Reply #6 on: June 23, 2016, 12:56:18 am »
Some major improvements to the Dashboards inter-workings today

I strongly recommend using Publish over Variables with the Dashboard, it avoids some of the quirks of Variables on Particle

brohan

  • Jr. Member
  • **
  • Posts: 59
Re: Dashboard NOOB help
« Reply #7 on: June 24, 2016, 07:36:52 am »
For the sake of others who will read this thread, instead of having to go elsewhere (https://docs.particle.io/reference/firmware/photon/#particle-publish-) can anyone give a concise synposis of the syntax of Particle.variable vs Particle.publish for syntax and function on the program side and the cloud side?

Thank you.

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: Dashboard NOOB help
« Reply #8 on: June 24, 2016, 07:38:57 pm »
As far as syntax, it is probably best to simply look at the examples on that page you linked, as there is example code for both, and the code can change slightly depending on what you want to do. Main idea here is that just like with any other variable, Particle.variables are declared at the start of your program, whereas Particle.publish are used/called when an event message needs to be sent.

With regard to function, Particle.variables are just that, variables. The idea here is that they are made available over the 'cloud' rather than just on the device, so other devices can see what value the variable currently is. Particle.publish on the other hand is geared more towards events - i.e. motion trigger, temperature change, door opened, etc. Meaning a device can 'subscribe' to those events, and only reacts once the event 'fires/triggers'.

brohan

  • Jr. Member
  • **
  • Posts: 59
Re: Dashboard NOOB help
« Reply #9 on: June 24, 2016, 08:41:23 pm »
Wow, that's very impressive, connecting 2 $10 computers anywhere in the world with an internet connection!

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: Dashboard NOOB help
« Reply #10 on: June 24, 2016, 10:21:59 pm »
Lol... yes they are powerful 'lil devices! You can even have one act as a wireless access point, and others connect to it, setting up your own little private network.