rbultman/raspberry-jam

Blynk and locator need to support more than one unit for testing

Opened this issue · 4 comments

One issue that has made testing of the new blynk-based configurator challenging is that it appears to only support a single unit, and gets confused when details such as hostname or IP address change. It's actually been challenging to do any significant testing because all of my units are on my own local subnets, and I can't seem to get the Where's My Pi or Blynk app to track changes as I make them.

Any ideas on how to do this? I don't think the pi's have a serial number printed on them that we could use in the name report to the finder service. Some audio cards (at least the Fe Pi that I have in front of me) have spacers for headers that could be used to communicate with various displays such as this 1.3" OLED display. There are other similar displays. Now we start getting into UI's for the pi, which is attractive for more than just this use. But, we start getting into problems with accessing the pi header due to the sound cards.

One solution to header access problem would be to publish a how-to for connecting these types of displays. Another would be to come up with some design for a board that could be purchased through Seeed Studio.

Regarding the Blynk app and which pi you are connected to, if we switch to a web app hosted on the individual pi then the Blynk problem goes away but we still can't find the pi. However, in this scenario, we could add an LED to a GPIO pin that you could flash to indicate which pi you are connected to. It would work like this: you connect to a pi and access it's web app, you click the "find me" button, and the pi blinks it's LED for some number of seconds so that you can find it.

We should probably also figure out a way to change the name of the pi on the pi locator service. I'm assuming there is some identifier that we could use for this purpose already on the pi.

I think you might be overthinking this. I think all we need to do is what you suggest in the last paragraph, add a field in the configurator to change the name if you desire. That way you can identify it however you want like 'Basement' or 'Drum room' or 'the pi with no case'. Once you have that, you just need a blynk token for each pi (you'd have to buy double the energy I think). Bouncing back between blynk projects wouldn't be the best user experience, but isn't testing the only time you'd really have a single user controlling more than one pi on the same LAN?

I think the phone-home idea can help resolve this. I already capture hostname and ip address, all told it's about four scripts. We could easily include the MAC address or other details, so one way is to simply power one unit up at a time and labeling them as they appear. Another idea would be to include an "id-me" function on the node web server. I am liking how simple the local web server is, but am still learning what's involved with extending it. The MAC address is a fine unique identifier. I can imagine handling other customizations via the same mechanism that's used to fill in the Blynk ID and sound card. Items such as a custom name, server address, and such, could be pre-configured in a config file in /boot when the image is burned, so the SD card could be customized and US-mailed to remote users ready to go.