As I was getting bored building the Off-line Monitor (https://forum.chipchop.io/post/508/) and waiting for notifications, I've decided to make something new!
This is one of those features that you may or may not find the use for but as it was pretty easy to build I thought I'll add it to ChipChop and I can at last build a device that I've been wanting for ages 😁
It's actually two things that I have made here and they both provide a different functionality.
You have now a new
QR Code Component and a
QR Code Commands system. Confused? Here's the explanation.
QR Code ComponentThis new type of component is of a
Text Value type and accepts a string. The notable thing is that in the ChipChop app it shows a button that when pressed opens up a Qr Code scanner window (it's built into the app)
Any QR code that you scan will be deciphered and the content can be sent to that component. You will see on the screen what the QR Code value is and you just need to press the Send button to pass it to your device.
What can you do with it- Stock control device - you can have an ESP that remotely receives scanned codes for different items and logs or calculates how many are scanned.
- Recording random QR codes you see on the street - yes, some people have a hobby like that
- I am going to make a "freezer" food controller! You know how you've made some lovely food, left it in the freezer and now you have no idea what is what as it all looks the same? Well, I am going to stick QR codes on the dishes and scan the damn things before they go in the freezer and a little ESP will record that. Later it can decipher for me what the red frozen thing is, how long it's been there and is it really a nice bolognese sauce and not just a tomato soup! 🫕🥫🍗🤔
- Post if you have any more ideas
QR Code Commands Command systemThis is an interesting little system that could be useful in some situations and actually doesn't require any programming on the devices. The basic idea is to encode commands to your devices so they can be executed through QR Codes!
The "Command" QR codes don't contain any personal details just the device, component name & command value and can only be executed if you are logged into the ChipChop app so even if someone reads the value of the code it would be meaningless.
One difference from the QR Component is that you don't have to press anything to confirm the command, it will be executed straight away.
Why?
- One example I can think of is maybe something like a door lock. Let's say you want to unlock the door, you could easily achieve that by having a "lock" component and pressing a button in the ChipChop app but if you get your phone stolen and someone gains access to it they can remotely unlock your door.
With the QR Code commands you don't have to display the "unlock" button in the app (you can do that in the Dev Console > Web App) so the "unlock" command to that component can only be done through a QR Code or by using the Pin Code component.
Even if someone else scans the code with their phone as they are not logged into ChipChop the code will be meaningless.
- You can use it in a similar way as the Qr Component described above but as the QR Commands don't require a button press confirmation you can have multiple codes execute one after another as soon as they get scanned and decoded.
How does it work- In the Dev Console you will find a new
Utilities section in the menu, use the form there to generate a command QR code that you can save and print
- In the Dashboard of the ChipChop app you will find a QR Scanner button or you can also use any QR Component from any device to launch the scanner.
- Scan the code and it will immediately send the command to the device as if you've pressed a button
Option 2The Command QR Code is formatted as a url and if scanned by a phone's native camera app it will launch my.chipchop.io and if you are logged in through the browser it can also execute the command.
QuirksOn iOS you need to confirm the camera access every time if you want to use the scanner after the app was left for some time in the background. Android is fine and will remember your privacy settings for the ChipChop app no problems.
Let me know if you have any ideas about this feature or suggestions on how it can be used
Enjoy
Gizmo :-)