Particle Photon/Spark Core RGB WS2812B

Ok well if that is the case with the 144/meter I would say that you would only want to power 1 meter or less with the VIN on the particle. If you want a longer run you will need a separate power supply. Always be cautious when adding power and always connect ground first.

I’m not too sure what you want a screenshot of. I don’t like taking screen shot of certain settings as it has token ids and the like.

I’m injecting power to the strips every meter instead of using VIN and only connect the data line. I’m not sure if the Photon data line can handle nearly 500 pixels but this controller can handle up to 2048:
https://www.amazon.com/gp/product/B01B4O1KJ0
The following is the screen I get for your device type:


So, if I understand this correctly, “ON” starts with the color wash and the second button toggles a set of colors. The firmware needs to be tweaked if we want other options.

Yes functionality is limited at this time. I have a work in progress that will have a color selector. I just haven’t had much time to work on it.

Thanks for sharing your efforts.

Ok I worked on this over the weekend. I think I have a color picker working. I also put in refresh logic to see if the device is on/off. I will post some of this to github, but I haven’t had time to verify that the picker is working properly.

Update: All done. I copied the code over. Like I said the rgbselector is currently a work in progress. I can get the rgb values and verify them in my logs, but I am still testing out the parsing on the Photon firmware. I know at worst I am very close.

All of the code on github is now titled with Photon*.

1 Like

Hello Justin,

I am Truly a NEWB here working with Github, SmartThings, Particle etc. Not easy for me, but I intend to get familiar to these forums, websites & files. I have been reading your posts and responses that you have provided and it looks like I am a year late as your last post on this topic was Sept 2015.

I have followed all your instruction working with Github I have managed to get your “Photon-RGB-Master” folder from Github and connected the RGB strip (WS2812B) to one of my Photons. But that’s as far as I have been able to get. I get lost with all this talk and back and forth between Particle, Github and SmartThings.

at first I was trying to use Particle.io Builder but I couldnt get any of your “Photon-RGB-Master” folder files to come into the Particle IDE. Then something told me to try using the Atom test editor. This application allows me to get your file folder “Photon-RGB-Master” into the left side of the Atom I was then clicking on the three files you mentioned was needed and they pop up in new tabs within the Atom screen, but how does one compile, I need some help. For one I am not a coder, two all these websites are new to me and Im not really sure how to navigate with in them. I am navigating via trial and error.

Could you please provide some detail for the beginner (and I do mean Beginner). Have you published anything that has a resemblance to a step by step procedural document on how to get these files to work with my Photons. Im so lost at this point Im not sure where to re-start, or that I even have too.

I realize that these posts I am reading are for the beginner, but that the community already knows where and how to navigate within these new applications and getting by with your typed responses.

I am in dire need of some one-on-one, step -by-step coaching until I understand how all this comes together. Seems the RGB strips should have been easy enough to duplicate and run on my Photon. I love these lil Photons but I can’t seem to make any progress.

Would you mind providing a little more detail to help me get started here.?

Thank You in advance

Sure I can try to help.

I only know particle IDE so I can’t comment on ATOM, but I know it is an interactive IDE that the Particle team has been working on and I have to say I am interested in using.

The following are the steps that should get you to functioning:

  1. Copy the Photon RGB Template firmware from github and go to the Particle IDE.

  2. On the code page on particle ide create a new app. Paste the copied code from github.

  3. Go back to github and grab Photon neopixel.cpp and Photon neopixel.h. You will need to create these files as well on Particle ide you do so by pressing the + sign in the upper right corner. As a side note when you press the + sign it will create both a .cpp and .h file and you will just need to paste the code into these and rename them to neopixel.cpp and neopixel.h as they are named in the .ino file (the main file).

  4. You need to make one change to the main firmware code and that is to define the number of pixels you have. On line 15 you will see:
    define PIXEL_COUNT 88
    Change this to however many pixels you have in your strip… as a side note there is some electrical equation you need to understand in terms of the number of pixels you have if you are running off of vin. I would not recommend much more than 120 pixels as you will be well over the electrical capacity of the photon for output. This shouldn’t hurt the Photon if you go over as there is a regulator on vin, but you may get a voltage drop.

  5. The next step will be to create a smartthings DHT (device handler). To do this you will need to go into Smartthings IDE. Copy the Photon RGB Smartthings Device Type from github and after you are done with that save and publish for me on the Smartthings IDE.

  6. This is where most people get a little lost. The next step requires you to create a new device on the Smartthigns IDE. So if you go to the devices tab click on the new device tab on the upper right.

  7. After you have created the new device you will need to log into the mobile app. You should have a device that needs to be configured. You are getting close if you have this so you should feel good.

  8. In the device in the mobile app you will need to go into the settings menu for the device (the gear). Here you will need to enter two things. The first is the Access Token. The Access Token is unique to you but not to the device. What I mean by this is that if you 12 Photon devices (like me) this Access Token will be the same for all of them. You will find this access token on the settings page on the Particle IDE. Settings is the gear on the left side of the Particle IDE.

  9. The final piece of this fairly intricate puzzle is the device id. You will need to put the device id on the mobile app device settings page. To find you will go to the Particle ID again, but this time you go to the devices page (looks like a target on the left side). Next to each device there is a right arrow. If you hit that right arrow the device id will show up. Copy this and place it in the mobile app for the device.

  10. Enjoy

