Evidlo / remarkable_news

Daily news/comics on your reMarkable's suspend screen

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remarkable 2 compatibility

faroit opened this issue · comments

I can't get it to work using macOS and remarkable2

Identity added: /Users/faro/.ssh/id_rsa (/Users/xxxx/.ssh/id_rsa)
Failed to stop renews.service: Unit renews.service not loaded.
make: *** [install_nyt] Error 5

any idea?

Try with the latest commit. It should ignore this error if it occurs and continue on.

that helps put it doesn't seem to actually execute the service. Is there a way to manually trigger and debug it?

reMarkable: /etc/systemd/system/ systemctl -a | grep renews
  renews.service  loaded    active   running   New York Times

You can run journalctl --unit renews -e to check the logs. The service will sit idle until you connect to a wifi network.

-- Logs begin at Wed 2020-11-04 21:23:59 UTC, end at Sat 2020-11-14 16:27:11 UTC. --
Nov 13 09:19:18 reMarkable systemd[1]: Started New York Times.
Nov 13 09:20:30 reMarkable systemd[1]: Stopping New York Times...
Nov 13 09:20:30 reMarkable systemd[1]: Stopped New York Times.
Nov 13 09:20:30 reMarkable systemd[1]: Started New York Times.
Nov 13 09:26:50 reMarkable systemd[1]: Stopping New York Times...
Nov 13 09:26:50 reMarkable systemd[1]: Stopped New York Times.
Nov 13 09:29:08 reMarkable systemd[1]: Started New York Times.
Nov 14 16:26:46 reMarkable systemd[1]: Stopping New York Times...
Nov 14 16:26:46 reMarkable systemd[1]: Stopped New York Times.
Nov 14 16:26:46 reMarkable systemd[1]: Started New York Times.

it showed all the timestamps where I manually restarted the service but it didn't write suspended.png at any time.

Is there a way to manually run the renews for testing?

@Evidlo

./renews.arm -test -output /tmp/dump.png -verbose -url https://xkcd.com -xpath '//div[@id="comic"]/img/@src'

works fine for me, even when directly writing to /usr/share/remarkable/suspended.png. Still the service doesn't seem to be triggered by my remarkable 2. So I guess there is some problem detecting the if up/down?

So I guess there is some problem detecting the if up/down?

The magic happens in wifi.go. It waits for xochitl to emit a dbus message when WiFi is turned on.

The magic happens in wifi.go. It waits for xochitl to emit a dbus message when WiFi is turned on.

i think the wifi interface has changed so this would need to be updated. What ID am I looking for?

Changing 'path=/org/freedesktop/network1/link/_34' to 'path=/org/freedesktop/network1/link/_311' worked for me for my remarkable 2

@limyewjin The contributor in this PR claimed that the ID is changing. Is that not the case for you?

@Evidlo yes, I can confirm its changing on RM2

@Evidlo Ack. Too eager to see RM2 working on a wifi change and forgot to test another time. What about changing match rule to use arg0:
"interface='org.freedesktop.DBus.Properties',member='PropertiesChanged',arg0='org.freedesktop.network1.Link'"

@limyewjin i'll give this a shot tonight. If there's any luck i'll drop it into my PR.

Thanks for those insights btw.

This should be fixed by #17

@Evidlo #17 didn't fix it for me

@faroit Can you be more specific? I don't have an rM2 so I rely on other people for debug information.

Applied 2.5 update, script still runs, but getting remarkable is sleeping for suspend screen:

Edit: Nevermind, appears to be caching issue from 2.5.0.27

-- Logs begin at Fri 2020-12-11 15:04:21 UTC, end at Fri 2020-12-11 15:13:21 UTC. --
Dec 11 15:08:03 reMarkable systemd[1]: Started New York Times.
Dec 11 15:08:03 reMarkable renews.arm[332]: [dbus message: [:1.7]]
Dec 11 15:10:18 reMarkable systemd[1]: Stopping New York Times...
Dec 11 15:10:18 reMarkable systemd[1]: Stopped New York Times.
Dec 11 15:10:22 reMarkable systemd[1]: Started New York Times.
Dec 11 15:10:22 reMarkable renews.arm[407]: [dbus message: [:1.8]]
Dec 11 15:10:46 reMarkable renews.arm[407]: [dbus message: [org.freedesktop.network1.Link map[OperationalState:"off"] []]]
Dec 11 15:10:52 reMarkable renews.arm[407]: [dbus message: [org.freedesktop.network1.Link map[OperationalState:"no-carrier"] []]]
Dec 11 15:10:57 reMarkable renews.arm[407]: [dbus message: [org.freedesktop.network1.Link map[OperationalState:"dormant"] []]]
Dec 11 15:10:57 reMarkable renews.arm[407]: [dbus message: [org.freedesktop.network1.Link map[OperationalState:"carrier"] []]]
Dec 11 15:10:59 reMarkable renews.arm[407]: [dbus message: [org.freedesktop.network1.Link map[OperationalState:"degraded"] []]]
Dec 11 15:11:03 reMarkable renews.arm[407]: [dbus message: [org.freedesktop.network1.Link map[OperationalState:"routable"] []]]
Dec 11 15:11:03 reMarkable renews.arm[407]: [Network online]
Dec 11 15:11:08 reMarkable renews.arm[407]: [Beginning download]
Dec 11 15:11:11 reMarkable renews.arm[407]: [Adjusting image]
Dec 11 15:11:16 reMarkable renews.arm[407]: [Image saved to  /usr/share/remarkable/suspended.png]
Dec 11 15:11:41 reMarkable renews.arm[407]: [dbus message: [org.freedesktop.network1.Link map[OperationalState:"no-carrier"] []]]
Dec 11 15:11:48 reMarkable renews.arm[407]: [dbus message: [org.freedesktop.network1.Link map[OperationalState:"degraded"] []]]
Dec 11 15:11:48 reMarkable renews.arm[407]: [dbus message: [org.freedesktop.network1.Link map[AdministrativeState:"configuring"] []]]
Dec 11 15:11:48 reMarkable renews.arm[407]: [dbus message: [org.freedesktop.network1.Link map[OperationalState:"routable"] []]]
Dec 11 15:11:48 reMarkable renews.arm[407]: [Network online]
Dec 11 15:11:48 reMarkable renews.arm[407]: [dbus message: [org.freedesktop.network1.Link map[AdministrativeState:"configuring"] []]]
Dec 11 15:11:48 reMarkable renews.arm[407]: [dbus message: [org.freedesktop.network1.Link map[AdministrativeState:"configured"] []]]
Dec 11 15:11:53 reMarkable renews.arm[407]: [Hit cooldown limit]

Well the dbus issue is fixed. Seems like the remaining problem is #25

@faroit Can you be more specific? I don't have an rM2 so I rely on other people for debug information.

I can debug, if you provide some instruction how to look for the right network device.

@faroit The dbus problem is fixed based on the log provided by @mjameson.

Yes. Works for me now. Thanks for your effort