brasizza / sunmi_printer

BSD 3-Clause "New" or "Revised" License
38 stars 45 forks source link

Feat: Get Status of Cash Drawer #71

Open hrueger opened 4 months ago

hrueger commented 4 months ago

Hi, first of all thanks for this great library. I'd like to get an open / closed status of the cash drawer. It seems like this is possible using isOpen(), but not from the woyou service... Seems like there's a new api?

hrueger commented 4 months ago

Ideally, one would be able to provide a listener for status changes ;-)

brasizza commented 4 months ago

I really dont know about this method about cash drawer, can you show me where it is ? there is a status to check if the pinter box is open, but its just that

hrueger commented 4 months ago

Sure, here's the docs about that: https://developer.sunmi.com/docs/en-US/xeghjk491/mareghjk568#h-2-get-the-status-of-the-cash-drawer

Edit: I believe that this is the link to the main sdk docs (although they are not very comprehensive): https://developer.sunmi.com/docs/en-US/xeghjk491/maceghjk502

brasizza commented 4 months ago

i see, im sorry but i dont have this cash drawer here to implement this methods =(

hrueger commented 4 months ago

OK, I understand. I already tried to implement that, but failed. It seems that this is a completely new and different api... Do you plan on getting that into this library? As far as I understand it, the new api (printerx) should be preferred over the woyou service.

brasizza commented 4 months ago

yes, but i have just a huge K2 in the office and to change the lib i need to bring home, i will try to arrange that asap

hrueger commented 4 months ago

Wow, that sounds amazing! If I can test anything, just let me know. I have access to a couple of different models.

hrueger commented 3 months ago

I just got a new Sunmi D3 and I'd like to use it together with a Sunmi Kitchen Cloud Printer. It seems like that would work out of the box with the new api: https://developer.sunmi.com/docs/en-US/xeghjk491/rfmeghjk546