Looking back on these instructions I am quite impressed that I managed to get all of this running let alone the json returns and everything else involved, and funny enough I didn’t think this was overly complex.

I am usually fairly responsive to threads so let me know if you have any questions. I don’t know if the RGB selector is working perfect, but everything else should work(on/off/tv dim/movie dim/red(I use this code in a home theater). I need to spend some time on the RGB selector, but I have been pretty busy and well life.

2 Likes

Mr. Justin W.,

Thank You for your quick response to my initial letter via email within this forum. The individual steps that you provided were very useful and help me significantly. I was able to read between the lines and figure out a few additional details on my own, as you had wrote enough information/description to guide me through the different websites and applications that I was able to get something to get the code into Particle.io Builder and learned quite a bit, in one sitting. The one sitting took several hours, but I was able to get a sense of achievement nonetheless. THANK YOU…!

I actually got all the way from step one (1) to about half-way through step eight (8) following your expressive direction/explanation. in step (4) I changed the PIXEL_COUNT 120 as I have the 16.4 ft W2812B RGB strip and it is still rolled up on the shipping reel (I haven’t cut it down to size yet).

In step eight (8) I got about halfway through the last portion of this step after downloading the mobile app (I didn’t know I needed or existed, until you made mention). Here is where I ran into a lil problem: I located the Access Token you mention and I was aware of where to locate my Photon Device ID as you mention in step nine (9). The problem I am having is that the settings (small mechanical gear icon) where you inform me to place the previously located Access Token from the Particle IDE, the mobile app only provides for “Security”, “Smoke”, “Leaks” & “Custom”, Under the “Settings”/Configure TAB in the mobile app. Similar scenario for the Photon Device ID. I can’t locate this section under “Settings” within the mobile app, where these two components (“Access Token” & “Photon Device ID”) are to be placed.

Nevertheless, at this point it was 0300 in the morning and I started to get tired. So I compiled the code you led me too with No Errors and decided WTH let’s flash the lil’ Photon and see what happens. WA-LA, I did get some action going but not what I was expecting. This is of course probably due to Not having the Access Token or the Device ID set within the SmartThings mobile application. I saw the compiled code from the Particle.io Builder, load into the Photon when flashed. The little blue RGB on the Photo went blank, but I wasn’t concerned, as I read from one of your earlier forum responses that the RGB on the Photo was coded to be blanked out.

When I flashed the Photon the Photon booted up and the W2812B RGB strip complete chain flickered, which leads me to believe that more than likely the RGB strip works fine, but I only get two (2) RGB’s to light up after the initial ficker. The radio buttons and sliders on the mobile app do nothing to change colors or light intensity. The "Log " within the mobile app did log and change the recorded HEX value/numbers and it appeared as though the hex values did change value(s) within the mobile SmartThings application when the sliders and radio buttons were manipulated. However, only the first two (2) RGB’s on the front end of the WS2812B RGB strip illuminated, and they stayed white no change in color, intensity or mode (on/off).

Like I stated earlier I believe this is due in part to not being able to locate and place the Access Token and the Device ID within the “SmartThings” mobile app as you suggest/instruct in steps eight (8) & nine (9).

The winner here is Myself (Thanks to Your Quick Support): I was able to utilize the Particle.io Build IDE, Learned how to make and create my own .io file within the Particle IDE, run community code, add .cpp & .h files to the main.io file, navigate and create a Device Handler within the SmartThings web IDE and place all this into a file/app, compile and load with No Errors.

However, I now have many more questions to ask <>, and I still haven’t achieved a working RGB strip show via the WS2812B and the Photon.

The version I downloaded from the “Play Store” for the “SmartThings” application is version 2.2.0/Build number 207522. Is it possible that we are running different versions of the SmartThings mobile app.? For the HUB identification I have a Samsung TV with ConnectOne and I see no existing SmartThings application within my menus option. I have called Samsung and opened a ticket to have Samsung SmartThings technical support contact me regarding that issue.

I do run a VeraPlus within my Home for my existing home automation and am looking into that scenario for a HUB ID. Again, these issues aren’t really relevant to what you assisted me with in your direction/tutorial and Ill look more into those subjects after we get this RGB strip functioning as you describe in your earlier community forum posts.

Justin again, I can’t express enough gratitude for your help in getting me this far. But I could use a little more community support to get to the settings within the SmartThings (Android version) app that will allow me to input the Access Token and the Device ID, as I believe this is my only hang-up at the moment. Do you have any ideas.? Are we running different versions of the SmartThings mobile app.? Or am I overlooking something within the Android version of the SmartThings mobile app…?

Respectfully,

LenK13

You are almost there. I was under the assumption you had other smartthings devices, but not a problem. If you are on the main screen of the mobile app at the botttom go to my home. On the ribbon close to the top there should be rooms things and family. You will want to be on the things tab. From there, there should be a + sign at the top. Press the plus sign and if you had correctly added the device there should be a device that needs to be configured. Go into that device and you should be able to add the device id and the access token to the device. If you cannot add them on that screen there should be a gear on that screen and this is where you will add them. From what it sounds like you are very close… good luck and let me know if there are any other questions.

Justin,

Do I require a SmartThings Hub to work this project you have been providing me tutorials on? I do not get a settings view with the options you mention. I still can’t locate where to place the Access Key from Particle.io or locate a place to input the Device ID. These KEY items you mention in steps 8 & 9 of the guidelines you have provided were simple enough for me to find. I just can’t find a menu option within the setting that allows me to place this information. I have called samsung twice (current;y on the phone with them now) with the run-around. Everyone I speak with is unfamiliar with the subject matter. Both the Samsung Smart TV should have the application installed already to allow me to utilize my Smart TV as a SmartThings Hum, and the SmartThings Extend. I’m currently attempting to get a SmartThings Extend as a Beta Tester for development trial and feedback. This item has not been publically released as of yet and difficult trying to explain to the so called technical support people at Sumsung and Samsung SmartThings technical support departments. So far its an endless loop back and forth with myself having to re-explain myself… Grrrrr

Justin are you using a SmartThings Hub… Will the SmartThings Hub conflict with my current VeraPlus Hub home automation system?

Can I integrate the VeraPlus Hub and utilize with the principle base of using it as a SmartThings Hub… I don’t want to have to purchase an additional $100.00 plus shipping cost unit/hub if I don’t have to.

Please advise at your earliest opportunity. The technical support both at Samsung and SmartThings TIER 1 are not trained or knowledgeable enough to really understand what it is that I am talking about. For some reason they will NOT transfer me to TIER 2 customer support. They both continue to relay information back and forth while missing vital details within the message transfers. Ill stick to the community forum here from now on

Thank You in advance for your continued support.

Yes you need something that serves as a hub. Unfortunately I have only
created a device type for SmartThings. I know Vera plus can send http
commands but I have not yet tried that platform out. So you will either
need a SmartThings hub or an extend if it functions in a similar manner to
the hub.

Justin,

Thank you for the quick response… Three hours on the phone with Samsung and SmartThings store… Shwoo… (wiping my forehead) LOL. Just ordered one with expedite shipping. Should be here in 2 Days. Then we start the next chapter…

Getting my VeraPlus Hub to work in the manner that SmartThings Hub does. But meanwhile when my NEW SmartThings Hub comes in I can learn what needs to be done on that platform… Im finally relaxing after my three hour phone Loop with Technical support and placing an order for SmartThings Hub.

P.S. The SmartThings Hub will NOT be backward compatible with Samsung Smart TV’s manufactured prior to 2016. SmartThings Extend (USB Dongle) will work on 2016 Samsung Smart TV’s, 7 Series UHD & 8, 9 Series SUHD TVs ONLY, and will NOT be backward compatible (according to both Technical Support at Samsung and SmartThings). I finally received confirmation on that issue while I was placing the order with TIER 2 SmartThings Customer Support.

Thanks again for your prompt support/response, at least I realize and now know why I’m having the current issue with locating a place to enter my Access Key and Device ID within the Mobile application.

The SmartThings Community specifically yourself “jjhtpc - Justin Wurth” have helped me significantly in the last three (3) days since I joined. KUDOS to you Sir and the Community. I look forward to getting to the point where I too, can help and provide support to the Community.

Respectfully,

LenK13

Ok so the RGB selector now works. To use this you will just need to update the main firmware for the Photon RGB Template firmware and update the Photon RGB Smartthigns Device Type.
Again here is the link to git:

@slagle can we make sure sales folks don’t get on this forum. Either way this should be pulled from this thread.

jjhtpc, thanks so much for this.
I have a old sparkcore connected to 2812b strip, all working, very cool. It is the first device I have setup on my ST.

How easy would it be to enable setting a dim value for the leds and add it to the device?

I was working on this a few weeks back and I thought I had the code. I don’t think I have posted it up to github yet. Let me take a look tonight, verify it is working and I’ll respond back when I know.

1 Like

OK so I tested out my code it is close but not fully operational. I will work on it a little more this weekend.

Thanks, much appreciated. Being able to compare the two versions will also help me on my learning curve

Ok all done. Actually this works really well. Had to set some maps specific to the colors, but it should work perfectly. I think I am going to put this out for publishing. As always I have some additional stuff that I run for my home theater in both the device handler, and the photon firmware, but they are just extra. I use them for running these lights as home theater accent lights. The movie dim and tv dim run when I press play and pause respectively while I am running movies or tv on my htpc with Kodi. Also there are some IFTTT or web based integrations. Alerts repressents just that. I live in the midwest so if there is a tornado warning the lights switch to red. If the bears score a touchdown… you get the drift. Let me know any feedback.

As always use the photon firmware and device type(the others are one offs for other things).

1 Like

Thanks JJ, I’ll give this a go as soon as I am back from work travels.