Code Monkey home page Code Monkey logo

ha-hpprinter's People

Contributors

adorem avatar bdraco avatar borrel88 avatar elad-bar avatar guille-mas-coll avatar hwikene avatar leandroissa avatar mkowa42 avatar nepozs avatar pepsonel avatar royto avatar yikre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ha-hpprinter's Issues

Missing label when installing integration

I've just updated to the latest version of this integration.

When I install it through the GUI I am presented with this dialog box:

Screenshot 2020-04-24 at 18 51 35

There are no labels for the input box (using English language for UI). First one is for the printer's name I suppose, no clue what the second one should be, IP address?

Integrations UI Labels Missing

I restarted Home Assistant several times before I realizing that this was in fact available in the Integrations UI because the entry is empty, but comes up when I search for "printer".

image

The item has no label... if I click it the config process dialog comes up with "HP Printer".

xmltodict requirement might be breaking QNAP integration

There have been a number of reports of the Home Assistant QNAP integration breaking when the HP Printer integration is installed:

I believe this might be caused by HASS requiring xmltodict 0.12 (which the qnap sensor also has an indirect dependency on) but this plugin requiring version .04

Is it possible for this plugin to work with version 0.12 instead? I'm wondering if that may fix this.

Please note I have not 100% confirmed this - just passing along that affected users of the qnap sensor all seem to have installed this plugin at some point.

Sensors are not being implemented

Added a printer via the new version. The binary sensor appears in the Developer States but none of the sensors appear. Also although my printer shows on the network, it is showing at disconnected.

62d36d7 - After update get a error

Before had this error not. After update to 62d36d7 i see this error:

Head type Printhead color mapping for CMYK not available
2:26 PM custom_components/hpprinter/HPDeviceData.py (WARNING)

[Feature Request] Control the frequency of updates

I'm seeing very frequent updates from the printer:

2020-04-14 12:20:02 INFO (MainThread) [custom_components.hpprinter.home_assistant] Updating 2020-04-14 09:20:02.915915+00:00
2020-04-14 12:20:13 INFO (MainThread) [custom_components.hpprinter.home_assistant] Updating 2020-04-14 09:20:13.004869+00:00
2020-04-14 12:20:24 INFO (MainThread) [custom_components.hpprinter.home_assistant] Updating 2020-04-14 09:20:24.008534+00:00
2020-04-14 12:20:34 INFO (MainThread) [custom_components.hpprinter.home_assistant] Updating 2020-04-14 09:20:34.055757+00:00
2020-04-14 12:20:45 INFO (MainThread) [custom_components.hpprinter.home_assistant] Updating 2020-04-14 09:20:45.007623+00:00
2020-04-14 12:20:56 INFO (MainThread) [custom_components.hpprinter.home_assistant] Updating 2020-04-14 09:20:56.007781+00:00
2020-04-14 12:21:07 INFO (MainThread) [custom_components.hpprinter.home_assistant] Updating 2020-04-14 09:21:07.007402+00:00
2020-04-14 12:21:18 INFO (MainThread) [custom_components.hpprinter.home_assistant] Updating 2020-04-14 09:21:18.008786+00:00
2020-04-14 12:21:29 INFO (MainThread) [custom_components.hpprinter.home_assistant] Updating 2020-04-14 09:21:29.004311+00:00
2020-04-14 12:21:40 INFO (MainThread) [custom_components.hpprinter.home_assistant] Updating 2020-04-14 09:21:40.007588+00:00

This looks like once every 10 seconds.
I'd like to change it for example to once in 5 mins or so.

Continuous Error with Data Parser for Printer Component

I am seeing this on the logs each time the integration updates sensors. Does not appear to affect the sensors with the exception of the printhead sensor which is '0'

This is monitoring an HP OfficeJet 8720

I'm also including screenshot of the frontend so you can see the sensors updating with exception of the printhead.

officejet_hass_screenshot

Please let me know if you need any other logs to troubleshoot this. Thank you.

