question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Samsung SyncThru Printer doesn’t reconnect printer

See original GitHub issue

The problem

The Samsung SyncThru Printer integration doesn’t properly reconnect with my Samsung C48x Series printer. This happens when this printer gets power cycled while home assistant remains running. It gets in a connect/disconnect cycle (see log below). Reload of the integration is needed to fix the issue.

What version of Home Assistant Core has the issue?

2021.12.6

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Samsung SyncThru

Link to integration documentation on our website

https://www.home-assistant.io/integrations/syncthru/

Example YAML snippet

-

Anything in the logs that might be useful for us?

Logger: homeassistant.components.syncthru
Source: components/syncthru/__init__.py:38 
Integration: Samsung SyncThru Printer (documentation, issues) 
First occurred: 15:18:45 (8 occurrences) 
Last logged: 15:23:15

Unexpected error fetching syncthru data: Invalid host, does not support SyncThru JSON API.
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pysyncthru/__init__.py", line 82, in _current_data
    res = demjson3.decode(
  File "/usr/local/lib/python3.9/site-packages/demjson3.py", line 6423, in decode
    result = j.decode(
  File "/usr/local/lib/python3.9/site-packages/demjson3.py", line 5607, in decode
    raise errors[0]
demjson3.JSONDecodeError: ('Line terminator characters must be escaped inside string literals', 'U+000A')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 147, in _async_update_data
    return await self.update_method()
  File "/usr/src/homeassistant/homeassistant/components/syncthru/__init__.py", line 46, in async_update_data
    raise api_error
  File "/usr/src/homeassistant/homeassistant/components/syncthru/__init__.py", line 38, in async_update_data
    await printer.update()
  File "/usr/local/lib/python3.9/site-packages/pysyncthru/__init__.py", line 69, in update
    self.data = await self._current_data()
  File "/usr/local/lib/python3.9/site-packages/pysyncthru/__init__.py", line 94, in _current_data
    raise SyncThruAPINotSupported(
pysyncthru.SyncThruAPINotSupported: Invalid host, does not support SyncThru JSON API.

Additional information

The printer Itself is working normally. It is only the integration that doesn’t reconnect properly.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
nielstroncommented, Jul 24, 2022

Hm the error message suggests that the printer does sometimes send invalid JSON (maybe when queried while power cycling?) If you could provide me with the content of http://<ip of printer>/sws/app/information/home/home.json I can try to handle that manually. I unfortunately own none of the mentioned devices for reproducing.

1reaction
shelasmaxcommented, Jul 15, 2022

i have the same problem. Configured printer does not respond

Read more comments on GitHub >

github_iconTop Results From Across the Web

Samsung Laser Printers - How to Setup Wi-Fi Direct
Printer connected with USB · Open Easy Printer Manager and switch to Advanced Mode. · Select your printer and click Device Settings tab....
Read more >
Samsung WiFi printer can't connect to new Quantum Gateway ...
All you have to do is log in to the printer web page. Then, under Settings--> Network Settings--> Wi-Fi Direct... Turn Wi-Fi Direct...
Read more >
Wireless network setup
You need to wait 2 minutes to re-connect to the wireless network. ... Can start to build Wi-Fi Direct by using Samsung Easy...
Read more >
Question - Samsung ML 2525W wireless printer won't connect ...
Doesn't show up as being connected to my router when I use an ... (When 1st got printer the Samsung Sync Thru, after...
Read more >
Samsung C410W registers (maybe) but never goes online
Now I see the printer in the Google Cloud Print list, but it appears offline and never goes online. In the SyncThru GCP...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found