Internet of Things

Original link:https://blog.heysh.xyz/2022/05/22/connect-every-something/

I was locked out. I miss 192.168.1.1 so much at times like this…and it’s also great for blogging to reminisce about the familiar web.

Whether it is an assembly machine at home or a wandering notebook, you can get a similar context at work, and sometimes you can even CTRL+C at home and CTRL+V at work. In addition to the Hongmeng system, it can also be achieved through a set of software.

The program I am currently using is as follows. Set the difficulty in order from easy to difficult.

Sync storage: Syncthing

Preconditions: Two (or more) high-capacity electronic devices

Compared with cloud storage, individuals prefer local synchronization solutions such as Syncthing: at least the files belong to themselves (and do not need to charge money). The installation is also very simple: install SyncTrayzor under Windows, install Syncthing-Fork under Android, and other systems can move here . After installation, select the working directory on both sides to complete two-way synchronization. Thanks to the STUN server, files can be transferred whether it is on the intranet or the extranet.

Of course, Syncthing also has certain problems. The first is that, because of the synchronization, the same file takes up a space on each device. In such a stretched environment as a mobile phone, it is recommended to use the “send only” mode, which is only used for backing up photos and the like.

In addition, when Syncthing is running, the devices on both sides must be kept on, and the electricity bill will be +1. When one party is offline, you need to pay attention to the version of the file, and do not modify the same file on both sides. After all, it’s not git, and the merge function is not that strong.

Note-taking software and document management

Preconditions: Syncthing or cloud storage is required for synchronization.

I use Joplin and Zotero for note-taking and document management, both of which can use Syncthing as a sync backend1 and both have note-taking capabilities. My habit is to write some longer notes in Joplin and the literature reading notes in Zotero.

Of course, as a blog post about “interconnection”, these two softwares can of course be connected to each other. I mainly use the following:

Inside Joplin

Of course, Joplin is not designed for double-chained notes, but through the plugin-note-link-system , some functions of double-chained notes can also be obtained. title; or see backlinks in another note.

Notes Citing Zotero References

Through the Quick Copy function of Better BibTeX for Zotero , press Ctrl+Shift+C to copy the current document into a link similar to [xxx](zotero://select/library/items/xxxxxx) . This method is also suitable for other note-taking software, as long as it can open the URL Scheme .

Cite other content on your computer

Surely no one wants to stuff all the files into the notebook database, and always have to reference some external files, then you still need to use the universal link. The link format here is like [xxx](file://C:\工作\xxx.docx) , which has both slashes and backslashes on Windows, but magically finds it correctly.

In fact, there is another problem. After synchronizing through Syncthing, the link address of the file on each computer is different. So, I made a folder link 2 on the C drive of each computer. Under Powershell:

 New-Item -ItemType Junction -Path "C:\工作" -Target "C:\实际的\工作\目录"

Or you can also use Link Shell Extension to do this. After that, C:\工作\xxx.docx will be accessible on each computer.

Ctrl+V anywhere, and upload files

This is Mr. Zhang: You press CTRL+C on the computer at home, and then press CTRL+V on the computer at the company. It will definitely not work. Even if the same article does not work. No, not even an expensive computer.

Preconditions: need to be under the same LAN – so it really doesn’t work.

I highly recommend KDE connect . Although it is produced by KDE, it can also be used on Windows and Android. Install this on your mobile phone and computer, you can share the clipboard under the same local area network, and you can also transfer files to each other.

However, sometimes KDE connect cannot find the LAN device. At this time, I will use the Wifi transmission plugin of Total Commander (Android), or python -m http.server .

Remote Access: Tailscale, Tinc or Wireguard

Prerequisites: 24-hour home slag/springboard/Raspberry Pi/NAS; VPS with public IP

Like I said before , currently, if I want to access my home LAN from outside, I use Tinc to set up the tunnel. When you are lucky (there is an IPv6 address outside, most of which are mobile phones sharing Wifi), you can directly connect to your own “springboard” (ARM slag) whose IPv6 address is bound to a domain name; if you are unlucky, it will automatically There is a foreign VPS for forwarding, and the speed is about ~100K/s. The performance would be better with Wireguard, but I haven’t found a simple node forwarding solution like Tinc.

After connecting to Tinc, you can wake up your other computers through Wake On LAN , and then use samba , remote desktop and other software. like coming home work from home Same!

Of course, in this need, the easiest one should be Tailscale , but due to persecution delusions, I have not tried it, but found something similar:

Spoiler: I didn’t use any of this in the end

Well, that’s all I want to say this time. The cold camp bed in the office was waiting for me.


  1. Joplin uses File System as sync target and Zotero uses Zotfile plugin. For myself, Joplin uses OneDrive, which is more convenient to sync on my phone than SyncThing; for Zotero, I built my own WebDAV service, purely because I didn’t find a plugin at the time. ↩

  2. In fact, it is Junction , which is completely transparent to the application, and the files on both sides are exactly the same. ↩

This article is reprinted from:https://blog.heysh.xyz/2022/05/22/connect-every-something/
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment