Hi there!
My new Epson EcoTank L8180 network printer has been nicely discovered by the Internet Printing Protocol (IPP) integration but it is missing the ability to monitor power status and switch the printer on/off. I have sniffed the network traffic from Epson mobile app to the printer and found out that there are some APIs that are used by the mobile app. This allowed me to create a power switch to control the power status of the printer and switch it on/off remotely. Here are the POST requests I have discovered:
Control power:
http://<printer_ip>/remote_operation/v1/power/off http://<printer_ip>/remote_operation/v1/power/on
Get power status:
http://<printer_ip>/remote_operation/v1/power/get_status
Get device status, but when printer is idle does not show anything, probably has some data when printer is doing something:
http://<printer_ip>/remote_operation/v1/device/get_status
The following are the rest_command
s I have implemented:
epson_printer_on:
url: 'http://10.144.1.116/remote_operation/v1/power/on'
method: POST
epson_printer_off:
url: 'http://10.144.1.116/remote_operation/v1/power/off'
method: POST
And binary sensor for power status:
- platform: rest
resource: http://10.144.1.116/remote_operation/v1/power/get_status
method: POST
name: Epson Printer Power
device_class: power
scan_interval: 30
value_template: >-
{% if value_json.power %}
{{ 'on' }}
{% else %}
{{ 'off' }}
{% endif %}
And finally the template switch:
- platform: template
switches:
epson_printer:
friendly_name: "Epson Printer"
icon_template: mdi:printer
value_template: "{{ states('binary_sensor.epson_printer_power') }}"
turn_on:
- service: rest_command.epson_printer_on
- service: homeassistant.update_entity
target:
entity_id: binary_sensor.epson_printer_power
turn_off:
- service: rest_command.epson_printer_off
- service: homeassistant.update_entity
target:
entity_id: binary_sensor.epson_printer_power
Most likely there are more APIs but the ones above were the most interesting for me. Any suggestions or info about additional APIs for Epson printers is more than welcome!