Printer sleeps and IPP Don't Get Stats

Got a printer that “falls” off my home network due to it going to sleep. Affects getting stats via IPP in HA. Newer firmware of no help. Thinking of a smart plug via an automation to periodically turn it off and on. Looking for quick and cheap fix? Maybe a TP-Link Kasa Smart Wi-Fi Mini Plug with an automation to handle toggling it off and on. Any other quick fixes?

thanks

What brand is the printer?

How do you wake it again when you need to print?

Sometimes a ping can wake it or a telnet connection to the print port.

Was thinking the same. Similar to WOL. A power interrupt seems like a last resort option.

I have that problem too, but that’s also because I rarely use the printer and deliberately turn it off completely.

In order to still be able to display statistics such as ink levels, I created “Trigger Based Template Sensors” for each entity. These values ​​are updated when the printer is turned on and of course if the values ​​change, and saved when it is turned off. They even survive a HA restart.

First, I fixed the IPP integration log level the logger in the configuration.yaml because I had warnings in the log when the printer was turned off:

logger:
  default: warning
  logs:
    homeassistant.components.ipp: critical

template: !include templates.yaml

Then I created the sensors in templates.yaml for each entity—in my case, the ink levels. Here’s an example of black ink:

- trigger:
    - trigger: state
      entity_id:
        - sensor.epson_wf_3820_series_black_ink
  sensor:
    - name: YOURSENSORNAME
      unique_id: epson-405-black
      state: |
        {{ iif(is_state('sensor.epson_wf_3820_series_black_ink', 'unavailable'), states('sensor.YOURSENSORNAME'), states('sensor.epson_wf_3820_series_black_ink')) }}
      state_class: measurement
      unit_of_measurement: "%"
      icon: >
        {% if states('sensor.YOURSENSORNAME') | float(0) < 11 %}
          mdi:water-percent-alert
        {% else %}
          mdi:water
        {% endif %}

Maybe this workaround will help you.

1 Like

thanks to all who replied.

Its a b/w HP printer located in a basement that gets periodic use
Pinging it doesn’t seem to wake it
Tried to telnet to it and didn’t work - PC and printer on same vlan

If I need to wake it to print I usually have to go downstairs and press the
power button once which stops the intermittent led flashes - taking it out of sleep. then back upstairs to print.

Oh okay, then I misunderstood you. I thought you were mainly concerned with the states/statistics, as the title of your post suggests.

I don’t know the printer or the position of the physical button, but could a fingerbot perhaps help you press the power button?

Had not thought about a Fingerbot. The one I found requires ZigBee. Printer (LaserJet Pro M118-M119) allows itself to remain on before going into sleep for up to 8 hours. Didn’t think a WiFi plug would be a bad idea. So now assuming I go with a Fingerbot (Adaprox) I got that plus cost of a Zigbee hub. Just curious why via an automation running a SmartPlug to toggle off\on every few hours is a bad idea? Not like its running all the time.

A fingerbot was just a spontaneous idea. I don’t have one myself.

But there are some with WiFi or BLE. Of course, they may also require an additional hub.

You need to telnet the printer port and not the standard telnet port