找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
楼主: zxq_kyle

[N1盒子] 发一个空闲时间写的自建dc1服务器,和dc1控制app

 火... [复制链接]
发表于 2019-9-26 20:57 | 显示全部楼层
谢谢分享好经验!!!!辛苦!!!!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-9-29 12:33 | 显示全部楼层
请问楼主,总是显示token失败咋回事

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×

点评

重启容器然后 docker logs -f dc1server 打日志  详情 回复 发表于 2019-9-30 09:51
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-9-29 22:40 | 显示全部楼层
厉害,armbian+omv+docker成功。看来可以删掉homeassistant了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-9-30 09:04 | 显示全部楼层
求帮助 怎么弄都不行

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×

点评

重启容器然后 docker logs -f dc1server 打日志  详情 回复 发表于 2019-9-30 09:50
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-9-30 09:24 | 显示全部楼层
大佬牛皮   
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2019-9-30 09:50 | 显示全部楼层
w13689226302 发表于 2019-9-30 09:04
求帮助 怎么弄都不行

重启容器然后
docker logs -f dc1server
打日志

点评

at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:247) at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1140) at io.netty.channel.socket.nio.NioS  详情 回复 发表于 2019-9-30 10:08
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2019-9-30 09:51 | 显示全部楼层
wayes 发表于 2019-9-29 12:33
请问楼主,总是显示token失败咋回事

重启容器然后
docker logs -f dc1server
打日志

点评

我用的是armbian。看前面回帖网友说高恪不能把域名解析到局域网地址,只能解析到外网。可我刚好就是高恪,也就这一台路由。高恪这个锅能实锤吗?  详情 回复 发表于 2019-9-30 17:26
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-9-30 10:08 | 显示全部楼层
zxq_kyle 发表于 2019-9-30 09:50
重启容器然后
docker logs -f dc1server
打日志

        at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:247)
        at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1140)
        at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketCha                                                                                                 nnel.java:347)
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(Abstra                                                                                                 ctNioByteChannel.java:148)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.jav                                                                                                 a:697)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEve                                                                                                 ntLoop.java:632)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.ja                                                                                                 va:549)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:511)
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThread                                                                                                 EventExecutor.java:918)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java                                                                                                 :74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalR                                                                                                 unnable.java:30)
        at java.base/java.lang.Thread.run(Unknown Source)

///////////////////////////////////////////////////////////////////////
/[NOTICE]/ token:dc1server
///////////////////////////////////////////////////////////////////////
2019-09-30 10:05:32,412 [INFO] TableUtils creating table 'Dc1'
2019-09-30 10:05:32,905 [DEBUG] JdbcConnectionSource opened connection to jdbc:s                                                                                                 qlite:/opt/dc1_database.db got #1146147158
2019-09-30 10:05:32,924 [INFO] TableUtils executed create table statement change                                                                                                 d 0 rows: CREATE TABLE IF NOT EXISTS `Dc1` (`id` VARCHAR NOT NULL , `status` VAR                                                                                                 CHAR , `I` INTEGER , `V` INTEGER , `P` INTEGER , `updateTime` BIGINT , `powerSta                                                                                                 rtTime` BIGINT , `totalPower` BIGINT , `names` BLOB ,  UNIQUE (`id`), PRIMARY KE                                                                                                 Y (`id`) )
2019-09-30 10:05:32,956 [INFO] TableUtils creating table 'planbean'
2019-09-30 10:05:32,958 [INFO] TableUtils executed create table statement change                                                                                                 d 0 rows: CREATE TABLE IF NOT EXISTS `planbean` (`id` VARCHAR NOT NULL , `device                                                                                                 Id` VARCHAR NOT NULL , `deviceName` VARCHAR , `updateTime` BIGINT , `status` VAR                                                                                                 CHAR , `triggerTime` VARCHAR , `repeat` VARCHAR , `enable` BOOLEAN ,  UNIQUE (`i                                                                                                 d`), PRIMARY KEY (`id`) )
2019-09-30 10:05:32,978 [DEBUG] StatementBuilder built statement SELECT * FROM `                                                                                                 Dc1` ORDER BY `id`
2019-09-30 10:05:32,992 [DEBUG] BaseMappedStatement prepared statement 'SELECT *                                                                                                  FROM `Dc1` ORDER BY `id` ' with 0 args
2019-09-30 10:05:33,000 [DEBUG] SelectIterator starting iterator @632587706 for                                                                                                  'SELECT * FROM `Dc1` ORDER BY `id` '
2019-09-30 10:05:33,001 [DEBUG] SelectIterator closed iterator @632587706 after                                                                                                  0 rows
2019-09-30 10:05:33,003 [DEBUG] StatementExecutor query of 'SELECT * FROM `Dc1`                                                                                                  ORDER BY `id` ' returned 0 results
2019-09-30 10:05:33,031 [DEBUG] StatementBuilder built statement SELECT * FROM `                                                                                                 planbean` ORDER BY `triggerTime`
2019-09-30 10:05:33,034 [DEBUG] BaseMappedStatement prepared statement 'SELECT *                                                                                                  FROM `planbean` ORDER BY `triggerTime` ' with 0 args
2019-09-30 10:05:33,036 [DEBUG] SelectIterator starting iterator @1885903592 for                                                                                                  'SELECT * FROM `planbean` ORDER BY `triggerTime` '
2019-09-30 10:05:33,037 [DEBUG] SelectIterator closed iterator @1885903592 after                                                                                                  0 rows
2019-09-30 10:05:33,038 [DEBUG] StatementExecutor query of 'SELECT * FROM `planb                                                                                                 ean` ORDER BY `triggerTime` ' returned 0 results
Sep 30, 2019 10:05:34 AM io.netty.bootstrap.AbstractBootstrap setChannelOption
WARNING: Unknown channel option 'SO_SNDBUF' for channel '[id: 0x671036fa]'
Sep 30, 2019 10:05:34 AM io.netty.bootstrap.AbstractBootstrap setChannelOption
WARNING: Unknown channel option 'SO_SNDBUF' for channel '[id: 0x1987d45c]'
Server is listening:8000
Server is listening:8800

