GithubHelp home page GithubHelp logo

esp8266-remote-nova-switch's Introduction

esp8266-remote-nova-switch

low cost esp8266 remote switch for PC

没时间,太长不看版本:

1.方案架构

esp8266 +micropython + mqtt协议 + mqtt客户端软件 +  mqtt协议服务器

2.方案功能

远程开机:  安卓手机/其它的mqtt客户端软件 -〉 mqtt协议服务器 -〉 esp8266运行micropython  + mqtt协议 +控制小脚本

本地开机:按下power键 -〉启动电脑

  1. 使用

打开手机软件,点下按钮,就开机了。 或者按下电源按键。

 

相关代码,固件,硬件接线图,整理一下放github,有兴趣直接打包下载.

https://github.com/chuanjinpang/esp8266-remote-nova-switch

背景与需求:

1. 自从租了一台VPS云主机实现了内网穿透,这样人在外也能方便访问家里资源。最近在整IPV6的事,IPV6地址量大便宜是它的优势。

2.  远程开关机的需要也就来了,按需运行家里的主机是在能用之后的直接需要。远程关机倒是容易,ssh上去poweroff就完事了。

3. 一开始整了一个智能开关的方案,也能用。只要在BIOS里面配置一下来电后自启动。

  不过了,这方案有2个问题:1)贵,大厂要40/个,小厂的便宜些但是方案是独有的,倒闭了大概率就用不了了。2)其次是不开源,不够open。通常产品由于这样那样的原因,设计实现成了一坨shi,除了嘴上报怨下,还能怎么样了?特别是别家也是8两。

目标:

所有我有一个梦想:如果可以的话,如果有一个自主可控(软件是开源的,可以二次开发自己升级更新,硬件原理图开放。类似于树莓派,nanoVNA这样的新范式的东东),成本低廉的的远程开关在网上卖,贵几块钱,我也会买。

万万没有想到,某宝没有这样的。果然我还是在年轻了。

为了自由的新范式。摸索了一段时间。发现其实还是有个还成的方案。最低只要13块钱(连串口都不要的,9块的esp12f更便宜),肯折腾点动下手就可以实现远程开机。

用了一段时间,个人觉得还行。分享出来。

实现:

操作:

1.用uPyCraft_V1.0下载micropython的固件,网上有很多教程。 软件和固件都有:https://github.com/chuanjinpang/esp8266-remote-nova-switch

建议购买带串口的nodemcu,更新下载固件,控制程序都要方便点。

2.修改main.py下wifi的配置和mqtt的目标topic(与别人用同一个主题会相互影响)。mqtt服务器,如果你还没有,可以用我的先玩着(你要接受免责的哦)。

3.用uPyCraft_V1.0下载main.py和umqttsimple.py。

4,硬件连线,

准备:打开机箱,准备万用表,先确定下power的线电压是否为3.3V,如果不是,好了你的主板比较奇葩。这个方案不适合你的主板(建议放弃)。我家3台新老电脑都是3.3V的

开机线:把power的3.3V线接上esp8266的D2.  另一个地线接esp8266的GND. 如下图:

供电线:

供电问题,有2条路子:1)直接用USB充电头供电。2)取巧用TPM模块的供电,这个要翻下主板的手册。3)有的主板USB有standby电,看运气。

 

收工

手机端软件:

MQTT Dash IoT Smart Home_v4.4_apkpure.com.apk https://github.com/chuanjinpang/esp8266-remote-nova-switch

 配置服务器

配置一个按钮

 按钮发送on消息。

配置一下,网上有很多教程。

也可以用mosquitto的客户端命令来触发:

mosquitto_pub -h pcj2020.top -t epwr01 -m "on"

安全问题:

你看,没有用SSL这样的。暂时没有,有空或者谁加下

esp8266-remote-nova-switch's People

Contributors

chuanjinpang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.