Coder Social home page Coder Social logo

eddddddddy / e-ink-esp32-arduino-weather-time-note Goto Github PK

View Code? Open in Web Editor NEW
195.0 4.0 74.0 62.4 MB

You can get time\weather\temperature-inside\humility-inside\pressure-inside\IAQ-inside\QQ-note\computer-info on this device.

C++ 7.50% C 92.31% Makefile 0.01% Shell 0.05% CMake 0.01% HTML 0.06% Python 0.04% Processing 0.01% CSS 0.01% JavaScript 0.01%
arduino esp32-arduino esp32 e-paper

e-ink-esp32-arduino-weather-time-note's Introduction

E-ink-esp32-arduino-weather-time-note

You can get time\weather\temperature-inside\humility-inside\pressure-inside\IAQ-inside\QQ-note\computer-info on this device.

Video Introduction

image

image

image

main page

note page

info page

ENGLISH:

支持TTGO T5 V2.2 和 TTGO T5 V2.3两个型号的开发板,其他型号未适配。

BEFORE:

1.prepare the online weather API(https://dev.heweather.com/

SERVER:

1.prepare a vps, suck as Windows server.

2.config MQTT server on your vps.

3.install CQTIMPORTANT! CQT is not working any more. please use HTTP API.

4.install CQhttp plugin(https://cqp.cc/t/30748

5.modify .py. add your QQ number in the right place.

6.install python requirements.

Arduino:

1.install Arduino IDE.

2.install esp32-arduino board for Arduino IDE(https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

3.install Arduino library

4.install Arduino tool for esp32(Use Arduino ESP32 Sketch data Upload files,if you not install,download ESP32FS-vX.zip,Extract to <C:\Users\Your User Name\Documents\Arduino\tools>,Open Ardunio IDE, Tools -> ESP32 Sketch data Upload -> Upload)

5.use ESP32 Sketch data Upload files.

6.upload your sketch to esp32(Compilation speed is very slow, on my laptop, i need 2min 55sec.)

video introduction(https://www.bilibili.com/video/BV1pt4y1y7ya)

CHINESE:

支持TTGO T5 V2.2 和 TTGO T5 V2.3两个型号的开发板,其他型号未适配。

前期准备:

1.准备和风天气api接口(https://dev.heweather.com/

服务器:

1.准备服务器,Linux Centos7服务器。其他系统大同小异,可自行研究。

2.在Linux服务器上配置好MQTT服务端,可参照EMQ官方网站。有docker使用经验的开发人员推荐使用docker进行部署,更方便管理。

3.安装OPQBot

4.为Server的Python脚本安装依赖包。Python版本3.6.8。可通过requirements安装。

5.更改config.py中相关的内容。

6.修改Eink.service中的“/root/Eink/Eink.py"的实际路径。

7.将Eink.service放入"/usr/lib/systemd/system/"

8.输入'sudo systemctl start Eink.service'以启动程序,之后输入'sudo systemctl enable Eink.service'启用开机自动启动。

Arduino:

1.安装arduino

2.安装esp32开发板(https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

3.安装arduino库

4.在Arduino工具的Partition Scheme中选择Huge App.

5.更改config.h中相关的内容。

6.上传程序(编译较慢,我的电脑不使用预编译文件的情况下需要2分55秒编译一次。请在issue中留下你需要多长时间)

视频介绍

e-ink-esp32-arduino-weather-time-note's People

Contributors

eddddddddy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

e-ink-esp32-arduino-weather-time-note's Issues

萌新在实际操作中的两个问题 求指教

本人在认真浏览b站教程视频后,仍有些无法独立解决的问题,因本人没有开发经验,在群里不方便码字又怕打扰大家交流,故提出issue希望各位大佬帮忙。

一、开发板无响应

本人使用的是TTGO T5 V2.3型号的开发板及bme680传感器,使用的是\src\Arduino\T5-Ink-2.3内源码。在Arduino(1.8.13)软件内安装好esp32开发环境及如下Arduino库后,按照视频操作烧录进开发板,板子无响应(上传完成屏幕没有刷新,板子LED蓝灯恒亮,RST及另外一个按钮按下无作用)。

大部分库是从GitHub直接下载的(带-master的),其中Adafruit_BusIO是编译时报错后自行安装的。
因为选择了bme680传感器,将源码第51行的#include "Adafruit_BME280.h"改为了#include "Adafruit_BME680.h",并将程序内bme280的相关变量都改为了bme680字样。除此之外源码只更改了wifi及服务器地址信息。

二、服务端运行报错

服务器环境为python3.8,安装好所需的包之后运行server.py产生如下报错:

PS C:\Users\Administrator\Desktop> python server.py
<websocket._app.WebSocketApp object at 0x000001CEB7F21A30>
Handshake status 404 Not Found
<websocket._app.WebSocketApp object at 0x000001CEB7F21A30>
### closed ###
�[32mINFO�[0m:     Started server process [�[36m856�[0m]
�[32mINFO�[0m:     Waiting for application startup.
�[32mINFO�[0m:     Application startup complete.
�[32mINFO�[0m:     Uvicorn running on �[1mhttp://0.0.0.0:8899�[0m (Press CTRL+C to quit)
Exception in thread Thread-2:
Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "server.py", line 637, in mqtt_init
    client.connect('127.0.0.1', 1883, 600) # 600为keepalive的时间间隔
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\paho\mqtt\client.py", line 937, in connect
    return self.reconnect()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\paho\mqtt\client.py", line 1071, in reconnect
    sock = self._create_socket_connection()
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\paho\mqtt\client.py", line 3522, in _create_socket_connection
    return socket.create_connection(addr, source_address=source, timeout=self._keepalive)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\socket.py", line 808, in create_connection
    raise err
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\socket.py", line 796, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。
�[32mINFO�[0m:     Shutting down
�[32mINFO�[0m:     Waiting for application shutdown.
�[32mINFO�[0m:     Application shutdown complete.
�[32mINFO�[0m:     Finished server process [�[36m856�[0m]

cqhttp插件配置文件为默认,控制台没有文字输出。server.py除更改过qq信息外没有进行更改。

感谢分享,T5 2.3版 mqtt不知为何无法回调

你好up主,一直无法进群联系,故开了issues.
我上传程序后,一直无法刷新出天气,已经更换成自己的和风key

mqtt主题 notice_r 可以回调并显示在显示屏上

监听主题 weather_r 信息
weather_call_r call for weather info
{"code_1": "18", "code_2": "18", "wea_1": "小雨", "wea_2": "小雨", "tmp_1_min": "26", "tmp_1_max": "34", "tmp_2_min": "26", "tmp_2_max": "33"}

ARDUINOJSON库版本 5 和 6.9.1均使用过,一直无法解析,不知是何故。

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.