Sparky - WordPress meet Spark Core

Sparky is a WordPress plugin that allows you to create shortcodes based on your Spark Core variables. It works like so:

  • Add your access token
  • Add a new spark/shortcode - your cores should be listed

Once saved you should see a live reading from the core on the right hand side of the screen (providing the core is online and the variable name is correct).

  • Copy the required shortcodes ([sparky id="#"] or [sparkystatus id="#"]) from the listing screen and add the shortcodes to a post, page or text widget.

This is an early release just for you folks so please get testing. I am already considering a slight rewrite to better support the Spark Core Cloud API and have plans for logging tools and cache clearing.

Once it is a little more refined I will post it to WordPress.org. In the meantime you can grab it from GitHub:

Enjoy!

5 Likes

Good stuff! This could make it easy to build your own sort of sensor site quickly!

1 Like

Awesome! I’ve never played around with WordPress much, but this makes me very curious :slight_smile: Thanks for sharing @scottsweb!

this is awesome!
i am a huge fan of wordpress. my mind is going to spin on some cool ways to integrate this…

i think someone at wordpress needs to know that they are now IoT enabled!

1 Like

This is Awesome!, thank for sharing @scottsweb.

Good. :slight_smile: I have also basic plugin and widget for functions.

2 Likes

Thanks everyone. I hope you find it useful for your projects.

@Yasin your widget looks very interesting. I have been thinking about the best way to trigger functions on the core from WordPress. I am thinking it might be good to tie it into the WP Cron functionality but am not sure how useful that will be.

WordPress has a great hook system which would be interesting to use with that side of the Spark Cloud API. For example when a new comment is added an action could be fired on the Spark Core.

Lots to think about!

1 Like

I m curious to use this plugin for website, but I can’t find it on WordPress. The reason I m curious to use it, is because I working on a project with teammates using proton in particle. How can I access to it? @scottsweb

This thread is five years old.

But there is a link to the OP's repository

And also a link to another thread with a similar intent.

I tried the another thread but it doesn’t exist anymore according to the web browser.

Yup, that thread is also from 2014 - I guess there wasn’t enough interest for this to evolve into something, but maybe the OPs of these threads from back then is still active on this forum - they were last seen round in 2017 tho’

Ping @scottsweb & @Yasin

1 Like

OPs? But thank you I m gonna keep trying to see, cause I really to find a way to connect Particle with WordPress. Thank you for the help.

Original Posters or Original Post (depending on context).

Oh

Does particle have a SQL library?

I have tinkered with sending data from Photon to MS SQL from time to time. I never send from the Photon directly to the SQL server because there’s not really enough memory to handle the full SQL connection (not to mention you should be using TLS for the connection as well). So, my solution is to send data via http into a webserver with a custom API. You can easily write an API using some readily available tutorials and tools. I use C# and .Net for development and I have many MS servers available to me so I found this guide helpful:

Please note, I have full access to the network so I can segregate the data onto a VLAN or other security method. You should use webhooks if your data will be traversing the internet at large. I also have considered using a webhook to Azure, then using an Azure function to write back into my internal database (via VPN to Azure). Your capabilities and available resources will drive this adventure. But, no SQL library on Particle that I know of.

Here’s another example.

1 Like