node-hp-scan-to icon indicating copy to clipboard operation
node-hp-scan-to copied to clipboard

HP Envy 4500 Support

Open cullenmcdermott opened this issue 2 years ago • 14 comments

Hi! This tool looks awesome. I started playing with it with my HP Envy 4500 this morning and it generally works but there are a few weird things I'm not sure if I'm doing something wrong or its due to this not officially supporting this device.

  1. All my scans appear as jpegs, even though I select pdf on the HP itself
  2. I can only really scan one thing and then I need to restart the docker container. It will sometimes work with a few scans in a row but rarely. I enabled debug logging and when I try to start the second scan after a restart I see this being spammed in the logs
0058 -> {"baseURL":"http://192.168.0.212","url":"/WalkupScanToComp/WalkupScanToCompEvent","method":"GET","responseType":"text"}
0058 <- {"status":200,"data":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!---->\r\n<wus:WalkupScanToCompEvent xsi:schemaLocation=\"http://www.hp.com/schemas/imaging/con/ledm/walkupscan/2010/09/28 WalkupScanToComp.xsd\" xmlns:wus=\"http://www.hp.com/schemas/imaging/con/ledm/walkupscan/2010/09/28\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n\t<wus:WalkupScanToCompEventType>ScanRequested</wus:WalkupScanToCompEventType>\r\n</wus:WalkupScanToCompEvent>\r\n","headers":{"server":"HP HTTP Server; HP ENVY 4500 series - A9T80A; Serial Number: CNfoobarbaz; Built:Mon Jun 15, 2020 09:29:10AM {MKM1FN2025AR}","content-type":"text/xml","content-length":"425","cache-control":"must-revalidate, max-age=0","pragma":"no-cache"},"statusText":"OK"}
0059 -> {"baseURL":"http://192.168.0.212","url":"/WalkupScanToComp/WalkupScanToCompEvent","method":"GET","responseType":"text"}
0059 <- {"status":200,"data":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!---->\r\n<wus:WalkupScanToCompEvent xsi:schemaLocation=\"http://www.hp.com/schemas/imaging/con/ledm/walkupscan/2010/09/28 WalkupScanToComp.xsd\" xmlns:wus=\"http://www.hp.com/schemas/imaging/con/ledm/walkupscan/2010/09/28\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n\t<wus:WalkupScanToCompEventType>ScanRequested</wus:WalkupScanToCompEventType>\r\n</wus:WalkupScanToCompEvent>\r\n","headers":{"server":"HP HTTP Server; HP ENVY 4500 series - A9T80A; Serial Number: CNfoobarbaz; Built:Mon Jun 15, 2020 09:29:10AM {MKM1FN2025AR}","content-type":"text/xml","content-length":"425","cache-control":"must-revalidate, max-age=0","pragma":"no-cache"},"statusText":"OK"}

Eventually the HP times out but this continues to be spammed until I restart the container

Thanks for any help you can provide!

cullenmcdermott avatar Jun 12 '22 20:06 cullenmcdermott

@cullenmcdermott Could you send the full log because what's before could be very useful to understand why the app is stuck in this state ?

Thanks

manuc66 avatar Jun 13 '22 15:06 manuc66

Hey, sorry for the delay on this. I'll grab the full log later this afternoon or this evening and share it here.

cullenmcdermott avatar Jun 16 '22 15:06 cullenmcdermott

Here's a gist of the logs from when I start the container, then I perform a successful scan, then try to start a second one and it just keeps looping with that last log.

https://gist.github.com/cullenmcdermott/9bc441298002660bb9182c4e1f7d559d

cullenmcdermott avatar Jun 18 '22 17:06 cullenmcdermott

Hi @cullenmcdermott thanks for the full logs provided

Could you send me the xml content of http://1192.168.0.212/WalkupScanToComp/WalkupScanToCompCaps

Mine is have this content

