External fetching?

I’d really like to build a weather sensitive piece, but I don’t think PB can do it without an external proxy that would connect to some weather service, figure out the right info, and then pass in a variable or 3. Which is doable, of course, and I’ll be building it that way to start.

But it might be nice to have some way to (eventually) build in direct fetching of information. The ability of PB code to pull data, instead of having to push it to the PB, would allow more standalone projects.

1 Like

I can recommend https://openweathermap.org/ for this. You have to register, but the API key is free. I’ve been using their data for various projects for about a year now and they’ve been very reliable.

You can get an absolute ton of data from any of the weather services, and it has lots of data types that pixelblaze doesn’t support that you’d need to parse and convert somehow. A separate computer to deal with getting, parsing and filtering the data is probably inevitable.

1 Like

Thanks. I agree, a full on weather processing is likely pushing the limits of a pattern. I’m sure proxying it and sending the important bits as variables is the best approach. Perhaps in V3, this will change.

But my specific complex fetch aside, it would be nice to have a way to have the PB get data itself.

We have time info, so clocks are covered but if you wanted to do something based on changing data, for now it’s push only.

1 Like

For sure. My plan here is to add a web socket url that PB will connect to. For the v3, this could support https as well.

This could be a local server, a remote server, cloud function, or hosted adapter service to connect all kinds of data to the PB and open up more than just local control.

Then adding IFTTT, mqtt, alexa, etc and other things would be a lot easier.

At some point I’ll host a service with extra features, but not locked to something I built so y’all will be free to hack whatever you want.

Eventually the language will grow to allow processing that kind of data directly but that’s a longer road.

6 Likes