Part-DB-server icon indicating copy to clipboard operation
Part-DB-server copied to clipboard

Add PickByLight Feature

Open TobiKiener opened this issue 6 months ago • 1 comments

Hi, I would love to have a pick by light feature which helps finding parts in their corresponding storage location.

I've added a link next to the bulb symbol which shows the storage location in part db. Image

The link is based on a ENV variable to define the API Endpoint. In my case a ESP32 with a RGBIC LED Strip. # PartDB Pickbylight server adress - PICKBYLIGHT_ENDPOINT=http://10.11.12.13:8912/partdb

Within partdb the id of the storage location is added as a parameter: https://10.11.12.13:8912/partdb?storagelocation=1

The ESP is waiting for the HTTP GET request containing a storage location id. The firmware running on the ESP includes a mapping table Storage Locaton ID -> LED Nr. When a HTTP GET request with a valid storage location is received, the corresponding LED lights up.

Image Image Source

This system/solution works for me, but this is definitely no fancy solution. The callback should be done somewhere in the background (don't know if client or server side to be prefered). Currently you end up on the HTTP GET page in your browser.

Maybe you have some tips where such a solution (probably some kind of POST request) should be located in partdb.

Kind regards Tobi

TobiKiener avatar Jun 07 '25 09:06 TobiKiener

For reference: A similar system has been proposed in #274. My 2 cents: WLED using the individual LED control feature of the JSON API would eliminate the need for custom firmware. The storage location "light indices" should be stored in the Part-DB database for simplicity (you could even put this in the parameters for now). ~Assembling the lengthy string for the API call would be the only real challenge I guess.~ I looked at the code referenced in the abovementioned issue that implements this and the relevant part for LED control is only a few lines of python, so I think it won't be hard. When I get my hands on a new string of addressable LEDs, I'll fiddle around a bit.

d-buchmann avatar Jul 07 '25 12:07 d-buchmann