<?xml version="1.0" encoding="UTF-8"?>
<!---->
<wus:WalkupScanToCompCaps xsi:schemaLocation="http://www.hp.com/schemas/imaging/con/ledm/walkupscan/2010/09/28 ../../schemas/WalkupScanToComp.xsd" xmlns:dd="http://www.hp.com/schemas/imaging/con/dictionaries/1.0/" xmlns:wus="http://www.hp.com/schemas/imaging/con/ledm/walkupscan/2010/09/28" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<dd:Version>
		<dd:Revision>SVN-IPG-LEDM.351</dd:Revision>
	</dd:Version>
	<wus:MaxNetworkDestinations>15</wus:MaxNetworkDestinations>
	<wus:SupportsMultiItemScanFromPlaten>true</wus:SupportsMultiItemScanFromPlaten>
	<wus:UserActionTimeout>
		<dd:ValueFloat>60</dd:ValueFloat>
		<dd:Unit>seconds</dd:Unit>
	</wus:UserActionTimeout>
	<wus:ShortcutSupport access="readOnly">
		<wus:Shortcut>SavePDF</wus:Shortcut>
		<wus:Shortcut>SaveJPEG</wus:Shortcut>
		<wus:Shortcut>EmailPDF</wus:Shortcut>
		<wus:Shortcut>EmailJPEG</wus:Shortcut>
		<wus:Shortcut>GeneralScan</wus:Shortcut>
	</wus:ShortcutSupport>
</wus:WalkupScanToCompCaps>

I guess you don't have SupportsMultiItemScanFromPlaten set to true

manuc66 avatar Jun 18 '22 20:06 manuc66

Yeah it looks like that is set to false. I'm looking to see if there's a way to enable that.

<!---->
<wus:WalkupScanToCompCaps xsi:schemaLocation="http://www.hp.com/schemas/imaging/con/ledm/walkupscan/2010/09/28 WalkupScanToComp.xsd">
<dd:Version>
<dd:Revision>SVN-IPG-LEDM.351</dd:Revision>
</dd:Version>
<wus:MaxNetworkDestinations>15</wus:MaxNetworkDestinations>
<wus:SupportsMultiItemScanFromPlaten>false</wus:SupportsMultiItemScanFromPlaten>
<wus:UserActionTimeout>
<dd:ValueFloat>60</dd:ValueFloat>
<dd:Unit>seconds</dd:Unit>
</wus:UserActionTimeout>
</wus:WalkupScanToCompCaps>

cullenmcdermott avatar Jun 18 '22 20:06 cullenmcdermott

@cullenmcdermott I'll try to read that information and act accordingly

manuc66 avatar Jun 18 '22 20:06 manuc66

@cullenmcdermott can you try with this https://hub.docker.com/layers/237042732/manuc66/node-hp-scan-to/feature_SupportsMultiItemScanFromPlaten-false/images/sha256-96fd84e694c1523f6e944436a5aa61a8b4f9e506efaa49253314984bfe8f8d14?context=repo and send the full logs in case of errors ?

Thanks

manuc66 avatar Jun 18 '22 23:06 manuc66

That doesn't appear to run correctly. It seems to start, but never emits any logs, and my scanner is unable to reach it.

cullenmcdermott avatar Jun 19 '22 00:06 cullenmcdermott

Could you confirm you did not forget the parameter that gives the ip address ?

manuc66 avatar Jun 19 '22 05:06 manuc66

Yes I'm using the exact same config just changing the tag. Here's the config I'm using just for clarity, its a portion of a Nomad Jobspec. Changing the image line to use the tag feature_SupportsMultiItemScanFromPlaten-false does not work for me.

    task "hp-scan" {

      env {
        IP = "192.168.0.212"
        CMDLINE = "-D"
        PATTERN="\"scan\"_dd.mm.yyyy_hh:MM:ss"
        TZ = "America/Boise"
      }

      resources {
        cpu = 250
        memory = 250
      }

      driver = "docker"

      config {
        image = "manuc66/node-hp-scan-to"
        hostname = "document-ingest"
        mount {
          target = "/scan"
          source = "paperless-consume"
          volume_options {
            driver_config {
              name = "local"
              options = {
                type = "nfs"
                device = ":/volume1/paperless-consume"
                o = "addr=192.168.0.234,vers=3,timeo=180,tcp,rw"
              }
            }
          }
        }
      }
    }

cullenmcdermott avatar Jun 19 '22 16:06 cullenmcdermott

I have the same issue when using the docker container too, (but not when launching from npm)

I don't know why

manuc66 avatar Jun 19 '22 17:06 manuc66

The starting issue is not linked to changes, see https://github.com/manuc66/node-hp-scan-to/issues/497

manuc66 avatar Jun 20 '22 21:06 manuc66

@cullenmcdermott if you still even want to test the feature, you can docker exec -it docker_name sh while the container is in freezed state and then launch the app manually with node index.js command (see here to translate the arguments)

manuc66 avatar Jun 21 '22 19:06 manuc66

@cullenmcdermott issue #497 has been fixed, can you try "manuc66/node-hp-scan-to:latest" ? (The PR has been merged)

manuc66 avatar Jul 02 '22 22:07 manuc66