Thingspeak for B524 - no library, please make it work on b524!

I am in Australia, and now there are no 4g boron units only 2g/3g and we are being shifted to the b524. This is kinda frustrating since I have all my boards running already so I need to now make all new PCBs, but now I have just realised the Thingspeak library doesnt work on b524! Can you please at least get the thingspeak library functioning on the b524 ASAP. This transition off the borons onto the b524 is starting to become painful.

What errors are you getting?
The B524 is essentially a Boron minus the power bits. There is no reason why the library should not work.

The Thingspeak library was created by their development team - please contact them if there are any issues:
https://docs.particle.io/reference/device-os/libraries/t/ThingSpeak/

On the library link you have posted, it shows it doesnt work on Bsom.
Fairly frustrating that there is no 404x or 4LTE outside usa, is there any possibility to bring the 404x outside the USA. The M2 connector and raw parts of the b524 isnt the easiest to work with. And now my code for the 404x and Borons 2g/3g doesnt work with the b524, which is super frustrating since I have no idea how I can now intergrate the sensors with thingspeak, since you limit it at 20 webhooks. Who do I contact at thingspeak for them to update the library as well, I have zero points of contact, can you share an email with the key person.

Here is a copy of the error for your refence as well. Please get 404x working outside USA.

Hi @boronman

In the Particle specific library for Thingspeak on github, there is a big if-else tree trying to make sure you are on a supported platform.

// Create platform defines for Particle devices
    #if PLATFORM_ID == 0
        #define PARTICLE_CORE
    #elif PLATFORM_ID == 6
        #define PARTICLE_PHOTON
        #define PARTICLE_PHOTONELECTRON
    #elif PLATFORM_ID == 8
        #define PARTICLE_P1
        #define PARTICLE_PHOTONELECTRON
    #elif PLATFORM_ID == 10
        #define PARTICLE_ELECTRON
        #define PARTICLE_PHOTONELECTRON
    #elif PLATFORM_ID == 12
        #define PARTICLE_ARGON
        #define PARTICLE_PHOTONELECTRON
    #elif PLATFORM_ID == 13
        #define PARTICLE_BORON
        #define PARTICLE_PHOTONELECTRON
    #elif PLATFORM_ID == 14
        #error TCP connection are not supported on mesh nodes (Xenon), only mesh gateways (Argon, Boron)
    #else
        #error Only Core/Photon/Electron/P1/Argon/Boron are supported.
    #endif

I'm not sure what the PLATFORM_ID macro is for the B524, but if you can either (1) make a local copy and edit the library to add the B524 to the if-else with same result as a Boron or (2) temporarily set the PLATFORM_ID in your code before you include the thingspeak library and then set it back afterward, I think you can work-around this issue. The second way is risky since other things can depend on PLATFORM_ID.

That's an automated compile - as you noted in the error, and as @bko revealed, the library has explicit checks that prevent it from compiling on the B524. Remove the checks and make sure all the pins are correct, and it should work just fine. It's the same architecture as the Boron.

Again, this is not a Particle supplied library - you should contact the Thingspeak team, or submit a PR with the fixes to get it addressed. The contact information is on the link I supplied - it links to the Github repository. Particle has no influence on the creation/updating of this library. As mentioned, there should be no compatibility issues, and it's likely the library was created prior to the B SOM launch.

LTE Cat 1 on the Boron is impossible as there are literally no modems that fit.
The M.2 format is the format that future SKUs will be released on, and we recommend you spend the time to migrate if you want to take advantage of the newer boards and features that are in the pipeline.

2 Likes

I have tried to removed the checked, and all the proposed issues, but its just hanging or not working. I am in a really bad bind now since I got 25 of these that urgently need to get out to the field and I was under the impression this was a straight replacement for the boron, it is now turning out to be a complete rework. Can you please, honestly please get the library working or assist me. I understand that it is thingspeaks library but it is for your product and I urgently need help. I dont know what else to do. I got 50 borons and 25 of these and if this fails future work isnt on the table. Can you just assist with a working library.

Hi, I do not have a b524 so I can't help that much, but maybe you can provide some code that your device is running?
I never used that library but taking a quick look I did not find anything relevant to a boron, it's using a TCP client which would work on any particle device.
I would look into the credentials you are using, or maybe you can strip down your code and create the simplest demo and add logs to see where it fails.

Are these creds correctly configured? (copy-pasted them from the github repo)

unsigned long myChannelNumber = 31461;
const char * myReadAPIKey = "NKX4Z5JGO4M5I18A";

What about the rest of your code? Where can it fail?

Have you been in contact with Thingspeak?
The library enables support for their product, and it's unfortunately their domain to address.

It compiles if you add the correct platform to ThingSpeak.h.

    #elif PLATFORM_ID == 25
        #define PARTICLE_B5SOM
2 Likes

I've created a PR with the changes. It's up to ThingSpeak to accept.
You can add the .cpp and .h files manually, or import in Workbench and add the change yourself.

4 Likes

Thanks for this! it is working and I have notified ThingSpeak to please accept the changes.

I wasnt sure where to locate the Platform_ID == 25 from, I tried just punching through numbers to find it.

The sensors have been deployed in the field and are working.

Overall, thanks so much!

4 Likes

That’s great news! Glad to hear it’s bqck up and running.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.