hassio 国内镜像加速设置方法

由于官方homeassistant 大部分docker镜像都使用了ghcr.io,不使用魔法基本上是无法访问的。
本人修改了homeassistant的supervisor,添加了镜像功能。
方法一:经测试无效
首先需要修改镜像

  1. nano /etc/hassio.json

将supervisor项的配置”ghcr.io/home-assistant/aarch64-hassio-supervisor” 改为 “docker.nju.edu.cn/xjboss/{arch}-hassio-supervisor”
使用加速地址 docker.nju.edu.cn/xjboss/{arch}-hassio-supervisor
{arch} 相当于是你的平台名称 比如x86 64位是amd64 arm64平台是aarch64

方法二:
修改hassio配置文件目录下的docker.json

  1. nano /usr/
…
发表在 常用链接 | 留下评论

traccar各设备通讯协议分析(坐标转换、逆地址解析)

OSM协议字符串:

  1. 2024-06-16 21:23:13 192.168.3.158   POST /?id=349574&timestamp=1714318553&lat=30.552737&lon=114.204453&speed=0.0&bearing=0.0&altitude=0.0&accuracy=0.0&batt=48.0 HTTP/1.1
  2. Content-Type: application/x-www-form-urlencoded
  3. User-Agent: Dalvik/2.1.0 (Linux; U; Android 10; HRY-AL00a Build/HONORHRY-AL00a)
  4. Host: 192.168.3.103:8082
  5. Connection: Keep-Alive
  6. Accept-Encoding: gzip
  7. Content-Length: 0
  8.  
  9.  
  10. 2024-06-16 21:23:43 192.168.3.158   POST /?id=349574&timestamp=1714318553&lat=30.552737&lon=114.204453&speed=0.0&bearing=0.0&altitude=0.0&accuracy=0.0&batt=48.0 HTTP/1.1
  11. Content-Type:
…
发表在 技术交流 | 2条评论

m401a armbian homeassistant 安装后 ,docker cgroup version问题!!!

Supervisor 依赖于要使用的特定版本的 Docker CGroup,因为 它取决于其功能才能正常工作。
目前,Supervisor 在安装中需要 CGroup v1,而新的linux内核已经升级为 cgroup v2 了, 导致后面addon有问题,然后有些功能运行不了。将armbian切换到V1版本的方法:
编辑 /boot/vEnv.txt 文件,在文件的最后一行后面添加“systemd.unified_cgroup_hierarchy=false”,不要换行。

  1. LINUX=/zImage
  2. INITRD=/uInitrd
  3. FDT=/dtb/amlogic/meson-g12a-s905l3a-m401a.dtb
  4. APPEND=root=UUID=b1a37056-5e23-4626-86f5-920667bdf8dc rootflags=data=writeback rw rootfstype=ext4 console=ttyAML0,115200n8 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes
…
发表在 技术交流 | 一条评论

新魔百盒M401A、UNT403A、UNT413A晶晨S905L3A芯片线刷

https://www.znds.com/tv-1227588-1-1.html

s905.jpg
m401a.jpeg

原文作者: BG6RSH | 查看原帖…

发表在 常用链接 | 3条评论

qDebug() 打印出来的QString类型带引号解决方法

问题1:输出无中文

  1. qDebug() << QString("hello") << "hello";

输出结果:
“hello” hello

解决方法1:
使用 qPrintable方法

  1. qDebug() << qPrintable(QString("hello"
…
发表在 学习笔记 | 留下评论

QString字符串转char*等函数

在进行多线程编程时,一个局部QString对象,经过转换成char*后,当做参数传入线程函数,结果输入一直为空。

qPrintable() 和 strdup()
qPrintable() 和 strdup() 是 Qt 中常用的字符串转换函数。
qPrintable() 函数用于将 QString 类型转换成 char* 类型,用于 C++ 中使用的字符串函数。例如:

  1. QString str = "Hello World";
  2. qDebug() << qPrintable(str);     //
…
发表在 学习笔记 | 留下评论

linux全局、apt、wget、curl代理服务器设置

一、apt代理(nano /etc/apt/apt.conf)

  1. Acquire::http::proxy "http://username:[email protected]:9128";
  2. Acquire::ftp::proxy "http://username:[email protected]:9128";
  3. Acquire::https::proxy "http://username:[email protected]:9128";

二、wget代理(nano /etc/wgetrc)

  1. #You can set the default proxies for Wget to use for http, https, and
…
发表在 学习笔记 | 一条评论

python pip 国内源、http代理设置

windows 文件位置(以下三个均可)
C:\ProgramData\pip\pip.ini(全局)
C:\Users\YOURUSERNAME\pip\pip.ini(单个用户配置)
C:\Users\YOURUSERNAME\AppData\Roaming\pip\pip.ini(单个用户配置)

pip.conf文件位置(Linux)
~/.pip/pip.conf

  1. [global]
  2. index-url=https://pypi.tuna.tsinghua.edu.cn/simple
  3. proxy=http://d45623:[email protected]:9128
  4. [install]
  5. trusted-host=https://pypi.tuna.tsinghua.edu.cn

原文作者: BG6RSH | 查看原帖…

发表在 学习笔记 | 留下评论

群晖中Mosquitto服务配置说明

一、添加第三方源,安装Mosquitto服务
https://spk7.imnks.com

m1.PNG
m2.PNG

二、登录群晖SSH服务,再使用root用户登录

  1. sudi -i

1、编辑 mosquitto.conf 配置文件,修改用户密码文件、监听IP两处设置,修改后的内容如下:

  1. password_file /volume1/@appdata/mosquitto/passwd
  2. listener 1883 0.0.0.0

2、创建新用户:

  1.  mosquitto_passwd -b
…
发表在 学习笔记 | 留下评论

RemixIcon 一个开源图标库

一套免费、可商用、设计精美、细致的图标库。看到它第一眼后,我感觉自己之前用的图标简直就是枯草 :mrgreen: 。这个项目可以让开发者、设计师在一个图标库中快速找到适合的图标,用于自己的网站或 APP 开发。不同于混搭收集的图标库,RemixIcon 的每一枚图标都是由设计师精心设计而成,并且每一枚图标都包含填充和描边两种风格,便于切换使用。
https://remixicon.com/

原文作者: BG6RSH | 查看原帖…

发表在 常用链接 | 2条评论