eigger / hass-niimbot

Niimbot Label Printer Home Assistant Integration
3 stars 0 forks source link

Supported or recommended devices #2

Closed s00500 closed 1 day ago

s00500 commented 5 days ago

Hey again, what devices are you using this with ? I could make it kinda work with the D110 but alignment was always off, so I an curious what device you are using

eigger commented 3 days ago

I'm currently using the B1. I don’t have the D110, so I'll check the D110 protocol to see if there’s any difference. I need a bit of time due to work commitments these days.

s00500 commented 3 days ago

I see, thanks. I dont think there is a big difference. I have gotten it to print very missaligned things a few times already. Take your time, I can test if you want :-)

eigger commented 2 days ago

Can you show me the result of the printed label in a photo? And can you send me the log of the successfully printed result from your label printer at https://niim.mmote.ru/ Press F12 in Chrome to display the log in the Console.

s00500 commented 2 days ago

Here is the log of a test print

Log ``` index-uVxFe2fQ.js:40 new NiimbotBluetoothClient index-uVxFe2fQ.js:40 >> 03 55 55 c1 01 01 c1 aa aa (Connect) index-uVxFe2fQ.js:40 << 55 55 c2 01 02 c1 aa aa (In_Connect) index-uVxFe2fQ.js:40 >> 55 55 40 01 08 49 aa aa (PrinterInfo) index-uVxFe2fQ.js:40 << 55 55 48 02 09 00 43 aa aa (In_PrinterInfoPrinterCode) index-uVxFe2fQ.js:40 >> 55 55 40 01 0b 4a aa aa (PrinterInfo) index-uVxFe2fQ.js:40 << 55 55 4b 0a 46 42 32 34 31 31 32 36 36 31 40 aa aa (In_PrinterInfoSerialNumber) index-uVxFe2fQ.js:40 >> 55 55 40 01 0d 4c aa aa (PrinterInfo) index-uVxFe2fQ.js:40 << 55 55 4d 06 aa 90 80 11 51 24 95 aa aa (In_PrinterInfoBluetoothAddress) index-uVxFe2fQ.js:40 >> 55 55 40 01 0a 4b aa aa (PrinterInfo) index-uVxFe2fQ.js:40 << 55 55 4a 01 02 49 aa aa (In_PrinterInfoChargeLevel) index-uVxFe2fQ.js:40 >> 55 55 40 01 07 46 aa aa (PrinterInfo) index-uVxFe2fQ.js:40 << 55 55 47 01 04 42 aa aa (In_PrinterInfoAutoShutDownTime) index-uVxFe2fQ.js:40 >> 55 55 40 01 03 42 aa aa (PrinterInfo) index-uVxFe2fQ.js:40 << 55 55 43 01 01 43 aa aa (In_PrinterInfoLabelType) index-uVxFe2fQ.js:40 >> 55 55 40 01 0c 4d aa aa (PrinterInfo) index-uVxFe2fQ.js:40 << 55 55 4c 02 05 1e 55 aa aa (In_PrinterInfoHardWareVersion) index-uVxFe2fQ.js:40 >> 55 55 40 01 09 48 aa aa (PrinterInfo) index-uVxFe2fQ.js:40 << 55 55 49 02 05 1d 53 aa aa (In_PrinterInfoSoftWareVersion) index-uVxFe2fQ.js:40 printerInfoFetched index-uVxFe2fQ.js:40 onConnect index-uVxFe2fQ.js:40 >> 55 55 dc 01 01 dc aa aa (Heartbeat) index-uVxFe2fQ.js:40 << 55 55 dd 0a 0e fa 00 64 00 64 32 49 01 02 5b aa aa (In_HeartbeatAdvanced1) index-uVxFe2fQ.js:40 >> 55 55 dc 01 01 dc aa aa (Heartbeat) index-uVxFe2fQ.js:40 << 55 55 dd 0a 0e fa 00 64 00 64 32 49 01 02 5b aa aa (In_HeartbeatAdvanced1) index-uVxFe2fQ.js:40 >> 55 55 dc 01 01 dc aa aa (Heartbeat) index-uVxFe2fQ.js:40 << 55 55 dd 0a 0e fa 00 64 00 64 32 49 01 02 5b aa aa (In_HeartbeatAdvanced1) index-uVxFe2fQ.js:40 >> 55 55 dc 01 01 dc aa aa (Heartbeat) index-uVxFe2fQ.js:40 << 55 55 dd 0a 0e fa 00 64 00 64 32 49 01 02 5b aa aa (In_HeartbeatAdvanced1) index-uVxFe2fQ.js:40 >> 55 55 dc 01 01 dc aa aa (Heartbeat) index-uVxFe2fQ.js:40 << 55 55 dd 0a 0e fa 00 64 00 64 32 49 01 02 5b aa aa (In_HeartbeatAdvanced1) index-uVxFe2fQ.js:40 >> 55 55 dc 01 01 dc aa aa (Heartbeat) index-uVxFe2fQ.js:40 << 55 55 dd 0a 0e fa 00 64 00 64 32 49 01 02 5b aa aa (In_HeartbeatAdvanced1) index-uVxFe2fQ.js:68 Detected print task version: D110 index-uVxFe2fQ.js:68 Page variables: {} index-uVxFe2fQ.js:68 Printing page 0 index-uVxFe2fQ.js:68 Page variables: {} index-uVxFe2fQ.js:40 >> 55 55 21 01 02 22 aa aa (SetDensity) index-uVxFe2fQ.js:40 << 55 55 31 01 01 31 aa aa (In_SetDensity) index-uVxFe2fQ.js:40 >> 55 55 23 01 01 23 aa aa (SetLabelType) index-uVxFe2fQ.js:40 << 55 55 33 01 01 33 aa aa (In_SetLabelType) index-uVxFe2fQ.js:40 >> 55 55 01 01 01 01 aa aa (PrintStart) index-uVxFe2fQ.js:40 << 55 55 02 01 01 02 aa aa (In_PrintStart) index-uVxFe2fQ.js:40 >> 55 55 03 01 01 03 aa aa (PageStart) index-uVxFe2fQ.js:40 << 55 55 04 01 01 04 aa aa (In_PageStart) index-uVxFe2fQ.js:40 >> 55 55 13 04 00 f0 00 60 87 aa aa (SetPageSize) index-uVxFe2fQ.js:40 << 55 55 14 01 01 14 aa aa (In_SetPageSize) index-uVxFe2fQ.js:40 >> 55 55 15 02 00 01 16 aa aa (PrintQuantity) index-uVxFe2fQ.js:40 << 55 55 16 01 01 16 aa aa (In_PrintQuantity) index-uVxFe2fQ.js:40 >> 55 55 84 03 00 00 52 d5 aa aa (PrintEmptyRow) index-uVxFe2fQ.js:40 >> 55 55 83 0e 00 52 00 04 00 09 00 3c 00 3d 00 3e 00 3f d2 aa aa (PrintBitmapRowIndexed) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 5b 00 1d 00 04 00 00 00 00 1f ff ff ff 00 00 00 00 35 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 83 0e 00 5f 00 04 00 08 00 3c 00 3d 00 3e 00 3f de aa aa (PrintBitmapRowIndexed) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 67 00 0b 00 01 00 00 00 00 00 3f c0 07 00 00 00 00 02 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 68 00 0e 00 01 00 00 00 00 01 ff f8 00 00 00 00 00 f6 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 69 00 10 00 01 00 00 00 00 03 ff fc 00 00 00 00 00 ef aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 6a 00 12 00 01 00 00 00 00 07 ff fe 00 00 00 00 00 e8 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 6b 00 12 00 01 00 00 00 00 0f e7 ff 00 00 00 00 00 f8 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 6c 00 0c 00 01 00 00 00 00 0f 87 0f 00 00 00 00 00 71 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 6d 00 0c 00 01 00 00 00 00 1f 07 07 80 00 00 00 00 68 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 6e 00 0b 00 01 00 00 00 00 1e 07 07 80 00 00 00 00 6d aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 6f 00 0a 00 01 00 00 00 00 1e 07 03 80 00 00 00 00 69 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 70 00 09 00 02 00 00 00 00 1c 07 03 80 00 00 00 00 74 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 72 00 0a 00 02 00 00 00 00 1c 07 07 80 00 00 00 00 71 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 74 00 0b 00 01 00 00 00 00 1c 07 0f 80 00 00 00 00 7d aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 75 00 0f 00 02 00 00 00 00 1e 07 ff 00 00 00 00 00 09 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 77 00 0d 00 01 00 00 00 00 0e 07 fe 00 00 00 00 00 1b aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 78 00 0b 00 01 00 00 00 00 0e 07 f8 00 00 00 00 00 14 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 83 12 00 79 00 06 00 01 00 2d 00 2e 00 2f 00 30 00 31 00 32 f0 aa aa (PrintBitmapRowIndexed) index-uVxFe2fQ.js:40 >> 55 55 84 03 00 7a 01 fc aa aa (PrintEmptyRow) index-uVxFe2fQ.js:40 >> 55 55 83 08 00 7b 00 01 00 01 00 23 d3 aa aa (PrintBitmapRowIndexed) index-uVxFe2fQ.js:40 >> 55 55 83 0e 00 7c 00 04 00 01 00 23 00 24 00 37 00 38 fc aa aa (PrintBitmapRowIndexed) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 7d 00 07 00 01 00 00 00 00 1e 00 03 80 00 00 00 00 71 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 7e 00 0a 00 01 00 00 00 00 1f 00 0f 80 00 00 00 00 72 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 7f 00 0d 00 01 00 00 00 00 1f c0 1f 80 00 00 00 00 a4 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 80 00 0d 00 01 00 00 00 00 0f e0 3f 00 00 00 00 00 cb aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 81 00 0d 00 01 00 00 00 00 03 f0 fe 00 00 00 00 00 17 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 82 00 0e 00 01 00 00 00 00 01 fd fc 00 00 00 00 00 1a aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 83 00 0b 00 01 00 00 00 00 00 7f f0 00 00 00 00 00 91 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 84 00 09 00 01 00 00 00 00 00 3f e0 00 00 00 00 00 c4 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 85 00 07 00 01 00 00 00 00 00 1f c0 00 00 00 00 00 cb aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 86 00 09 00 01 00 00 00 00 00 3f e0 00 00 00 00 00 c6 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 87 00 0c 00 01 00 00 00 00 00 ff f0 00 00 00 00 00 12 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 88 00 0d 00 01 00 00 00 00 01 f9 fc 00 00 00 00 00 17 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 89 00 0d 00 01 00 00 00 00 07 f0 7e 00 00 00 00 00 9b aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 8a 00 0e 00 01 00 00 00 00 0f e0 3f 80 00 00 00 00 42 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 8b 00 0c 00 01 00 00 00 00 1f 80 1f 80 00 00 00 00 11 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 8c 00 09 00 01 00 00 00 00 1f 00 07 80 00 00 00 00 8b aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 83 12 00 8d 00 06 00 01 00 23 00 24 00 25 00 36 00 37 00 38 00 aa aa (PrintBitmapRowIndexed) index-uVxFe2fQ.js:40 >> 55 55 83 0c 00 8e 00 03 00 01 00 23 00 24 00 38 3c aa aa (PrintBitmapRowIndexed) index-uVxFe2fQ.js:40 >> 55 55 84 03 00 8f 01 09 aa aa (PrintEmptyRow) index-uVxFe2fQ.js:40 >> 55 55 83 0a 00 90 00 02 00 01 00 36 00 37 1b aa aa (PrintBitmapRowIndexed) index-uVxFe2fQ.js:40 >> 55 55 83 0c 00 91 00 03 00 02 00 36 00 37 00 38 26 aa aa (PrintBitmapRowIndexed) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 93 00 13 00 01 00 00 00 00 01 ff ff c0 00 00 00 00 d7 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 94 00 18 00 01 00 00 00 00 07 ff ff f8 00 00 00 00 e5 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 95 00 1a 00 01 00 00 00 00 0f ff ff fc 00 00 00 00 ea aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 96 00 1b 00 01 00 00 00 00 1f ff ff fc 00 00 00 00 f8 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 97 00 08 00 01 00 00 00 00 1f 00 03 80 00 00 00 00 95 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 85 12 00 98 00 07 00 01 00 00 00 00 1e 00 03 80 00 00 00 00 94 aa aa (PrintBitmapRow) index-uVxFe2fQ.js:40 >> 55 55 83 12 00 99 00 06 00 04 00 23 00 24 00 25 00 36 00 37 00 38 11 aa aa (PrintBitmapRowIndexed) index-uVxFe2fQ.js:40 >> 55 55 83 0a 00 9d 00 02 00 01 00 24 00 25 16 aa aa (PrintBitmapRowIndexed) index-uVxFe2fQ.js:40 >> 55 55 84 03 00 9e 52 4b aa aa (PrintEmptyRow) index-uVxFe2fQ.js:40 >> 55 55 e3 01 01 e3 aa aa (PageEnd) index-uVxFe2fQ.js:40 << 55 55 d3 03 00 ef 01 3e aa aa (In_PrinterCheckLine) index-uVxFe2fQ.js:40 << 55 55 e4 01 01 e4 aa aa (In_PageEnd) index-uVxFe2fQ.js:40 >> 55 55 a3 01 01 a3 aa aa (PrintStatus) index-uVxFe2fQ.js:40 << 55 55 b3 04 00 00 00 00 b7 aa aa (In_PrintStatus) index-uVxFe2fQ.js:40 >> 55 55 a3 01 01 a3 aa aa (PrintStatus) index-uVxFe2fQ.js:40 << 55 55 b3 04 00 00 00 00 b7 aa aa (In_PrintStatus) index-uVxFe2fQ.js:40 >> 55 55 a3 01 01 a3 aa aa (PrintStatus) index-uVxFe2fQ.js:40 << 55 55 b3 04 00 00 01 00 b6 aa aa (In_PrintStatus) index-uVxFe2fQ.js:40 >> 55 55 a3 01 01 a3 aa aa (PrintStatus) index-uVxFe2fQ.js:40 << 55 55 b3 04 00 00 05 00 b2 aa aa (In_PrintStatus) index-uVxFe2fQ.js:40 >> 55 55 a3 01 01 a3 aa aa (PrintStatus) index-uVxFe2fQ.js:40 << 55 55 b3 04 00 00 27 00 90 aa aa (In_PrintStatus) index-uVxFe2fQ.js:40 >> 55 55 a3 01 01 a3 aa aa (PrintStatus) index-uVxFe2fQ.js:40 << 55 55 b3 04 00 00 4d 00 fa aa aa (In_PrintStatus) index-uVxFe2fQ.js:40 >> 55 55 a3 01 01 a3 aa aa (PrintStatus) index-uVxFe2fQ.js:40 << 55 55 b3 04 00 00 62 00 d5 aa aa (In_PrintStatus) index-uVxFe2fQ.js:40 >> 55 55 a3 01 01 a3 aa aa (PrintStatus) index-uVxFe2fQ.js:40 << 55 55 b3 04 00 00 62 00 d5 aa aa (In_PrintStatus) index-uVxFe2fQ.js:40 >> 55 55 a3 01 01 a3 aa aa (PrintStatus) index-uVxFe2fQ.js:40 << 55 55 b3 04 00 00 62 00 d5 aa aa (In_PrintStatus) index-uVxFe2fQ.js:40 >> 55 55 a3 01 01 a3 aa aa (PrintStatus) index-uVxFe2fQ.js:40 << 55 55 b3 04 00 00 62 00 d5 aa aa (In_PrintStatus) index-uVxFe2fQ.js:40 >> 55 55 a3 01 01 a3 aa aa (PrintStatus) index-uVxFe2fQ.js:40 << 55 55 b3 04 00 00 64 1d ce aa aa (In_PrintStatus) index-uVxFe2fQ.js:40 >> 55 55 a3 01 01 a3 aa aa (PrintStatus) index-uVxFe2fQ.js:40 << 55 55 b3 04 00 00 64 4c 9f aa aa (In_PrintStatus) index-uVxFe2fQ.js:40 >> 55 55 a3 01 01 a3 aa aa (PrintStatus) index-uVxFe2fQ.js:40 << 55 55 b3 04 00 01 64 64 b6 aa aa (In_PrintStatus) index-uVxFe2fQ.js:68 TypeError: Cannot read properties of undefined (reading 'DEFAULT_PACKET_TIMEOUT') at setDefaultPacketTimeout (index-uVxFe2fQ.js:33:42154) at at async H (index-uVxFe2fQ.js:68:12844) H @ index-uVxFe2fQ.js:68 await in H (anonymous) @ index-uVxFe2fQ.js:68 await in (anonymous) Cl @ index-uVxFe2fQ.js:33 (anonymous) @ index-uVxFe2fQ.js:33 Nl @ index-uVxFe2fQ.js:33 Promise.then Eu @ index-uVxFe2fQ.js:33 Du @ index-uVxFe2fQ.js:33 (anonymous) @ index-uVxFe2fQ.js:33 N @ index-uVxFe2fQ.js:68 index-uVxFe2fQ.js:40 >> 55 55 f3 01 01 f3 aa aa (PrintEnd) index-uVxFe2fQ.js:40 << 55 55 f4 01 01 f4 aa aa (In_PrintEnd) index-uVxFe2fQ.js:40 >> 55 55 dc 01 01 dc aa aa (Heartbeat) index-uVxFe2fQ.js:40 << 55 55 dd 0a 0e fa 00 64 00 64 32 49 01 02 5b aa aa (In_HeartbeatAdvanced1) index-uVxFe2fQ.js:40 >> 55 55 dc 01 01 dc aa aa (Heartbeat) index-uVxFe2fQ.js:40 << 55 55 dd 0a 0e f9 00 64 00 64 32 49 01 02 58 aa aa (In_HeartbeatAdvanced1) index-uVxFe2fQ.js:40 >> 55 55 dc 01 01 dc aa aa (Heartbeat) index-uVxFe2fQ.js:40 << 55 55 dd 0a 0e fa 00 64 00 64 32 49 01 02 5b aa aa (In_HeartbeatAdvanced1) index-uVxFe2fQ.js:40 >> 55 55 dc 01 01 dc aa aa (Heartbeat) index-uVxFe2fQ.js:40 << 55 55 dd 0a 0e f9 00 64 00 64 32 49 01 02 58 aa aa (In_HeartbeatAdvanced1) >> 55 55 dc 01 01 dc aa aa (Heartbeat) << 55 55 dd 0a 0e f9 00 64 00 64 32 49 01 02 58 aa aa (In_HeartbeatAdvanced1) >> 55 55 dc 01 01 dc aa aa (Heartbeat) << 55 55 dd 0a 0e f8 00 64 00 64 32 49 01 02 59 aa aa (In_HeartbeatAdvanced1) >> 55 55 dc 01 01 dc aa aa (Heartbeat) << 55 55 dd 0a 0e f7 00 64 00 64 32 49 01 02 56 aa aa (In_HeartbeatAdvanced1) >> 55 55 dc 01 01 dc aa aa (Heartbeat) << 55 55 dd 0a 0e f7 00 64 00 64 32 49 01 02 56 aa aa (In_HeartbeatAdvanced1) >> 55 55 dc 01 01 dc aa aa (Heartbeat) ```
s00500 commented 2 days ago

With your new 1.1.0 prerelease I could reliably make it do this:

action: niimbot.print
data:
  payload:
    - type: text
      value: Lukas Test
      font: ppb.ttf
      x: 10
      "y": 10
      size: 30
      rotate: 0
  width: 240
  height: 96
target:
  device_id: myDevice

Image

Could not make it rotate though... any tipps ?

MultiMote commented 2 days ago

@s00500

index-uVxFe2fQ.js:68 TypeError: Cannot read properties of undefined (reading 'DEFAULT_PACKET_TIMEOUT') at setDefaultPacketTimeout (index-uVxFe2fQ.js:33:42154) at at async H (index-uVxFe2fQ.js:68:12844)

Ooops. Will fix it soon.

UPD: Fixed.

eigger commented 2 days ago

You can try

payload:
    - type: text
      value: Lukas Test
      font: ppb.ttf
      x: 10
      "y": 10
      size: 30
  rotate: 90
  width: 240
  height: 96

Or


payload:
    - type: text
      value: Lukas Test
      font: ppb.ttf
      x: 10
      "y": 10
      size: 30
  rotate: 90
  width: 96
  height: 240
s00500 commented 1 day ago

Perfect, that worked :-)