点评

最新版我把一般日志都关了 你先试试换个token  详情 回复 发表于 2019-9-30 10:43
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2019-9-30 10:43 | 显示全部楼层
本帖最后由 zxq_kyle 于 2019-9-30 10:44 编辑
w13689226302 发表于 2019-9-30 10:08
at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:247)
        at io.netty.buf ...

最新版我把一般日志都关了
你先试试换个token不行的话,用ponyopapa/dc1_server:debug 这个容器重新启动下,这个是带全日志输出的,然后连下手机,把日志发上来

点评

我刚才重启DC1容器了,pon这个怎么弄?很小白不懂。但是这个控制刚需啊。大佬帮我下。  详情 回复 发表于 2019-9-30 10:57
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-9-30 10:57 | 显示全部楼层
zxq_kyle 发表于 2019-9-30 10:43
最新版我把一般日志都关了
你先试试换个token不行的话,用ponyopapa/dc1_server:debug 这个容器重新启 ...

我刚才重启DC1容器了,pon这个怎么弄?很小白不懂。但是这个控制刚需啊。大佬帮我下。

点评

启动然后日志  详情 回复 发表于 2019-9-30 11:29
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2019-9-30 11:29 | 显示全部楼层
w13689226302 发表于 2019-9-30 10:57
我刚才重启DC1容器了,pon这个怎么弄?很小白不懂。但是这个控制刚需啊。大佬帮我下。
先把原来的容器删除
启动
  1. docker run -d  \
  2.         --name=dc1server  \
  3.         --restart=always  \
  4.         -p 8000:8000  \
  5.         -p 8800:8800  \
  6.         -v /opt/dc1server/:/opt/  \
  7.         ponyopapa/dc1_server:debug
复制代码
然后日志

点评

- phone|send id=632f1d30 message=- ------------------------------------------------------------------------ Sep 30, 2019 12:00:12 PM io.netty.channel.DefaultChannelPipeline onUnhandledInboundExcepti  详情 回复 发表于 2019-9-30 12:03
是这样吗?  详情 回复 发表于 2019-9-30 11:43
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-9-30 11:43 | 显示全部楼层
zxq_kyle 发表于 2019-9-30 11:29
先把原来的容器删除
启动然后日志

是这样吗?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-9-30 12:03 | 显示全部楼层
本帖最后由 w13689226302 于 2019-9-30 12:09 编辑
zxq_kyle 发表于 2019-9-30 11:29
先把原来的容器删除
启动然后日志

[iNFO]- phone|send id=632f1d30 message=-
------------------------------------------------------------------------
Sep 30, 2019 12:00:12 PM io.netty.channel.DefaultChannelPipeline onUnhandledInboundException
WARNING: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.io.IOException: Connection reset by peer
        at java.base/sun.nio.ch.FileDispatcherImpl.read0(Native Method)
        at java.base/sun.nio.ch.SocketDispatcher.read(Unknown Source)
        at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
        at java.base/sun.nio.ch.IOUtil.read(Unknown Source)
        at java.base/sun.nio.ch.IOUtil.read(Unknown Source)
        at java.base/sun.nio.ch.SocketChannelImpl.read(Unknown Source)
        at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:247)
        at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1140)
        at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347)
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:697)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:632)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:549)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:511)
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Unknown Source)

