How to connect a smart device to the internet or cloud

Hi Guys,

I am a newbiee and have the following questions:

  1. Can we use the SPARK core as a hub when used in combination with other circuitry to accept feeds from other devices.
  2. How do we connect to the internet and then to the spark cloud.
  3. We plan to use it at home,anything we need to be worried about on the firewall ?

Any PRE-REQUISTES to be aware of before we build the smart devices.

Greatly appreciate the help.

Thanks,
Sriram

  1. I assume your feed just means electrcial signals and yeah the :spark: core is suitable for that.

Or if you are talking about remotely, if the other devices are connected to the Internet with APIs to interact and send/retrieve variables, the core would be able to communicate. Or maybe through bluetooth etc is fine too

  1. To connect the spark core to the Internet, we can do it through USB or mobile/web apl and send the wifi credentials over. Once that configuration is successful the core will automatically attempt to connect to the core.

In time to come, you can even connect to your local server/cloud instead of the core :slight_smile:

  1. No worries for firewall in general. Haven’t heard of issues with regards to firewall and im sure it can be resolved unless you are on a corporate betwork or having a nasty ISP.

The :spark: core to be honest is really capable and making smart devices is what its designed to do!

1 Like

Thanks a lot for all your inputs.

Here is what I were thinking and may be you guys can guide me on how to accomplish it or perhaps suggest a better way:

  1. We have various Bluetooth/RF sensors that we want to connect to a central SPARK Core (SPARK to be used
    as a hub).Each sensor will send a status e.g. ON /OFF (not sure if this is the best way to do it )
    Q1. Can SPARK Core be used to consolidate the statuses received from the sensors,or we need an additional
    micro-controller +circuitry to accomplish this ? (in short can SPARK be use as a HUB ?)

2.We will have a SPARK Core write the statuses from our sensors to the internet
Q1. What does the SPARK Cloud do ?
Q2 Is the SPARK Cloud mandatory to pass the info from the device to the internet ?
Q3. Are we mandated to develop our application on SPARK Cloud ?

  1. If we have to build our application on SPARK Cloud (e.g. install our webserver etc on SPARK Cloud),as of now how do we retrieve the contents that the SPARK Hub would have received from the sensors ?
    do we write a program on the SPARK cloud to PULL the information (believe till the publish feature is made available)?

Appreciate your inputs.

Thanks a lot!

@SRIRAM0506

Q1) If you can get a Bluetooth module hooked on the Spark Core which can communicate to multiple bluetooth sensors as one go, There’s no issue with the core being the master and polling them for their status. (Yes the :spark: can be a hub in your case)

Q2) You can expose variables through the :spark: cloud and read it through API calls

  • The cloud is there for you to get your expose variables/functions accessible without you worrying about the server backend.
  • All you need is a core and you can enjoy the advantage of reading values through the internet
  • :spark: is meant to be open-sourced and there is nothing mandatory to pass info from the core to the cloud itself
  • You are not mandated to develop you application on the cloud as well.

It’s a really open platform and you can it’s for you to do great things with the :spark:!

You can run your own servers, get the core to send variables and do the logging on your own backend. There’s no limit and people have already done it :smile:

Thanks Ken. Let me try to describe a scenario and see how that plays out with spark.
Lets say I have 4 non-spark devices (A, B,C,D) communicating to the spark hub. The only status we are interested in is On/Off from the non-spark devices.

At the get go, lets say all the devices are in Off position. The moment I turn the non-spark device A to ‘On’ position, the status of all devices at this point is - A on B off C off D off. Requirement is - This can be transmitted to the cloud via the spark core and can be viewed in the smart device like an iphone.

As a 2nd step, if the non-spark device B goes to on position, the latest status of all devices is going to be
A on B on C off D off. This again needs to be sent to the cloud and the smart device should be in sync.

What happens if the hub is down (internet went down), would the cloud remember the latest status and send it across? We expect this to be a one way mechanism in the sense… the non-spark devices are communicating the status to the hub and onto the smartphone. Other than registering the device through smartphones, I do not intend to control the non-spark devices via the smartphone. I am only interested in checking the latest status on the smartphone.

The question is - To keep these statuses in sync with the non-spark devices, the spark core, the cloud and the smartphone, do you think I can deploy this with the existing tools in the spark ecosystem? or should I be looking at supplementing this with a database or an additional server etc?

Any inputs will be greatly appreciated.

The soon to launch feature will have a memory-storage sort of mechanism.

So if your :spark: lost connection to the core, your App will read the last updated value posted to the Cloud.

http://docs.spark.io/#/api/reading-data-from-a-core-events

Yes so basically the :spark: core will be the the ones handling the non-spark devices and all your smartphone needs is to communicate to the :spark: via the Cloud API.

Can be done :smiley:

1 Like