2020-03-05 14:34:01 INFO (MainThread) [custom_components.hpprinter.home_assistant] Updating 2020-03-05 19:34:01.002571+00:00 2020-03-05 14:34:06 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 275, in data_received messages, upgraded, tail = self._request_parser.feed_data(data) File "aiohttp\_http_parser.pyx", line 523, in aiohttp._http_parser.HttpParser.feed_data aiohttp.http_exceptions.BadStatusLine: invalid HTTP method 2020-03-05 14:34:11 INFO (MainThread) [custom_components.hpprinter.home_assistant] Updating 2020-03-05 19:34:11.004930+00:00

typo in read me

hpprinter:
devies: should be devices
- host: hostname / IP
name: printer name (Optional - Default - HP Printer)

Cannot get to work

I have installed this via HACS, restarted an then put in the info in the integration. Nothing is in the developer states. I used Printer Name “xxxx xxxxx” and Host HPxxxxxx (obtained fro the HP Smart App.

I also tried with IP address in the host.

I am running 3.9/0.105.2 in HA

Any thoughts?

Disabled entities still being triggered for updates?

Everything seems to be working so far, but I did get the following error after disabling one of the sensors.

Log Details (WARNING)
Logger: homeassistant.helpers.entity
Source: helpers/entity.py:284 
First occurred: 7:07:41 AM (1 occurrences) 
Last logged: 7:07:41 AM

Entity sensor.office_printer_printhead_cyanmagentayellowblack is incorrectly being triggered for updates while it is disabled. This is a bug in the hpprinter integration.

Can't add device with latest version

I get the following errors:

Logger: homeassistant.setup
Source: setup.py:288 
First occurred: 16:48:40 (4 occurrences) 
Last logged: 17:31:13

Unable to set up dependencies of hpprinter. Setup failed for dependencies: logger
Logger: aiohttp.server
Source: setup.py:290 
First occurred: 16:48:40 (4 occurrences) 
Last logged: 17:31:13

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 73, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 125, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 112, in post
    return await super().post(request)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 54, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 63, in post
    handler, context={"source": config_entries.SOURCE_USER}
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 112, in async_init
    flow = await self.async_create_flow(handler, context=context, data=data)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 501, in async_create_flow
    await async_process_deps_reqs(self.hass, self._hass_config, integration)
  File "/usr/src/homeassistant/homeassistant/setup.py", line 290, in async_process_deps_reqs
    raise HomeAssistantError("Could not set up all dependencies.")
homeassistant.exceptions.HomeAssistantError: Could not set up all dependencies.

Stop my knx setup

Installing this component my knx setup stop working on homeassistant boot. Removing it all works fine.

Sensors appear as multiple devices

Thanks for this custom component. I added my HP OfficeJet Pro 8730 and I get the data nicely. However, instead of seeing a single device with multiple sensors, I see a device for each measurement (ink values, scanned/printed pages) which contains a single sensor. Wouldn't it make more sense, to bundle all that data under the device?

Support for mDNS

I have an Envy series printer that supports mdns names, e.g. myprinter.local
The setup of the integration does not allow these addresses. Could be useful as this address will never change while the IP of the printer could.

This is what I get in the log:

Screenshot 2020-04-25 at 20 55 03

Custom names get resetted after HA reboot

I have loaded the integration succesfull for a while now. Since a couple of updates ago, I removed the deprecated YAML configuration and added my printer via the HA Integration panel.

Seems to work all fine, except when I change a name of 1 or more sensors. It works just fine, until I reboot home assistant, the sensor names gets resetted to their original name.

Is this a problem with the integration? Since I don't seem to have the problem with any other integrations.

Integration kills my printer

Hello,

I have an HP Deskjet 3050, I installed the integration (version 6184073) via HACS and configured my printer via the GUI, all sensors were displayed correctly.
But after a few hours, my printer is no longer accessible, the W-LAN lamp flashes quickly and the display shows "ERROR". The only way to fix this is to disconnect the printer from the power supply and restart it. The problem did not occur after disabling the integration.

Regards
Sören

Won't save device area

if i assign an area to device, only hp printer on restart delete area from device, so i see "no area".

for example now my envy is in "camera 2", after reboot plugin reset it. no other device do this.

Schermata 2020-04-22 alle 00 35 38

Is PPI support necessary for the integration to work?

I'm failing to connect an HP Color LaserJet CM1312nfi MFP. It's not PPI capable or else Home Assistant would pick it up automatically (a newer printer with PPI support works without problems in HA). Does ha-hpprinter require PPI support from printers?

This is the only error message I get in the log when trying to add the integration (using the correct IP address and I can open its webgui):

2020-04-20 15:58:46 WARNING (MainThread) [custom_components.hpprinter.config_flow] Failed to access HP Printer (HP Color LaserJet CM1312nfi MFP)

Move [Updating 2020-04-14 09:21...] to DEBUG

Logs are full with:

[custom_components.hpprinter.home_assistant] Updating 2020-04-14 09:21:29.004311+00:00

I'd think it'll be better to rather control their printout or move it to DEBUG

Sensor instead of binary sensor

Would you consider adding a sensor instead of binary sensor for state? So instead of on/off it would show on/idle/printing/off etc.

  - platform: command_line
    name: printer_status
    scan_interval: 10
    command: curl -s http://ip/DevMgmt/ProductStatusDyn.xml | grep "pscat:StatusCategory" | sed 's/\s*<.*>\(.*\)<.*>/\1/' | tail +2

  - platform: template
    sensors:
      printer_status_template:
        value_template: >-
          {% if is_state("sensor.printer_status", "ready") %}
            On
          {% elif is_state("sensor.printer_status", "inPowerSave") %}  
            Idle
          {% elif is_state("sensor.printer_status", "processing") %}  
            Printing
          {% elif is_state("sensor.printer_status", "") %}  
            Off
          {% else %}
            {{ states.sensor.printer_status.state }}
          {% endif %}

Slowing down home assistant

First thank you for the nice integration.
But this integration is slowing down home assistant.
Also if i change the icons via custom ui, this changes don't get displayed after restart home assistant.
If i remove this integration, home assistant is working normal.
Here is the printer file:
Printer.txt

Issue wasn't fixed

Log Details (ERROR)
Logger: custom_components.hpprinter.managers.HPDeviceData
Source: custom_components/hpprinter/managers/HPDeviceData.py:82
Integration: HP Printer (documentation)
First occurred: 5:17:25 PM (714 occurrences)
Last logged: 6:59:59 PM

Failed to set printer consumable usage data (HP MFP M225dw @), Error: 'str' object has no attribute 'get', Line: 279

Sensor NA NA NA

I've got it all setup and the page and binary sensors are working, but this is a monochrome printer and the ink levels are not showing. Attached is the reporting sensors and errors, and the xml files. Any thoughts?

errors
states
ProductUsageDyn.txt
ProductStatusDyn.txt

error when set it up

Error doing job: Future exception was never retrieved Traceback (most recent call last): File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/hpprinter/home_assistant.py", line 29, in refresh_data self.update() File "/config/custom_components/hpprinter/home_assistant.py", line 63, in update self.create_printer_sensor(printer_data) File "/config/custom_components/hpprinter/home_assistant.py", line 84, in create_printer_sensor total_printed_pages = total_printed.get("#text", 0) AttributeError: 'str' object has no attribute 'get'

[Feature] Support for HP Officejet 4500 G510g-m?

Hi,

would it be possible to add support for the HP Officejet 4500 G510g-m? 🙈

After adding the integration, it says "Unsupported API" when adding the printer... Or should that device be already supported? Its an older one but has a webpage where all information that this integration provides seems to be presented as well.

The model number is CB867A. The firmware version is MLM1FN0943AR.

HA: v0.109.3
(installed via) HACS: v0.24.3
This integration: commit #cccee35

Thanks for considering!

Add repo to HACS

It would be nice to be able to install this custom integration through HACS...

More info here

Log is filling with errors

Log Details (ERROR)
Logger: custom_components.hpprinter.managers.HPDeviceData
Source: custom_components/hpprinter/managers/HPDeviceData.py:82
Integration: HP Printer (documentation)
First occurred: 11:18:09 PM (7 occurrences)
Last logged: 11:18:09 PM

Failed to set printer consumable usage data (HP MFP M225dw @ IP xxx.xxx.xxx.xxx), Error: 'str' object has no attribute 'get', Line: 279

error in hassio. hacs not update the component

2020-02-29 23:50:02 INFO (MainThread) [custom_components.hpprinter.HPPrinterAPI] Cannot retrieve data (ProductUsageDyn) from printer, Error: , Line: 87

2020-02-29 23:50:03 INFO (MainThread) [custom_components.hpprinter.HPPrinterAPI] Cannot retrieve data (ProductConfigDyn) from printer, Error: , Line: 87

2020-02-29 23:50:03 INFO (MainThread) [custom_components.hpprinter.HPPrinterAPI] Cannot retrieve data (ProductStatusDyn) from printer, Error: , Line: 87

2020-02-29 23:50:03 INFO (MainThread) [custom_components.hpprinter.HPPrinterAPI] Cannot retrieve data (ConsumableConfigDyn) from printer, Error: , Line: 87

2020-02-29 23:50:07 INFO (MainThread) [custom_components.hpprinter.home_assistant] Updating 2020-02-29 22:49:55.749199+00:00

2020-02-29 23:50:09 INFO (MainThread) [custom_components.hpprinter.HPPrinterAPI] Cannot retrieve data (ProductConfigDyn) from printer, Error: , Line: 87

2020-02-29 23:50:09 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform hpprinter is taking over 10 seconds.

Printer does not appear in Integrations

After an install and restart of version a7fbebe I am seeing "This integration has no devices." I added the IP address in the Host field, I double checked that the IP address is still assigned to the printer, and that the printer is on (it has been for 30 minutes now).

I did change the default name from "HP Printer" to "Color Laserjet".

Missing Brands for Hass 0.108 (for now beta)

Missing brands for this integration.

https://rc.home-assistant.io/blog/2020/03/27/release-108/

Integration logos & icons
We have created a new repository on GitHub containing all the brand icons and logos Home Assistant is able to integrate with. These images are, for example, used in our documentation.

In 0.108, we made a start on using the content from this repository in the Home Assistant frontend. The device information page got a layout update and the integrations page as well.

These pages will now show the icons and logos matching the integration.

Make IP address configurable after installation

Hi

Since my HA Core does not allow mDNS, I need to use the printer's IP address. My router crashed today and the printer's IP address has changed. I wanted to change the IP in the hp-printer integration configuration but that doesn't seem possible?

Failed to extract from array AutoOnEvent

With release f1a8584, to HP LaserJet 200 color M251.

ERROR (MainThread) [custom_components.hpprinter.HPPrinterAPI] Failed to extract from array AutoOnEvent of ['ethernetJob', 'wirelessJob', 'controlPanelTouch', 'usbJob'], Error: string indices must be integers, Line: 164

"Imagedrum OPC" autodiscovered as "Imagedrum OPCyan"

Background: OPC is an abbreviation of "organic photoconductor", but I think somewhere is some sort of conversion C->Cyan (etc.)
HP_integration_OPC_as_OPCyan
in my example product number (CF232A) ends with "A", which usually means "Black" (and this is such a case - this is monochromatic printer).

HP 7830

Hi,
i added:

hpprinter:
host: 192.168.0.XX
name: 'HP'

won't work :( nothing happen after a restart

All entities are gone after update to f46981e

The integration title is now :HP Printer and has not entities.

Also, The cog button shows a dialog box with a tick box with no title, 60 on an input line and a log level drop down box, none have titles, have tried a dark and light theme just in case

Was working this morning before I updated

Feature request - prevent from removing entities while rebooting HA

AS-IS behavior:
Each time when I reboot HA and the printer is off most of the entities disappear from HA (except of binary_sensor.xxx_status). Then it looks bad in the frontend:
image

TO-BE idea:
It would maybe make more sense to keep the entities, just with 'unknown' or 'unavailable' state.

HA 109.0 - '.translations' directory has been moved

Just installed v109.0 and get this in the log:

Logger: homeassistant.helpers.translation
Source: helpers/translation.py:206
First occurred: 7:11:03 PM (4 occurrences)
Last logged: 7:11:04 PM

hpprinter: the '.translations' directory has been moved, the new name is 'translations', starting with Home Assistant 0.111 your translations will no longer load if you do not move/rename this

Change icon ink level

HI,

Would be nice to see the icon that is used for ink level to "mdi-cup-water" that shows a ink cartridge icon :)

I tried to change it in customise but doesn't seem to work

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.