AI prompts
base on
<img src="Images/Logo.png" width="500">
# Open Deck
## Parts and fully assembled units can be purchased Here: https://www.tindie.com/products/27756/
<br>
<img src="Images/Image_1.jpg" width="400">⠀⠀⠀⠀⠀⠀⠀<img src="Images/Image_2.jpg" width="400">
Open Deck is a low cost open source macro keyboard with a customizable image behind every key.
Open Deck is an open source macro keyboard designed to be a cheaper alternative to the stream deck. It has software to easily change the images as well as the macros assigned to each button. The folder Structure allows 6 different apps to be configured with 3 macro keys each. The software allows the open deck to update with whatever app is open as well as open an app when buttons are pressed.
An easy to use interface allows you to easily upload and set macros.
MQTT Support to interface with home assistant.
Full Video and build guide here: https://youtu.be/SCIMHQAToSw
Thanks to PCBWay for their support on this project. Check them out and support the project here: [PCBWay](https://pcbway.com/g/heg1oh)
The anodised aluminium parts for the custom aluminium version can be purchased from [PCBWay](https://pcbway.com/g/heg1oh) using the files in the "aluminium version" folder.
The aluminium version can be seen in this video: https://youtu.be/J708yBPJkeE
# Software:
## GUI Interface
<img src="Images/gui.jpg" width="400">
Provided is a pre-compiled program for windows and mac as well as all the source code (written in python). Extract the zipped folder and run the .exe (or mac equivalent), no python libary installs required.
The Open Deck communicates with a PC over a serial USB connection. The software can automatically detect and connect to the Open Deck when it is plugged in.
The program is first used to upload images and set the macro's. After that it runs in the background to send keystrokes when the buttons are pressed.
Note: the automatic window switching only works on windows currently and the macOS pre-compiled GUI has only been tested on macOS Big Sur 11.6
## Uploading Images
The PC application makes it super easy to upload images. The files can be any size and the program does all of the conversion for you. At the moment each image can only be a single colour when uploaded through the GUI. When uploading an image the black part of the image will be shown in the chosen colour and the rest will be black. See Additional Features section for how to do images with multiple colours.
The select & upload button will prompt the user to select an image from the file system as well as choose a colour from a colour picker.
## Setting Macros
The macros are sent using the python [pynput library] (https://pynput.readthedocs.io/en/latest/keyboard.html#controlling-the-keyboard). (Previous version used the python keyboard library but this had limitations)
If more complex macros are required I recommend setting it to some unused combination and then remapping this combination using something like auto hot key. (Not going to try re-invent the wheel here). Easier way to figure out the format or key names is to use the record keys button in the GUI and look at what is entered in the text box. For example the following input will output "test" when the macro is triggered:
<code>('down', 't'), ('up', 't'), ('down', 'e'), ('up', 'e'), ('down', 's'), ('up', 's'), ('down', 't'), ('up', 't')</code>
To do key combinations such as "control+shift" it would look like this:
<code>('down', Key.ctrl), ('down', Key.ctrl), ('down', Key.ctrl), ('down', 's'), ('up', 's'), ('up', Key.ctrl)</code>
## Window Switching/application setup
One usefull feature on the open deck has is the ability to have the buttons change depending on which application is currently open as well. It can also open an app when a button on the open deck is pressed.
By inputting the application name for each menu of the open deck, the program will look for a window containing this name to either control the open deck or have the open deck control/activate this window.
On windows there are 3 settings for automatically switching windows and/or current open deck state.
- The first option will open the application on the computer when the corresponding folder is opened on the keypad.
- The second option will open the corresponding computer application when a shortcut is sent. This is usefull if you have multiple applciations open at once as it will make the correct application active before sending the keystrokes.
- The third option will change which set of macros are shown on the keypad depending on which computer application is currently active.
## Arduino
All of the code running on the ESP8266 on the Open Deck itself is using arduino. The images are stored as a bitmap in SPIFFS so that they remain after a power cycle and are not relient on a computer connection.
When a key is pressed it sends a correlated number (1-16) over serial to the program running on the computer.
If you purchase a pre-made Open Deck it will come flashed with the default firmware and you will not need to touch any arduino code or install any libraries.
> For more info on the software see the README in the Code folder
## Smart Home Control With MQTT:
The Open Deck can also be used as a smart home controller using MQTT. This can easily interface with home assitant without the Open-Deck only needing to be plugged in for power. Upload the example MQTT arduino sketch onto the Open Deck and enter your credentials in the code.
A number 1-16 will be sent to the topic ```open_deck/buttons``` whenever the button is pressed.
Images can easily be uploaded using the GUI and will be saved localy on the Open Deck.
In the future I would like to integrate this setup into the GUI so you do not need to re-flash any firmware.
# Hardware
See the BOM for a full list of all of the required components. Visit my tindie store to support the project by buying parts or a full unit: **https://www.tindie.com/products/27756/**
> If there is a particular item or set of items you would like to buy feel free to send me a message on Tindie.
Things of Note:
- The display is a 128x160 tft display. The exact display is quite important as the hole patten and pinout needs to fit the custom PCB's. (See BOM for Link)
- An ESP8266 is being used as the micro-controller as it is small, low cost, has enough flash memory to store all of the images as well as having WiFi to allow for additional features. Importantly for everything to fit this needs to be a WEMOS D1 Mini V4 with a USB-C Connector
- Low Profile M2 Screws used for clearance (Length is critical)
## 3D Printed Parts
All parts can be printed with no supports. Print in the orientation shown below:
Body:
<img src="Images/Body.png" width="300">
Bottom Cover:
<img src="Images/Bottom_Cover.png" width="300">
Window Holder:
<img src="Images/Window_Holder.png" width="300">
Spacer:
<img src="Images/Spacer.png" width="300">
## CNC Machined Parts
### Carbon Fibre Top Plate
The carbon top plate is made out of 1mm thick carbon fibre.
### Acrylic Key Caps
The 'Key Caps' are machined out of 4.5mm thick acrylic. They are all the same design.
These can also be made out of 1.5mm and 3mm laser cut acrylic glued together if you do not have access to a CNC. I have found the best glue for this is UV curable glue used for some phone screen protectors.
These could also potentially be 3D printed from clear resin and polished to get a transparent finish.
As with all the custom parts these are availale for purchase from the tindie store.
## PCB
The PCB folder contains a zipped folder of the GERBER files required to have the PCB manufactured.
Support the project and order them here: [PCBWay.com](https://pcbway.com/g/heg1oh).
# Additional Features:
- If you want images with multiple colours these currently need to be manually entered into the arduino code. See the README in the Code folder for more info.
<br>
<br>
", Assign "at most 3 tags" to the expected json: {"id":"1168","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"