------------------------------------------------------------------------
-[iNFO]- phone|receive id=4b07b07e message=-

------------------------------------------------------------------------
------------------------------------------------------------------------
-[iNFO]- phone|receive id=4b07b07e message=-

------------------------------------------------------------------------
------------------------------------------------------------------------
-[iNFO]- phone|send id=f40ca1e2 message=-
------------------------------------------------------------------------
------------------------------------------------------------------------
-[iNFO]- phone|send id=4b07b07e message=-
------------------------------------------------------------------------
------------------------------------------------------------------------
-[iNFO]- phone|receive id=4b07b07e message=-

------------------------------------------------------------------------
------------------------------------------------------------------------
-[iNFO]- phone|receive id=4b07b07e message=-

------------------------------------------------------------------------
------------------------------------------------------------------------
-[iNFO]- phone|receive id=4b07b07e message=queryDevice 1570d84351dd5acd9aaf0b644b9ffc86

------------------------------------------------------------------------
########################################################################
------------------------------------------------------------------------
#[WARNING]# tip token验证失败!
########################################################################
-[iNFO]- phone|send id=4b07b07e message=tip token验证失败!
------------------------------------------------------------------------
------------------------------------------------------------------------
-[iNFO]- phone|receive id=4b07b07e message=-Sep 30, 2019 12:08:13 PM io.netty.channel.DefaultChannelPipeline onUnhandledInboundException
WARNING: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.io.IOException: Connection reset by peer
        at java.base/sun.nio.ch.FileDispatcherImpl.read0(Native Method)
        at java.base/sun.nio.ch.SocketDispatcher.read(Unknown Source)
        at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
        at java.base/sun.nio.ch.IOUtil.read(Unknown Source)
        at java.base/sun.nio.ch.IOUtil.read(Unknown Source)
        at java.base/sun.nio.ch.SocketChannelImpl.read(Unknown Source)
        at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:247)
        at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1140)
        at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347)
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:697)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:632)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:549)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:511)
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Unknown Source)

Sep 30, 2019 12:08:13 PM io.netty.channel.DefaultChannelPipeline onUnhandledInboundException
WARNING: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.io.IOException: Connection reset by peer
        at java.base/sun.nio.ch.FileDispatcherImpl.read0(Native Method)
        at java.base/sun.nio.ch.SocketDispatcher.read(Unknown Source)
        at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
        at java.base/sun.nio.ch.IOUtil.read(Unknown Source)
        at java.base/sun.nio.ch.IOUtil.read(Unknown Source)
        at java.base/sun.nio.ch.SocketChannelImpl.read(Unknown Source)
        at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:247)
        at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1140)
        at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347)
        at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)
        at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:697)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:632)
        at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:549)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:511)
        at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918)
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Unknown Source)
                                                                                                                                   ------------------------------------------------------------------------
-[iNFO]- phone|receive id=82c2cf4d message=queryDevice 9a791a6c80a3b08c8a1e0aa6d18a4994

------------------------------------------------------------------------
------------------------------------------------------------------------
-[iNFO]- phone|send id=82c2cf4d message=queryDevice []
------------------------------------------------------------------------
------------------------------------------------------------------------
-[iNFO]- phone|receive id=82c2cf4d message=queryDevice 9a791a6c80a3b08c8a1e0aa6d18a4994

------------------------------------------------------------------------
------------------------------------------------------------------------
-[iNFO]- phone|send id=82c2cf4d message=queryDevice []
------------------------------------------------------------------------
------------------------------------------------------------------------
-[iNFO]- phone|receive id=82c2cf4d message=queryDevice 9a791a6c80a3b08c8a1e0aa6d18a4994

------------------------------------------------------------------------
------------------------------------------------------------------------
-[iNFO]- phone|send id=82c2cf4d message=queryDevice []
------------------------------------------------------------------------



点评

手机app上设置token了吗?默认是dc1server  详情 回复 发表于 2019-9-30 13:33
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2019-9-30 12:12 | 显示全部楼层
感谢更新!!!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2019-9-30 13:33 | 显示全部楼层
本帖最后由 zxq_kyle 于 2019-9-30 13:40 编辑
w13689226302 发表于 2019-9-30 12:03
- phone|send id=632f1d30 message=-
-------------------------------------------------------------- ...

这不是dc1server 对应的token,把手机app的token设成dc1server,应该就是成了

点评

不成功。一开始就这样试了很多次  详情 回复 发表于 2019-9-30 13:48
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-3-29 00:17

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表