diff --git a/archives/2018/09/index.html b/archives/2018/09/index.html index a8a8bf5..76e7f58 100644 --- a/archives/2018/09/index.html +++ b/archives/2018/09/index.html @@ -400,7 +400,7 @@ pjax_google_analytics = () => {
- 40 Posts In Total + 41 Posts In Total
diff --git a/archives/2018/12/index.html b/archives/2018/12/index.html index 2c3fa19..e436e49 100644 --- a/archives/2018/12/index.html +++ b/archives/2018/12/index.html @@ -400,7 +400,7 @@ pjax_google_analytics = () => {
- 40 Posts In Total + 41 Posts In Total
diff --git a/archives/2018/index.html b/archives/2018/index.html index 5b70460..e27d2ab 100644 --- a/archives/2018/index.html +++ b/archives/2018/index.html @@ -400,7 +400,7 @@ pjax_google_analytics = () => {
- 40 Posts In Total + 41 Posts In Total
diff --git a/archives/2019/01/index.html b/archives/2019/01/index.html index d6760dd..bf63044 100644 --- a/archives/2019/01/index.html +++ b/archives/2019/01/index.html @@ -400,7 +400,7 @@ pjax_google_analytics = () => {
- 40 Posts In Total + 41 Posts In Total
diff --git a/archives/2019/02/index.html b/archives/2019/02/index.html index 47a4c54..54b239e 100644 --- a/archives/2019/02/index.html +++ b/archives/2019/02/index.html @@ -400,7 +400,7 @@ pjax_google_analytics = () => {
- 40 Posts In Total + 41 Posts In Total
diff --git a/archives/2019/03/index.html b/archives/2019/03/index.html index 891e839..304ff87 100644 --- a/archives/2019/03/index.html +++ b/archives/2019/03/index.html @@ -400,7 +400,7 @@ pjax_google_analytics = () => {
- 40 Posts In Total + 41 Posts In Total
diff --git a/archives/2019/04/index.html b/archives/2019/04/index.html index af1d352..9841ac1 100644 --- a/archives/2019/04/index.html +++ b/archives/2019/04/index.html @@ -400,7 +400,7 @@ pjax_google_analytics = () => {
- 40 Posts In Total + 41 Posts In Total
diff --git a/archives/2019/05/index.html b/archives/2019/05/index.html index b8f657d..20d587a 100644 --- a/archives/2019/05/index.html +++ b/archives/2019/05/index.html @@ -400,7 +400,7 @@ pjax_google_analytics = () => {
- 40 Posts In Total + 41 Posts In Total
diff --git a/archives/2019/07/index.html b/archives/2019/07/index.html index a9cc469..f424856 100644 --- a/archives/2019/07/index.html +++ b/archives/2019/07/index.html @@ -400,7 +400,7 @@ pjax_google_analytics = () => {
- 40 Posts In Total + 41 Posts In Total
diff --git a/archives/2019/09/index.html b/archives/2019/09/index.html index 4374ac4..33dc151 100644 --- a/archives/2019/09/index.html +++ b/archives/2019/09/index.html @@ -400,7 +400,7 @@ pjax_google_analytics = () => {
- 40 Posts In Total + 41 Posts In Total
diff --git a/archives/2019/10/index.html b/archives/2019/10/index.html index 97830e2..086b80d 100644 --- a/archives/2019/10/index.html +++ b/archives/2019/10/index.html @@ -400,7 +400,7 @@ pjax_google_analytics = () => {
- 40 Posts In Total + 41 Posts In Total
diff --git a/archives/2019/index.html b/archives/2019/index.html index ea7c902..0c1738d 100644 --- a/archives/2019/index.html +++ b/archives/2019/index.html @@ -400,7 +400,7 @@ pjax_google_analytics = () => {
- 40 Posts In Total + 41 Posts In Total
diff --git a/archives/2020/01/index.html b/archives/2020/01/index.html index 5fbc280..fac5343 100644 --- a/archives/2020/01/index.html +++ b/archives/2020/01/index.html @@ -400,7 +400,7 @@ pjax_google_analytics = () => {
- 40 Posts In Total + 41 Posts In Total
diff --git a/archives/2020/02/index.html b/archives/2020/02/index.html index 5c0350e..fdcb223 100644 --- a/archives/2020/02/index.html +++ b/archives/2020/02/index.html @@ -400,7 +400,7 @@ pjax_google_analytics = () => {
- 40 Posts In Total + 41 Posts In Total
diff --git a/archives/2020/06/index.html b/archives/2020/06/index.html index 977a143..e3d79dc 100644 --- a/archives/2020/06/index.html +++ b/archives/2020/06/index.html @@ -400,7 +400,7 @@ pjax_google_analytics = () => {
- 40 Posts In Total + 41 Posts In Total
diff --git a/archives/2020/08/index.html b/archives/2020/08/index.html index f5b3787..4bc6cec 100644 --- a/archives/2020/08/index.html +++ b/archives/2020/08/index.html @@ -400,7 +400,7 @@ pjax_google_analytics = () => {
- 40 Posts In Total + 41 Posts In Total
diff --git a/archives/2020/09/index.html b/archives/2020/09/index.html index c91f6cc..f35f20e 100644 --- a/archives/2020/09/index.html +++ b/archives/2020/09/index.html @@ -400,7 +400,7 @@ pjax_google_analytics = () => {
- 40 Posts In Total + 41 Posts In Total
diff --git a/archives/2020/11/index.html b/archives/2020/11/index.html new file mode 100644 index 0000000..dbece48 --- /dev/null +++ b/archives/2020/11/index.html @@ -0,0 +1,704 @@ + + + + Archives - EEE.DOG + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+
+
+
+
+ + +
+ + +
+
+
+ + 41 Posts In Total + +
+
+

2020

+
+
+ + 11-04 + + + + Ushio-V2ray使用方法Ushio V2ray Instruction + + +
+
+
+ +
+ +
+ +
+ +
+
+ + + + + + + + + + + + + + + diff --git a/archives/2020/index.html b/archives/2020/index.html index b0e9bd8..00b9365 100644 --- a/archives/2020/index.html +++ b/archives/2020/index.html @@ -400,13 +400,23 @@ pjax_google_analytics = () => {
- 40 Posts In Total + 41 Posts In Total

2020

+ + 11-04 + + + + Ushio-V2ray使用方法Ushio V2ray Instruction + + +
+
09-15 diff --git a/archives/index.html b/archives/index.html index 2823231..fa8d9e5 100644 --- a/archives/index.html +++ b/archives/index.html @@ -400,13 +400,23 @@ pjax_google_analytics = () => {
- 40 Posts In Total + 41 Posts In Total

2020

+ + 11-04 + + + + Ushio-V2ray使用方法Ushio V2ray Instruction + + +
+
09-15 diff --git a/atom.xml b/atom.xml index d90cf13..c4f105b 100644 --- a/atom.xml +++ b/atom.xml @@ -6,7 +6,7 @@ - 2020-09-16T01:48:14.523Z + 2020-11-04T05:08:42.544Z https://www.eee.dog/ @@ -16,14 +16,46 @@ Hexo + + Ushio-V2ray使用方法 + + https://www.eee.dog/tech/v2ray-instruction.html + 2020-11-03T16:00:00.000Z + 2020-11-04T05:08:42.544Z + +

Ushio V2ray 使用方法。

Ushio V2ray Instruction..

流程总览

  • 用户注册
  • v2ray软件安装

用户注册

在开始安装软件前,请先前往https://v2ray.yimian.xyz/使用手机号进行账户注册。

v2ray软件安装

本文包含Win10安卓IOS/Ipad OS的软件安装方法,请根据相应流程进行安装。

如果您有任何疑惑,请在下方评论中提出!

Win10

下载

解压

  • 将下载的压缩文件解压到C盘根目录,如下图

    如果提示需要管理员权限,请一律选

    解压文件图

配置

  • 请打开C盘中刚才解压的文件夹,找到名为V2rayV2rayN.exe的程序,双击打开。如下图。
    V2rayN图

  • 找到右下角任务栏,找到下图中的图标,双击打开
    V2rayN图标

  • 选中窗口上方的订阅,点击订阅设置如下图
    订阅设置

  • 打开https://v2ray.yimian.xyz并登录,待出现二维码后点击Copy。如下图
    获取订阅地址

  • 回到订阅设置的窗口,将刚才复制的内容粘贴到地址URL框中,勾选启用,点击确定。如下图
    设置订阅地址

  • 点击主窗口上方的参数设置如下图

参数设置

  • 选择V2rayN设置,勾选开机自动启动,点击下方确定。如下图

开机启动

  • 回到主窗口,点击更新订阅如下图

更新订阅

  • 此时,主窗口中会多出一个或几个服务器,如下图

    服务器列表

  • 关闭主窗口,右键右下角状态栏中的V2ray,选择服务器->Vmess-Los_Angeles(….。如下图
    选择服务器

  • 右键右下角状态栏中的V2ray,选择Http代理->…(PAC模式)。如下图
    PAC模式

验证

Android

下载安装软件

配置

  • 使用手机浏览器,打开https://v2ray.yimian.xyz/,进行登录
  • 待页面显示出二维码,点击Copy
  • 打开安装的V2rayNG软件,点击左上角三条杠,展开左侧栏,点击订阅设置
  • 进入订阅设置页面后,点击右上角加号
  • 备注中填ushio, 地址url中填刚才复制的东西,点击右上角对勾。
  • 回到主页面,点击左上角三条杠,展开左侧栏,点击设置
  • 进入设置页面后,点击分应用代理
  • 勾选分应用代理模式,然后在列表中勾选需要访问外网的app,如twitter, youtube等
  • 回到主页面,点击右上角三个点,点击更新订阅
  • 点一下主页面列表中的Los_Angeles,使其左侧变绿
  • 点击主页面右下角的V图标,使其变绿

验证

  • 点击主页面下方已连接,点击测试连接语句,检测连接是否成功

Ios

  • 在系统设置中更改苹果账户的地区到中国大陆以外的地方,比如英国、美国等。
  • 在app store购买并安装Shadowrocket软件
  • 使用浏览器打开https://v2ray.yimian.xyz,进行登录
  • 待页面显示出二维码,点击Copy
  • 打开Shadowrocket软件
  • 点击右上角加号
  • 类型选择Subscribe
  • URL中粘贴刚才复制的东西
  • 点击右上角完成
  • 点击首页中的api.yimian.xyz,点击Los_Angeles
  • 在首页第一行,勾选Los_Angeles
  • 使用浏览器访问https://google.com试一下

Process overview

  • User registration
  • v2ray software installation

User registration

Before installing the software, please go to https://v2ray.yimian.xyz/ to register with your mobile phone number.

v2ray software installation

This article contains software installation methods for Win10, Android, IOS/Ipad OS, please install according to the corresponding process.

Win10

download

  • Use a browser to visit http://eee.dog/8bcc14 and download the name Windows_v2rayN-Core.zipThe compressed file.

Unzip

  • Decompress the downloaded compressed file to the root directory of drive C, as shown below

    If you are prompted to require administrative permissions, please select all yes

    Extracted file image

Configuration

  • Please open the folder just unzipped in the C drive, find the program named V2ray or V2rayN.exe, and double-click to open it. As shown below.
    V2rayN picture

  • Find the taskbar in the lower right corner, find the icon in the figure below, double-click to open
    V2rayN icon

  • Select Subscription at the top of the window, and click Subscription Settings as shown below
    Subscription Settings

  • Open https://v2ray.yimian.xyz and log in. After the QR code appears, click Copy. As shown below
    Get subscription address

  • Go back to the subscription settings window, paste the content you just copied into the Address URL box, check Enable, and click OK. As shown below
    Set subscription address

  • Click Parameter Settings at the top of the main window as shown below

Parameter settings

  • Select V2rayN Settings, tick Autostart at boot, and click OK below. As shown below

Start on boot

  • Back to the main window, click Update Subscription as shown below

Update Subscription

  • At this time, there will be one or more servers in the main window, as shown below

    Server list

  • Close the main window, right-click V2ray in the status bar at the bottom right corner, and select Server->Vmess-Los_Angeles(….. As shown below
    Select Server

  • Right-click V2ray in the status bar at the bottom right corner, and select Http Proxy->…(PAC Mode). As shown below
    PAC Mode

verification

Android

Download and install software

  • Open the browser http://eee.dog/6db2e3 to download the V2ray Android installation package
  • Click to open the installation package to install

Configuration

  • Use your mobile browser to open https://v2ray.yimian.xyz/ and log in
  • When the QR code is displayed on the page, click Copy
  • Open the installed V2rayNG software, click the three bars in the upper left corner, expand the left column, and click Subscription Settings
  • After entering the subscription settings page, click the plus sign in the upper right corner
  • Fill in ushio in the remarks, fill in the things you just copied in the address url, and click the tick in the upper right corner.
  • Back to the main page, click the three bars in the upper left corner, expand the left column, and click Settings
  • After entering the settings page, click Sub App Proxy
  • Check the Sub App Proxy mode, and then check the apps that need to access the Internet, such as twitter, youtube, etc.
  • Back to the main page, click the three dots in the upper right corner, and click Update Subscription
  • Tap Los_Angeles in the main page list to make the left side green
  • Click the V icon in the lower right corner of the main page to make it green

verification

  • Click Connected at the bottom of the main page, click the test connection statement to check whether the connection is successful

Ios

  • Change the Apple account area in the system settings to a place outside of mainland China, such as the United Kingdom, the United States, etc.
  • Purchase and install Shadowrocket software in the app store
  • Use a browser to open https://v2ray.yimian.xyz and log in
  • When the QR code is displayed on the page, click Copy
  • Open the Shadowrocket software
  • Click the plus sign in the upper right corner
  • Type selection Subscribe
  • Paste what you just copied in the URL
  • Click on the upper right corner to finish
  • Click api.yimian.xyz on the homepage, click Los_Angeles
  • On the first line of the homepage, check Los_Angeles
  • Use a browser to visit https://google.com to try
]]>
+ + + + <span class=".zh"> +<p>Ushio V2ray 使用方法。</p> +</span> + + +<span class=".en"> +<p>Ushio V2ray Instruction..</p> +</span> + + + + + + + + + + + +
+ wIoT发展展望 https://www.eee.dog/tech/wiot2.html 2020-09-14T16:00:00.000Z - 2020-09-16T01:48:14.523Z + 2020-09-30T03:53:23.942Z -

本文将讨论wiot项目下一步的发展目标与实施方法。

This article will discuss the next development goals and implementation methods of the Wiot project.

wIoT

wiot,一个基于NodeJS的分布式物联网操作系统。

项目简介

立项初衷

本项目旨在帮助不熟悉固件编程的网络开发者实现出自己的物联网应用。

在开发传统的物联网程序时,我们需要一次又一次的编写,烧录,调试每一个开发板,以某种方式将其相连结,以提供某种服务。这样的方式非常繁琐,开发成本和门槛都比较高。此外,古老的C和C++语言缺少成熟的依赖管理工具,以至于我们在编写开发板时难以像开发python或nodeJS程序一样轻松便捷。

本项目试图提供一种方法,将烧录,调试开发板的流程自动化,并将逻辑编写的步骤移动到远程计算机的NodeJS界面上。通过此方式,我们进而得以将分布式物联网节点的功能进行集中化管理。此外,借助NodeJS成熟的依赖管理器npm,使得物联网应用的开发更加便捷高效。

至此,下到每一个物联网节点,上到各种类型的数据库、用户终端,都可以在同一个nodeJS界面上配置、操作。开发者将能够专注于物联网逻辑的开发,实现出更加丰富多彩的物联网应用。

第一轮开发

第一轮开发完成于2019.5,详见这篇博客

实现了对D1 MINI开发板对nodeJS的pin口映射,并支持诸如ota等一系列功能。

第二轮开发

待进行,计划当做FYP项目

支持的开发版

实现方法

通过提供标准化的单片机固件以及自动化的烧录工具,wiot将各开发板的pin口功能进行抽象,整理,并映射为可调用的NodeJS接口。

wiot Architecture

如上图所示,wiot架构主要包含三部分:Node节点,wiot Cloud Module云模块,wiot cli命令行程序。其中,Node节点为烧录好wiot固件的NodeMCU单片机,他们通过IEEE 802.11 WiFi进行分布式通信,并于某个节点接入路由器以连接wiot云模块。用户在自己的PC上使用NodeJS调用wiot依赖编写物联网程序。完成后,用户使用wiot cli对开发好的程序进行检查、测试和部署。被部署的物联网程序将运行在wiot云模块上,并可使用nodeJS的接口与其它云服务或数据库进行交互。

Node节点

Node节点使用的是NodeMCU开发板(基于ESP8266的扩展板)。在使用wiot-cli烧录wiot固件后,NodeMCU将成为wiot节点。

模式

wiot节点有四种模式:master模式、slave模式、bridge模式和debug模式。此模式只能在烧录固件时配置。master模式和bridge模式下,nodeMCU将同时开启STA和AP模式。slave模式下则只开启STA模式。master需要有稳定且无限制的电源供电,其功率较大(包含RSA, 协议转换等),不适合低功耗场景。bridge与slave则可以灵活调整功率,可用于低功耗场景。

debug模式下节点工作在STA和AP模式,用户可以使用手机等设备连接到此节点,并打开根目录网页。网页上将实时显示此节点当前所处位置的各种信息,比如收到各其它节点的信号强度等,适用于挑选部署场景。

低功耗

wiot节点支持低功耗(Low Power)状态。但此状态仅能在slave模式和bridge下开启。此状态可通过wiot api或者wiot-cli进行开启或关闭。低功耗状态由esp8266睡眠功能实现。此状态下可由干电池供电工作数年[1]

组网

wiot节点使用分布式组网。在路由器信号较强的地方,master节点将接入路由器WiFi网络,并桥接。在路由器信号不强的地方,每一个节点都会找到信号最强的另一个上游的master或bridge节点,并桥接(slave除外)。

wiot节点分布式组网

如上图,两个距离路由器近的master节点自动接入到路由器wifi。下游的其它节点分别连接至信号最强的上游节点。

认证

射频指纹识别[2]
wiot节点支持使用射频指纹识别[2]来实现下游通信认证。此方法使用esp8266的RSSI函数以及scan返回参数。在下游设备试图接入网络时,上游设备将搜集指纹信息并向服务器汇报。服务器将指纹与数据库存储的先前版本进行比对,并作出是否允许入网的决策。

云模块

云模块充当wiot的云部分,提供云的功能。云模块能够守护运行run-time状态下的wiot程序。此外,云模块还能够提供测试,部署等功能。云模块使用Docker进行虚拟化。

命令行程序

即wiot-cli。是wiot在开发者终端上提供的操作工具集。通过wiot-cli,开发者可以实现对wiot程序的测试,部署,恢复等功能。此外,wiot-cli也支持一系列debug等常用功能。详见下方wiot-cli命令

用户操作步骤

  1. 用户下载安装并配置好NodeJS环境。
  2. 用户通过命令行运行npm i -g wiot-cli指令安装wiot命令行工具
  3. 用户运行命令wiot init my-wiot-proj在当前目录新建并配置一个wiot项目文件夹,项目名称为my-wiot-proj。此时,会提示用户填写此项目的一些信息,比如项目描述,作者信息,路由器WiFi账户密码,wiot云模块地址,项目主脚本等。
  4. 用户进入到项目目录,将nodeMCU通过数据线连接到电脑,运行wiot node init my-first-node [--type=<master|slave|bridge|debug>]。这将自动配置并将wiot固件烧录到nodeMCU开发板,并将其命名为my-first-node。type为可选参数,可设置为masterslavebridgedebug,默认为master
  5. 依次按照此方法烧录好所有的开发板,将其部署在生产环境。
  6. 在项目文件夹运行指令wiot status查看是否所有节点均已在线。如果没有,使用指令wiot log配合grep工具查找日志定位问题。
  7. 从项目主脚本(默认是index.js)开始编写你的wiot程序。
  8. 使用指令wiot check检查你wiot程序的逻辑问题。
  9. 使用指令wiot test将挂起云模块中正在运行的程序,并运行当前项目文件夹中的程序。此时,所有控制台输出将显示在你的命令行窗口。使用Ctrl+C终止当前测试并恢复云模块先前的程序。
  10. 使用指令wiot push将本地的wiot程序部署到云端。

其它操作

部署自己的wiot云模块

默认使用wiot官方wiot云模块。你也可以部署自己的wiot云服务,方法如下:

安装docker并运行指令docker run -d --name=wiot-cloud -p 3594:3594 -v /var/wiot/data/:/var/wiot/data/ iotcat/wiot

wiot-cli命令

  • wiot help [command]查看帮助
  • wiot clone <host:user/project>将项目从云模块克隆到本地
  • wiot pull使用远程代码覆盖本地代码
  • wiot push将当前文件夹wiot程序部署到云模块
  • wiot ls显示当前所有节点
  • wiot map [nodeID]显示某节点的连接路径
  • wiot log [nodeID] [--head=<number>|--tail=<number>]查看某节点的日志
  • wiot stop停止wiot服务
  • wiot start开启wiot服务
  • wiot restart重启wiot服务
  • wiot reload在不重置flash变量情况下重启wiot服务
  • wiot init <name>新建并初始化wiot项目文件夹
  • wiot node init <node-name> [--type=<master|slave|bridge|debug>]配置并烧录nodeMCU开发板
  • wiot check检查当前文件夹项目逻辑问题。
  • wiot test将挂起云模块中正在运行的程序,并运行当前项目文件夹中的程序。此时,所有控制台输出将显示在你的命令行窗口。使用Ctrl+C终止当前测试并恢复云模块先前的程序。
  • wiot status [nodeID]显示当前项目或节点状态信息
  • wiot debug start终止当前云端程序并进入debug模式
  • wiot debug set <nodeID> <pinID> <0-255>debug模式下设置某个节点pin的PWM输出值
  • wiot debug reset <nodeID>debug模式下重置某个节点的数据存储,并重连
  • wiot debug get <nodeID> <pinID>debug模式下获取某个节点pin的PWM值
  • wiot debug sleep <nodeID> <pinID> <HIGH|LOW>debug模式下设置某节点轻度休眠,直到被某pin的高或低电平唤醒
  • wiot debug dsleep <nodeID> <millisecond>debug模式下设置某节点深度休眠多少毫秒
  • wiot debug reconnect [nodeID]debug模式下重新组网或断开重连某个节点
  • wiot debug setphymode <nodeID> <b|g|n>debug模式下配置节点WiFi协议为802.11b|g|n
    ···

常用API

待设计,请参考一轮开发wiot文档

wIoT

Wiot, a distributed IoT operating system based on NodeJS.

Project Description

The original intention of the project

This project aims to help web developers who are not familiar with firmware programming to implement their own IoT applications.

When developing traditional Internet of Things programs, we need to write, burn, and debug each development board again and again, and connect them in a certain way to provide a certain service. This method is very cumbersome, and the development cost and threshold are relatively high. In addition, the ancient C and C++ languages ​​lack mature dependency management tools, so that it is difficult for us to write development boards as easy and convenient as developing python or nodeJS programs.

This project is trying to provide a method to automate the process of burning and debugging the development board, and move the steps of logic writing to the NodeJS interface of the remote computer. In this way, we are able to centrally manage the functions of distributed IoT nodes. In addition, with NodeJS’s mature dependency manager npm, the development of IoT applications is more convenient and efficient.

So far, down to every IoT node, up to various types of databases and user terminals, all can be configured and operated on the same nodeJS interface. Developers will be able to focus on the development of IoT logic and realize more colorful IoT applications.

First round of development

The first round of development was completed in May 2019, please refer to this blog

Realize the pin port mapping of D1 MINI development board to nodeJS, and support a series of functions such as ota.

Second round of development

To be carried out, plan as FYP project

Supported development version

Implementation

By providing standardized microcontroller firmware and automated burning tools, wiot abstracts, organizes, and maps the pin port functions of each development board into a callable NodeJS interface.

wiot Architecture

As shown in the figure above, the wiot architecture mainly consists of three parts: Node node, wiot Cloud Module, and wiot cli command line program. Among them, the Node node is the NodeMCU microcontroller with the wiot firmware burned. They use IEEE 802.11 WiFi for distributed communication, and connect to a router at a node to connect to the wiot cloud module. Users use NodeJS to call Wiot on their own PCs and rely on writing IoT programs. After completion, the user uses wiot cli to check, test and deploy the developed program. The deployed IoT program will run on the wiot cloud module, and can use the nodeJS interface to interact with other cloud services or databases.

Node node

Node node uses NodeMCU development board (expansion board based on ESP8266). After using wiot-cli to burn the wiot firmware, NodeMCU will become a wiot node.

Mode

Wiot nodes have four modes: master mode, slave mode, bridge mode and debug mode. This mode can only be configured when burning firmware. In master mode and bridge mode, nodeMCU will enable STA and AP mode at the same time. In slave mode, only STA mode is enabled. The master needs to have a stable and unlimited power supply, which has a large power and is not suitable for low power consumption scenarios. Bridge and slave can flexibly adjust power, which can be used in low power consumption scenarios.

In debug mode, the node works in STA and AP mode. Users can use mobile phones and other devices to connect to this node and open the root directory webpage. The web page will display various information about the current location of this node in real time, such as the signal strength received from other nodes, which is suitable for deployment scenarios.

Low power

Wiot nodes support Low Power state. But this state can only be opened in slave mode and bridge. This state can be turned on or off through wiot api or wiot-cli. The low power consumption state is realized by the sleep function of esp8266. In this state, it can be powered by dry batteries for several years [1].

Networking

Wiot nodes use distributed networking. Where the router signal is strong, the master node will access the router WiFi network and bridge it. Where the router signal is not strong, each node will find another upstream master or bridge node with the strongest signal and bridge it (except slave).

wiot node distributed networking

As shown in the figure above, the two master nodes close to the router are automatically connected to the router wifi. The other downstream nodes are respectively connected to the upstream node with the strongest signal.

Certification

Radio frequency fingerprint identification[2]

Wiot nodes support the use of RF Fingerprint Recognition[2] to achieve downstream communication authentication. This method uses the RSSI function of esp8266 and scan return parameters. When the downstream device attempts to access the network, the upstream device will collect fingerprint information and report to the server. The server compares the fingerprint with the previous version stored in the database and makes a decision whether to allow access to the network.

Cloud Module

The cloud module acts as the cloud part of Wiot and provides cloud functions. The cloud module can guard the wiot program running in the run-time state. In addition, the cloud module can also provide functions such as testing and deployment. The cloud module uses Docker for virtualization.

Command Line Program

That is wiot-cli. It is a set of operation tools provided by Wiot on the developer terminal. Through wiot-cli, developers can implement functions such as testing, deploying, and restoring wiot programs. In addition, wiot-cli also supports a series of common functions such as debug. See the wiot-cli command below for details.

User operation steps

  1. The user downloads, installs and configures the NodeJS environment.
  2. The user runs the command npm i -g wiot-cli through the command line to install the wiot command line tool
  3. The user runs the command wiot init my-wiot-proj to create and configure a wiot project folder in the current directory, the project name is my-wiot-proj. At this point, the user will be prompted to fill in some information about this project, such as project description, author information, WiFi account password, wiot cloud module address, project main script, etc.
  4. The user enters the project directory, connects the nodeMCU to the computer through the data cable, and runs wiot node init my-first-node [--type=<master|slave|bridge|debug>]. This will automatically configure and burn the Wiot firmware to the nodeMCU development board and name it my-first-node. type is an optional parameter, which can be set to master or slave or bridge or debug, and the default is master.
  5. Follow this method to burn all the development boards and deploy them in the production environment.
  6. Run the command wiot status in the project folder to see if all nodes are online. If not, use the command wiot log with the grep tool to find the log location problem.
  7. Start writing your wiot program from the main project script (default is index.js).
  8. Use the command wiot check to check the logic of your wiot program.
  9. Use the command wiot test to suspend the running program in the cloud module and run the program in the current project folder. At this point, all console output will be displayed in your command line window. Use Ctrl+C to terminate the current test and restore the previous program of the cloud module.
  10. Use the command wiot push to deploy the local wiot program to the cloud.

Other operations

Deploy your own wiot cloud module

Install docker and run the command docker run -d --name=wiot-cloud -p 3594:3594 -v /var/wiot/data/:/var/wiot/data/ iotcat/wiot.

wiot-cli command

  • wiot help [command] view help
  • wiot clone <host:user/project> to clone the project from the cloud module to the local
  • wiot pull uses remote code to overwrite local code
  • wiot push deploys the current folder wiot program to the cloud module
  • wiot ls shows all current nodes
  • wiot map [nodeID] shows the connection path of a node
  • wiot log [nodeID] [--head=<number>|--tail=<number>] view the log of a node
  • wiot stop stop wiot service
  • wiot start to start wiot service
  • wiot restart restart wiot service
  • wiot reload restarts the wiot service without resetting the flash variable
  • wiot init <name> creates and initializes the wiot project folder
  • wiot node init <node-name> [--type=<master|slave|bridge|debug>] configure and burn nodeMCU development board
  • wiot check checks the current folder project logic problem.
  • wiot test will suspend the running program in the cloud module and run the program in the current project folder. At this point, all console output will be displayed in your command line window. Use Ctrl+C to terminate the current test and restore the previous program of the cloud module.
  • wiot status [nodeID] displays current project or node status information
  • wiot debug start terminates the current cloud program and enters debug mode
  • wiot debug set <nodeID> <pinID> <0-255>Set the PWM output value of a node pin in debug mode
  • In wiot debug reset <nodeID>debug mode, reset the data storage of a node and reconnect
  • wiot debug get <nodeID> <pinID> get the PWM value of a node pin in debug mode
  • wiot debug sleep <nodeID> <pinID> <HIGH|LOW>debug mode to set a node to lightly sleep until it is awakened by a pin’s high or low level
  • wiot debug dsleep <nodeID> <millisecond> set how many milliseconds a node deeply sleeps in debug mode
  • In wiot debug reconnect [nodeID]debug mode, reconnect to the network or disconnect and reconnect to a node

Common API

To be designed, please refer to One-round development wiot document

]]>
+

本文将讨论wiot项目下一步的发展目标与实施方法。

This article will discuss the next development goals and implementation methods of the Wiot project.

wIoT

wiot,一个基于NodeJS的分布式物联网操作系统。

项目简介

立项初衷

本项目旨在帮助不熟悉固件编程的网络开发者实现出自己的物联网应用。

在开发传统的物联网程序时,我们需要一次又一次的编写,烧录,调试每一个开发板,以某种方式将其相连结,以提供某种服务。这样的方式非常繁琐,开发成本和门槛都比较高。此外,古老的C和C++语言缺少成熟的依赖管理工具,以至于我们在编写开发板时难以像开发python或nodeJS程序一样轻松便捷。

本项目试图提供一种方法,将烧录,调试开发板的流程自动化,并将逻辑编写的步骤移动到远程计算机的NodeJS界面上。通过此方式,我们进而得以将分布式物联网节点的功能进行集中化管理。此外,借助NodeJS成熟的依赖管理器npm,使得物联网应用的开发更加便捷高效。

至此,下到每一个物联网节点,上到各种类型的数据库、用户终端,都可以在同一个nodeJS界面上配置、操作。开发者将能够专注于物联网逻辑的开发,实现出更加丰富多彩的物联网应用。

第一轮开发

第一轮开发完成于2019.5,详见这篇博客

实现了对D1 MINI开发板对nodeJS的pin口映射,并支持诸如ota等一系列功能。

第二轮开发

待进行,计划当做FYP项目


架构想法

在设计物联网系统时,我一直有一个愿景。历史必然性。打造手足。

wiot的目标是提供一套
系统架构在分类上分为静态的环境和动态的用户。实现上分为模块,服务和程序。

模块

类似于计算机操作系统中的驱动,模块负责将物理层面上的各种功能,比如led照明,抽象为操作系统层面的标准接口。

服务

服务是运行在边缘的docker中的守护进程。开发者通过调用模块,实现编写服务,实现各种各样的标准功能。

程序

程序是由用户定义的一套自定义逻辑,用于打造自定义场景。结合地理围栏公共服务LIS,调用环境服务提供的标准接口。


支持的开发版

实现方法

通过提供标准化的单片机固件以及自动化的烧录工具,wiot将各开发板的pin口功能进行抽象,整理,并映射为可调用的NodeJS接口。

wiot Architecture

如上图所示,wiot架构主要包含三部分:Node节点,wiot Cloud Module云模块,wiot cli命令行程序。其中,Node节点为烧录好wiot固件的NodeMCU单片机,他们通过IEEE 802.11 WiFi进行分布式通信,并于某个节点接入路由器以连接wiot云模块。用户在自己的PC上使用NodeJS调用wiot依赖编写物联网程序。完成后,用户使用wiot cli对开发好的程序进行检查、测试和部署。被部署的物联网程序将运行在wiot云模块上,并可使用nodeJS的接口与其它云服务或数据库进行交互。

Node节点

Node节点使用的是NodeMCU开发板(基于ESP8266的扩展板)。在使用wiot-cli烧录wiot固件后,NodeMCU将成为wiot节点。

模式

wiot节点有四种模式:master模式、slave模式、bridge模式和debug模式。此模式只能在烧录固件时配置。master模式和bridge模式下,nodeMCU将同时开启STA和AP模式。slave模式下则只开启STA模式。master需要有稳定且无限制的电源供电,其功率较大(包含RSA, 协议转换等),不适合低功耗场景。bridge与slave则可以灵活调整功率,可用于低功耗场景。

debug模式下节点工作在STA和AP模式,用户可以使用手机等设备连接到此节点,并打开根目录网页。网页上将实时显示此节点当前所处位置的各种信息,比如收到各其它节点的信号强度等,适用于挑选部署场景。

低功耗

wiot节点支持低功耗(Low Power)状态。但此状态仅能在slave模式和bridge下开启。此状态可通过wiot api或者wiot-cli进行开启或关闭。低功耗状态由esp8266睡眠功能实现。此状态下可由干电池供电工作数年[1]

组网

wiot节点使用分布式组网。在路由器信号较强的地方,master节点将接入路由器WiFi网络,并桥接。在路由器信号不强的地方,每一个节点都会找到信号最强的另一个上游的master或bridge节点,并桥接(slave除外)。

wiot节点分布式组网

如上图,两个距离路由器近的master节点自动接入到路由器wifi。下游的其它节点分别连接至信号最强的上游节点。

认证

射频指纹识别[2]
wiot节点支持使用射频指纹识别[2]来实现下游通信认证。此方法使用esp8266的RSSI函数以及scan返回参数。在下游设备试图接入网络时,上游设备将搜集指纹信息并向服务器汇报。服务器将指纹与数据库存储的先前版本进行比对,并作出是否允许入网的决策。

云模块

云模块充当wiot的云部分,提供云的功能。云模块能够守护运行run-time状态下的wiot程序。此外,云模块还能够提供测试,部署等功能。云模块使用Docker进行虚拟化。

命令行程序

即wiot-cli。是wiot在开发者终端上提供的操作工具集。通过wiot-cli,开发者可以实现对wiot程序的测试,部署,恢复等功能。此外,wiot-cli也支持一系列debug等常用功能。详见下方wiot-cli命令

用户操作步骤

  1. 用户下载安装并配置好NodeJS环境。
  2. 用户通过命令行运行npm i -g wiot-cli指令安装wiot命令行工具
  3. 用户运行命令wiot init my-wiot-proj在当前目录新建并配置一个wiot项目文件夹,项目名称为my-wiot-proj。此时,会提示用户填写此项目的一些信息,比如项目描述,作者信息,路由器WiFi账户密码,wiot云模块地址,项目主脚本等。
  4. 用户进入到项目目录,将nodeMCU通过数据线连接到电脑,运行wiot node init my-first-node [--type=<master|slave|bridge|debug>]。这将自动配置并将wiot固件烧录到nodeMCU开发板,并将其命名为my-first-node。type为可选参数,可设置为masterslavebridgedebug,默认为master
  5. 依次按照此方法烧录好所有的开发板,将其部署在生产环境。
  6. 在项目文件夹运行指令wiot status查看是否所有节点均已在线。如果没有,使用指令wiot log配合grep工具查找日志定位问题。
  7. 从项目主脚本(默认是index.js)开始编写你的wiot程序。
  8. 使用指令wiot check检查你wiot程序的逻辑问题。
  9. 使用指令wiot test将挂起云模块中正在运行的程序,并运行当前项目文件夹中的程序。此时,所有控制台输出将显示在你的命令行窗口。使用Ctrl+C终止当前测试并恢复云模块先前的程序。
  10. 使用指令wiot push将本地的wiot程序部署到云端。

其它操作

部署自己的wiot云模块

默认使用wiot官方wiot云模块。你也可以部署自己的wiot云服务,方法如下:

安装docker并运行指令docker run -d --name=wiot-cloud -p 3594:3594 -v /var/wiot/data/:/var/wiot/data/ iotcat/wiot

wiot-cli命令

  • wiot help [command]查看帮助
  • wiot clone <host:user/project>将项目从云模块克隆到本地
  • wiot pull使用远程代码覆盖本地代码
  • wiot push将当前文件夹wiot程序部署到云模块
  • wiot node ls显示当前所有节点
  • wiot map [nodeID]显示某节点的连接路径
  • wiot log [nodeID] [--head=<number>|--tail=<number>]查看某节点的日志
  • wiot stop停止wiot服务
  • wiot start开启wiot服务
  • wiot restart重启wiot服务
  • wiot reload在不重置flash变量情况下重启wiot服务
  • wiot init <name>新建并初始化wiot项目文件夹
  • wiot node init <node-name> [--type=<master|slave|bridge|debug>]配置并烧录nodeMCU开发板
  • wiot check检查当前文件夹项目逻辑问题。
  • wiot test将挂起云模块中正在运行的程序,并运行当前项目文件夹中的程序。此时,所有控制台输出将显示在你的命令行窗口。使用Ctrl+C终止当前测试并恢复云模块先前的程序。
  • wiot status [nodeID]显示当前项目或节点状态信息
  • wiot debug start终止当前云端程序并进入debug模式
  • wiot debug set <nodeID> <pinID> <0-255>debug模式下设置某个节点pin的PWM输出值
  • wiot debug reset <nodeID>debug模式下重置某个节点的数据存储,并重连
  • wiot debug get <nodeID> <pinID>debug模式下获取某个节点pin的PWM值
  • wiot debug sleep <nodeID> <pinID> <HIGH|LOW>debug模式下设置某节点轻度休眠,直到被某pin的高或低电平唤醒
  • wiot debug dsleep <nodeID> <millisecond>debug模式下设置某节点深度休眠多少毫秒
  • wiot debug reconnect [nodeID]debug模式下重新组网或断开重连某个节点
  • wiot debug setphymode <nodeID> <b|g|n>debug模式下配置节点WiFi协议为802.11b|g|n
  • wiot module search [keyword]本地和联网搜索可用module类型
  • wiot module install <moduleName|path>安装并配置某个模块
  • wiot module remove <moduleId>卸载模块
  • wiot module ls显示所有已安装模块
  • wiot search [keyword]本地和联网搜索可用程序
  • wiot install <programName|path>安装并配置某个程序
  • wiot remove <programID>卸载某个程序
  • wiot ls显示所有程序
    ···

目录结构

1
2
3
4
5
6
7
|
|---.wiot/ wiot系统目录
|---wiot.yaml wiot系统配置文件
|---nodes/ 节点配置文件
|---modules/ 模组配置文件
|---programs/ 程序配置文件
|---local/ 本地代码文件

常用API

待设计,请参考一轮开发wiot文档

  • 事件
  • cron定时任务

挑战

  • 错误(设备离线)处理

wIoT

Wiot, a distributed IoT operating system based on NodeJS.

Project Description

The original intention of the project

This project aims to help web developers who are not familiar with firmware programming to implement their own IoT applications.

When developing traditional Internet of Things programs, we need to write, burn, and debug each development board again and again, and connect them in a certain way to provide a certain service. This method is very cumbersome, and the development cost and threshold are relatively high. In addition, the ancient C and C++ languages ​​lack mature dependency management tools, so that it is difficult for us to write development boards as easy and convenient as developing python or nodeJS programs.

This project is trying to provide a method to automate the process of burning and debugging the development board, and move the steps of logic writing to the NodeJS interface of the remote computer. In this way, we are able to centrally manage the functions of distributed IoT nodes. In addition, with NodeJS’s mature dependency manager npm, the development of IoT applications is more convenient and efficient.

So far, down to every IoT node, up to various types of databases and user terminals, all can be configured and operated on the same nodeJS interface. Developers will be able to focus on the development of IoT logic and realize more colorful IoT applications.

First round of development

The first round of development was completed in May 2019, please refer to this blog

Realize the pin port mapping of D1 MINI development board to nodeJS, and support a series of functions such as ota.

Second round of development

To be carried out, plan as FYP project

Supported development version

Implementation

By providing standardized microcontroller firmware and automated burning tools, wiot abstracts, organizes, and maps the pin port functions of each development board into a callable NodeJS interface.

wiot Architecture

As shown in the figure above, the wiot architecture mainly consists of three parts: Node node, wiot Cloud Module, and wiot cli command line program. Among them, the Node node is the NodeMCU microcontroller with the wiot firmware burned. They use IEEE 802.11 WiFi for distributed communication, and connect to a router at a node to connect to the wiot cloud module. Users use NodeJS to call Wiot on their own PCs and rely on writing IoT programs. After completion, the user uses wiot cli to check, test and deploy the developed program. The deployed IoT program will run on the wiot cloud module, and can use the nodeJS interface to interact with other cloud services or databases.

Node node

Node node uses NodeMCU development board (expansion board based on ESP8266). After using wiot-cli to burn the wiot firmware, NodeMCU will become a wiot node.

Mode

Wiot nodes have four modes: master mode, slave mode, bridge mode and debug mode. This mode can only be configured when burning firmware. In master mode and bridge mode, nodeMCU will enable STA and AP mode at the same time. In slave mode, only STA mode is enabled. The master needs to have a stable and unlimited power supply, which has a large power and is not suitable for low power consumption scenarios. Bridge and slave can flexibly adjust power, which can be used in low power consumption scenarios.

In debug mode, the node works in STA and AP mode. Users can use mobile phones and other devices to connect to this node and open the root directory webpage. The web page will display various information about the current location of this node in real time, such as the signal strength received from other nodes, which is suitable for deployment scenarios.

Low power

Wiot nodes support Low Power state. But this state can only be opened in slave mode and bridge. This state can be turned on or off through wiot api or wiot-cli. The low power consumption state is realized by the sleep function of esp8266. In this state, it can be powered by dry batteries for several years [1].

Networking

Wiot nodes use distributed networking. Where the router signal is strong, the master node will access the router WiFi network and bridge it. Where the router signal is not strong, each node will find another upstream master or bridge node with the strongest signal and bridge it (except slave).

wiot node distributed networking

As shown in the figure above, the two master nodes close to the router are automatically connected to the router wifi. The other downstream nodes are respectively connected to the upstream node with the strongest signal.

Certification

Radio frequency fingerprint identification[2]

Wiot nodes support the use of RF Fingerprint Recognition[2] to achieve downstream communication authentication. This method uses the RSSI function of esp8266 and scan return parameters. When the downstream device attempts to access the network, the upstream device will collect fingerprint information and report to the server. The server compares the fingerprint with the previous version stored in the database and makes a decision whether to allow access to the network.

Cloud Module

The cloud module acts as the cloud part of Wiot and provides cloud functions. The cloud module can guard the wiot program running in the run-time state. In addition, the cloud module can also provide functions such as testing and deployment. The cloud module uses Docker for virtualization.

Command Line Program

That is wiot-cli. It is a set of operation tools provided by Wiot on the developer terminal. Through wiot-cli, developers can implement functions such as testing, deploying, and restoring wiot programs. In addition, wiot-cli also supports a series of common functions such as debug. See the wiot-cli command below for details.

User operation steps

  1. The user downloads, installs and configures the NodeJS environment.
  2. The user runs the command npm i -g wiot-cli through the command line to install the wiot command line tool
  3. The user runs the command wiot init my-wiot-proj to create and configure a wiot project folder in the current directory, the project name is my-wiot-proj. At this point, the user will be prompted to fill in some information about this project, such as project description, author information, WiFi account password, wiot cloud module address, project main script, etc.
  4. The user enters the project directory, connects the nodeMCU to the computer through the data cable, and runs wiot node init my-first-node [--type=<master|slave|bridge|debug>]. This will automatically configure and burn the Wiot firmware to the nodeMCU development board and name it my-first-node. type is an optional parameter, which can be set to master or slave or bridge or debug, and the default is master.
  5. Follow this method to burn all the development boards and deploy them in the production environment.
  6. Run the command wiot status in the project folder to see if all nodes are online. If not, use the command wiot log with the grep tool to find the log location problem.
  7. Start writing your wiot program from the main project script (default is index.js).
  8. Use the command wiot check to check the logic of your wiot program.
  9. Use the command wiot test to suspend the running program in the cloud module and run the program in the current project folder. At this point, all console output will be displayed in your command line window. Use Ctrl+C to terminate the current test and restore the previous program of the cloud module.
  10. Use the command wiot push to deploy the local wiot program to the cloud.

Other operations

Deploy your own wiot cloud module

Install docker and run the command docker run -d --name=wiot-cloud -p 3594:3594 -v /var/wiot/data/:/var/wiot/data/ iotcat/wiot.

wiot-cli command

  • wiot help [command] view help
  • wiot clone <host:user/project> to clone the project from the cloud module to the local
  • wiot pull uses remote code to overwrite local code
  • wiot push deploys the current folder wiot program to the cloud module
  • wiot ls shows all current nodes
  • wiot map [nodeID] shows the connection path of a node
  • wiot log [nodeID] [--head=<number>|--tail=<number>] view the log of a node
  • wiot stop stop wiot service
  • wiot start to start wiot service
  • wiot restart restart wiot service
  • wiot reload restarts the wiot service without resetting the flash variable
  • wiot init <name> creates and initializes the wiot project folder
  • wiot node init <node-name> [--type=<master|slave|bridge|debug>] configure and burn nodeMCU development board
  • wiot check checks the current folder project logic problem.
  • wiot test will suspend the running program in the cloud module and run the program in the current project folder. At this point, all console output will be displayed in your command line window. Use Ctrl+C to terminate the current test and restore the previous program of the cloud module.
  • wiot status [nodeID] displays current project or node status information
  • wiot debug start terminates the current cloud program and enters debug mode
  • wiot debug set <nodeID> <pinID> <0-255>Set the PWM output value of a node pin in debug mode
  • In wiot debug reset <nodeID>debug mode, reset the data storage of a node and reconnect
  • wiot debug get <nodeID> <pinID> get the PWM value of a node pin in debug mode
  • wiot debug sleep <nodeID> <pinID> <HIGH|LOW>debug mode to set a node to lightly sleep until it is awakened by a pin’s high or low level
  • wiot debug dsleep <nodeID> <millisecond> set how many milliseconds a node deeply sleeps in debug mode
  • In wiot debug reconnect [nodeID]debug mode, reconnect to the network or disconnect and reconnect to a node

Common API

To be designed, please refer to One-round development wiot document

]]>
@@ -647,40 +679,4 @@ - - 随机图片API - - https://www.eee.dog/tech/rand-pic-api.html - 2019-07-09T16:00:00.000Z - 2020-09-06T16:12:46.077Z - -

本API基于华为云对象存储,使用华为CDN云加速,全球平均下载速度达10MB/s。API中已收录1100+张二次元图片,20+张Bing壁纸(每日自动抓取),150+张二次元头像,10+张图床上传图片。

This API is based on Huawei Cloud Object Storage and uses Huawei CDN Cloud acceleration. The global average download speed is 10MB/s. The API has included 1100+ two-dimensional pictures, 20+ Bing wallpapers (automatically captured daily), 150+ two-dimensional avatars, and 10+ pictures uploaded on the bed.

本API不承诺永久维护,使用前请务必斟酌使用风险!!

1 API地址

  • https://api.yimian.xyz/img

2 快速入门

随机二次元图片

随机Bing壁纸

随机二次元头像

随机图床图片

随机1920x1080尺寸二次元图片

3 参数列表

名称描述格式示例
type图片种类moe/wallpaper/head/imgbedtype=moe
size根据图片大小筛选??x??;
*x??;
*x*;
??-??x??;
??-??x??-??;
??-??x*
display=1920x1080;
display=1920x*;
display=1920-1950x230-500;
display=1920-1950x*;
range尺寸误差范围numberrange=100
id根据图片id筛选numberid=15
path根据路径提取图片abs pathpath=wallpaper/img_··mal.jpg
display是否以网页格式展示true/false(default)display=true
R18是否显示18禁图片true/false(default)R18=true

4 参数详解

4.1 type

二次元(默认)

bing每日壁纸

二次元头像

呓喵酱图床

こいぬちゃん

EasyVer人机验证

4.2 display

如果本参数置为true,则会禁用302跳转,直接返回完整图片编码。本方法效率极低,速度很慢,请慎用。

false(默认)

true

4.3 size

使用本参数限制图片尺寸。本参数支持以下格式:

??x??

??x*

\x??*

\x**

??-??x??

??x??-??

??-??x??-??

??-??x*

\x??-??*

4.4 range

本参数规定允许的size的误差,需搭配size使用,默认为0。

对于??型size参数

对于??-??型size参数

对于*型size参数

  • GET/POST /img?size=*x*&range=100
  • 描述: range无效

4.5 id

每一个种类都有自己的id系统,同一种类下不同图片id唯一。

二次元

bing每日壁纸

二次元头像

呓喵酱图床

4.6 path

使用绝对路径直接提取图片,优先级高于type,效率最高

4.7 R18

是否显示18禁图片,默认为false。

5 报错格式

5.1 找不到指定type类型

若找不到指定的type类型,将会自动返回一个moe类型的图片。

5.2 找不到符合条件的图片

返回JSON

1
2
3
{
"err": "错误信息"
}

每台设备每天全局调用上限500次!!

This API does not promise permanent maintenance, please be sure to consider use risks before use! !

1 API address

  • https://api.yimian.xyz/img

2 Quick start

Random two-dimensional picture

Random Bing Wallpaper

Random two-dimensional avatar

Random bed pictures

Random 1920x1080 size two-dimensional picture

3 Parameter list

NameDescriptionFormatExample
typeImage typemoe/wallpaper/head/imgbedtype=moe
sizeFilter by image size??x??;
*x??;
*x*;
??-??x??;
??-??x??-??;
??-??x*
display=1920x1080;
display=1920x*;
display=1920-1950x230-500;
display=1920-1950x*;
rangeSize error rangenumberrange=100
idFilter by image idnumberid=15
pathExtract pictures based on pathabs pathpath=wallpaper/img_··mal.jpg
displayWhether to display in web page formattrue/false(default)display=true
R18Whether to display 18 prohibited picturestrue/false(default)R18=true

4 Detailed parameters

4.1 type

Two-dimensional (default)

bing daily wallpaper

Two-dimensional avatar

Miao meow sauce picture bed

こいぬちゃん

EasyVer man-machine verification

4.2 display

If this parameter is set to true, 302 jump will be disabled and the complete picture encoding will be returned directly. This method is very low and slow. Please use it carefully.

false (default)

true

4.3 size

Use this parameter to limit the image size. This parameter supports the following formats:

??x??

??x*

\x??*

\x**

??-??x??

??x??-??

??-??x??-??

??-??x*

\x??-??*

4.4 range

This parameter specifies the allowable size error, which needs to be used with size, and the default is 0.

For the?? type size parameter

For??-?? type size parameter

For *type size parameter

  • GET/POST /img?size=*x*&range=100
  • Description: Invalid range

4.5 id

Each category has its own id system, and different image ids under the same category are unique.

*Two-dimensional *

bing daily wallpaper

Two-dimensional avatar

Miao meow sauce picture bed

4.6 path

Use absolute path to directly extract pictures, priority is higher than type, highest efficiency.

4.7 R18

Whether to display 18 prohibited pictures, the default is false.

5 Error format

5.1 Cannot find the specified type

If the specified type cannot be found, a moe type picture will be automatically returned.

5.2 Can’t find matching images

Return JSON

1
2
3
{
"err": "error message"
}

The maximum number of global calls for each device is 500 per day!!

]]>
- - - - <span class=".zh"> -<p>本API基于华为云对象存储,使用华为CDN云加速,全球平均下载速度达10MB/s。API中已收录1100+张二次元图片,20+张Bing壁纸(每日自动抓取),150+张二次元头像,10+张图床上传图片。</p> -</span> - - -<span class=".en"> -<p>This API is based on Huawei Cloud Object Storage and uses Huawei CDN Cloud acceleration. The global average download speed is 10MB/s. The API has included 1100+ two-dimensional pictures, 20+ Bing wallpapers (automatically captured daily), 150+ two-dimensional avatars, and 10+ pictures uploaded on the bed.</p> -</span> - - - - - - - - - - - - - - - -
- diff --git a/categories/index.html b/categories/index.html index 384cdc0..857d8c9 100644 --- a/categories/index.html +++ b/categories/index.html @@ -402,7 +402,7 @@ pjax_google_analytics = () => { 6 Categories In Total
diff --git a/categories/tech/index.html b/categories/tech/index.html index c0d244a..b24ffdd 100644 --- a/categories/tech/index.html +++ b/categories/tech/index.html @@ -402,6 +402,16 @@ pjax_google_analytics = () => {

tech

+ + 2020-11-04 + + + + Ushio-V2ray使用方法Ushio V2ray Instruction + + +
+
2020-09-15 @@ -491,16 +501,6 @@ pjax_google_analytics = () => {
-
- - 2019-07-21 - - - - Arduino中[]=重载导致的String调用问题String call problem caused by []= overload in Arduino - - -