Syncthru issue with 0.133.0 and Samsung printer

Up until 0.133.0 I had the syncthru service configured from my configuration.yaml for my Samsung C410 colour laser printer, which worked well and exposed the sensors to HA. (config below)

  - platform: syncthru
    resource: http://192.168.88.5
    name: Samsung C410 Colour Laser Printer

I’ve updated to 0.133.0 (and removed the yaml configuration for syncthru) and there seems to be an issue with the syncthru integration. HA has automatically found my Samsung printer but won’t allow me to configure the integration. I get the following error.

image

I’m running with the following

I can browse fine to the printers ip/web server and it is connected to the network.

I did have the IPP integration added which I’ve removed just incase there was a conflict but that didn’t help.

Can anyone shed any light on the issue?

I have the same problem with my Samsung CLP-325W. Had to roll back to 0.112.4.

Same problem here with my C3060.

This is my output from http://printer_ip_address/sws/app/information/home/home.json
{
status: {
hrDeviceStatus: 2,
status1: “”,
status2: “”,
status3: “”,
status4: “”
},

So the problem seems to be an empty status1

If it helps, this is the output

{ status: { hrDeviceStatus: 5, status1: “”, status2: “”, status3: “”, status4: “” },

Same problem with M2020

Also same with M283x Laser Printer, even though Browser access to SWS is working fine.

0.133.1 doesn’t resolve the issue either

The problem is in pysyncthru, which has nothing to do with HA.

My printer CLX-3185N returns this two statuses:

status: { hrDeviceStatus: 3, status1: " Replace Toner", status2: "", status3: "", status4: "" }
status: { hrDeviceStatus: 3, status1: " Ready to Copy", status2: "", status3: "", status4: "" }

but pysyncthru expects these strings:

' Ready to Copy  '
'Ready To Copy'

A temporary solution for me is to add these two lines to pysyncthru file language.py:

        ' Ready to Copy': State.READY,
        ' Replace Toner': State.READY,

I have reported it as an issue here:

2 Likes

I solved the problem with the author of the python module pysyncthru and in my case syncthru already works. But it’s still in the dev branch.

Will that fix resolve the issue where no status string is returned i.e status1: “” etc? It looks like it’s looking for your specific strings?

Unfortunately no, an empty string does not solve it. Contact him, maybe you invent a solution together.

I understand the solution but what did you do to deploy it? I am running Home Assistant on a Raspberry Pi 0.113.3

Same problem with HA 0.113.2 and Samsung M2020. I see 0.113.3 is available but it appears OzGav is already running that. Can we expect it in 0.113.4?

i dont believe so, not until the upstream component is updated and then a PR from home assistant to update it as a dependency of the HA integration

can you guys post your results from http://printer_ip_address/sws/app/information/home/home.json

Samsung SCX-4726FD
The same issue:

{
	status: { hrDeviceStatus: 3, status1: " Sleeping... ", status2: " ", status3: "", status4: "" },
	identity: { model_name: "SCX-472x Series", host_name: "someone", location: "someone", serial_num: "someone", ip_addr: "someone", ipv6_link_addr : "someone", mac_addr: "someone", admin_email: "[email protected]", admin_name: "admin", admin_phone: "someone" },
	toner_black: { opt: 1, status: 1, remaining: 6, cnt: 1780 },
	toner_cyan: { opt: 0, status: 0, remaining: 0, cnt: 0 },
	toner_magenta: { opt: 0, status: 0, remaining: 0, cnt: 0 },
	toner_yellow: { opt: 0, status: 0, remaining: 0, cnt: 0 },
	drum_black: { opt: 0, status: 1024, remaining: 100 },
	drum_cyan: { opt: 0, status: 1024, remaining: 100 },
	drum_magenta: { opt: 0, status: 1024, remaining: 100 },
	drum_yellow: { opt: 0, status: 1024, remaining: 100 },
	tray1: { opt: 1, paper_size1: 4, paper_size2: 0, paper_type1: 2, paper_type2: 0, capa: 250, status: 2 },
	tray2: { opt: 0, paper_size1: 0, paper_size2: 0, paper_type1: 1, paper_type2: 0, capa: 0, status: 2 },
	tray3: { opt: 0, paper_size1: 0, paper_size2: 0, paper_type1: 1, paper_type2: 0, capa: 0, status: 2 },
	tray4: { opt: 0, paper_size1: 0, paper_size2: 0, paper_type1: 1, paper_type2: 0, capa: 0, status: 2 },
	mp: { opt: 0, paper_size1: 0, paper_size2: 0, paper_type1: 1, paper_type2: 0, capa: 0, status: 2 },
	manual: { opt: 1, paper_size1: 4, paper_size2: 0, paper_type1: 2, paper_type2: 0, capa: 1, status: 8 },
	outbin: [ ["Bin", 120, 0] ],
	capability: {
		hdd: {opt: 2, capa: 0},
		ram: {opt: 131072, capa: 131072},
		scanner: {opt: 40 , capa: 40} 
	},
	options: { fax: 1,hdd: 0,wlan: 0 },
	GXI_ACTIVE_ALERT_TOTAL: 1,
	GXI_ADMIN_WUI_HAS_DEFAULT_PASS: 1,
	GXI_INTRAY_TRAY1_IS_TRAY: 0,
	GXI_SYS_OPTION_KIT_SUPPORT: 0,
	GXI_SYS_LUI_SUPPORT: 1
}

You might want to raise an issue here: https://github.com/nielstron/pysyncthru/tree/master/pysyncthru
It seems the status message must be exact. The pysyncthru author has sleeping with no and two leading spaces but your message appears to have one leading space… See here: https://github.com/nielstron/pysyncthru/blob/eda192e903c8de48f99a43afaf4af1a8198fabb9/pysyncthru/language.py

Same issue: Samsung C430W

{
   "status":{
      "hrDeviceStatus":2,
      status1:"",
      status2:"",
      status3:"",
      status4:""
   },
   "identity":{
      "model_name":"C430W",
      "device_name":"Samsung C430W",
      "host_name":"SamsungC430W",
      "location":"",
      "serial_num":"08HRB8GK7E01CFX",
      "ip_addr":"***********",
      ipv6_link_addr:"",
      "mac_addr":"**********",
      "admin_email":"**************",
      "admin_name":"************",
      "admin_phone":"***********",
      "customer_support":""
   },
   "toner_black":{
      "opt":1,
      "remaining":67,
      "cnt":221,
      "newError":""
   },
   "toner_cyan":{
      "opt":1,
      "remaining":66,
      "cnt":194,
      "newError":""
   },
   "toner_magenta":{
      "opt":1,
      "remaining":70,
      "cnt":194,
      "newError":""
   },
   "toner_yellow":{
      "opt":1,
      "remaining":27,
      "cnt":195,
      "newError":""
   },
   "drum_black":{
      "opt":0,
      "remaining":96,
      "newError":""
   },
   "drum_cyan":{
      "opt":0,
      "remaining":100,
      "newError":""
   },
   "drum_magenta":{
      "opt":0,
      "remaining":100,
      "newError":""
   },
   "drum_yellow":{
      "opt":0,
      "remaining":100,
      "newError":""
   },
   "drum_color":{
      "opt":1,
      "remaining":96,
      "newError":""
   },
   tray1:{
      "opt":1,
      paper_size1:4,
      paper_size2:0,
      paper_type1:2,
      paper_type2:0,
      "paper_level":0,
      "capa":150,
      "newError":""
   },
   tray2:{
      "opt":0,
      paper_size1:0,
      paper_size2:0,
      paper_type1:2,
      paper_type2:0,
      "paper_level":0,
      "capa":0,
      "newError":""
   },
   tray3:{
      "opt":0,
      paper_size1:0,
      paper_size2:0,
      paper_type1:2,
      paper_type2:0,
      "paper_level":0,
      "capa":0,
      "newError":""
   },
   tray4:{
      "opt":0,
      paper_size1:0,
      paper_size2:0,
      paper_type1:2,
      paper_type2:0,
      "paper_level":0,
      "capa":0,
      "newError":""
   },
   tray5:{
      "opt":0,
      paper_size1:0,
      paper_size2:0,
      paper_type1:2,
      paper_type2:0,
      "paper_level":0,
      "capa":0,
      "newError":"0"
   },
   "mp":{
      "opt":0,
      paper_size1:0,
      paper_size2:0,
      paper_type1:2,
      paper_type2:0,
      "paper_level":0,
      "capa":0,
      "newError":""
   },
   "manual":{
      "opt":0,
      paper_size1:0,
      paper_size2:0,
      paper_type1:2,
      paper_type2:0,
      "capa":0,
      "newError":""
   },
   "GXI_INTRAY_MANUALFEEDING_TRAY_SUPPORT":0,
   "GXI_INSTALL_OPTION_MULTIBIN":0,
   "multibin":[
      0
   ],
   "outputTray":[
      [
         1,
         50,
         ""
      ]
   ],
   "capability":{
      "hdd":{
         "opt":2,
         "capa":40
      },
      "ram":{
         "opt":65536,
         "capa":65536
      },
      "scanner":{
         "opt":0,
         "capa":0
      }
   },
   "options":{
      "hdd":0,
      "wlan":1
   },
   "GXI_ACTIVE_ALERT_TOTAL":0,
   "GXI_ADMIN_WUI_HAS_DEFAULT_PASS":0,
   "GXI_SUPPORT_COLOR":1,
   "GXI_SYS_LUI_SUPPORT":0,
   GXI_A3_SUPPORT:0,
   GXI_TRAY2_MANDATORY_SUPPORT:0,
   "GXI_SWS_ADMIN_USE_AAA":0,
   "GXI_TONER_BLACK_VALID":1,
   "GXI_TONER_CYAN_VALID":1,
   "GXI_TONER_MAGENTA_VALID":1,
   "GXI_TONER_YELLOW_VALID":1,
   "GXI_IMAGING_BLACK_VALID":1,
   "GXI_IMAGING_CYAN_VALID":1,
   "GXI_IMAGING_MAGENTA_VALID":1,
   "GXI_IMAGING_YELLOW_VALID":1,
   "GXI_IMAGING_COLOR_VALID":1,
   "GXI_SUPPORT_PAPER_SETTING":1,
   "GXI_SUPPORT_PAPER_LEVEL":0,
   "GXI_SUPPORT_MULTI_PASS":1
}