From c13c9806f957ebc675462737f4b328d3ab89e028 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Mon, 10 Jul 2023 17:29:22 +0800
Subject: [PATCH] update gpsd.c

---
 mqttd/etc/mqttd.conf |   44 +++++++++++++++++++++++++++++++-------------
 1 files changed, 31 insertions(+), 13 deletions(-)

diff --git a/mqttd/etc/mqttd.conf b/mqttd/etc/mqttd.conf
index 773f954..cb3e78c 100644
--- a/mqttd/etc/mqttd.conf
+++ b/mqttd/etc/mqttd.conf
@@ -1,31 +1,49 @@
 [common]
-id="rpi3b001"
+id="RPi.3B-GP-0001"
 
+# 树莓派连接的外设信息,0:禁用或未连接  其他: 使能或相关硬件连接的Pin管脚(wPI模式)
 [hardware]
-# Settings 0:sisable  others: enable or connected #PIN nubmer(wPI)
 
-# Enablue hardware support or not, help to running on X86
+# 是否使能硬件支持,如果是在X86上调试该程序,可以把该选项设置为0 
 enable=1
 
-# relay connected wPI #pin number, if set to 0 means disable
+# 控制220V照明灯的继电器, 0: 禁用   !0:继电器模块树莓派的wPI管脚编号
 relay_pin=29
 
-# beep connected wPI #pin number, if set to 0 means disable
+# 控制蜂鸣器,0: 禁用   !0:蜂鸣器连接树莓派的wPI管脚编号
 beep_pin=0
 
-# RGB 3-colors LED connect wPI #pin number, if all set to 0 means disable
+# 蜂鸣器响的次数: 0: 不响  >0: 蜂鸣器响的次数
+beep_times=2
+
+# RGB三色LED, 全0:禁用   !0: 三色LED相关引脚连接树莓派的wPI管脚编号
 red_pin=0
 green_pin=0
 blue_pin=0
 
-# temperature sensor ds18b20
+# 是否使能 DS18b20 温度传感器模块,0:禁用  1:使能
 ds18b20=1
 
-# temperature and hummidity sensor sht2x
+# 是否使能 SHT2X 温湿度传感器模块,0:禁用  1:使能
 sht2x=0
 
-# light intensity sensor TSL2561
-lux=0
+# 是否使能 TSL2561 光强传感器模块,0:禁用  1:使能
+lux=1
+
+# 是否使能 红外 探测入侵功能, 0: 禁用 !0: 红外模块连接到树莓派的wPI管脚编号
+infrared_pin=28
+
+# 探测到人来了是否响蜂鸣器, 0: 禁用 1:使能
+inbreak_beep=1
+
+# 如果探测到人来了是否通过继电器控制灯泡, 0:不补光 1:补光 2:根据光强传感器的信息自动补光,如果光强传感器不在则补光
+fillin_light=2
+
+# 继电器补光时长, 单位秒. 红外探测到人后电平为此时间大概是35秒左右
+light_intval=35
+
+# 光强传感器采样值低于该阈值将开灯
+lux_threshold=0.01
 
 
 [logger]
@@ -44,7 +62,7 @@
 [broker]
 
 # broker 服务器地址和端口号
-hostname="master.iot-yun.com"
+hostname="master.iot-yun.club"
 port=10883
 
 # broker 认证连接的用户名和密码
@@ -64,8 +82,8 @@
 pubTopic="$Sys/Studio/Uplink"
 pubQos=0
 
-# Publisher上报传感器数据的周期
-interval=300
+# Publisher上报传感器数据的周期,单位是秒
+interval=60
 
 [subsciber]
 

--
Gitblit v1.9.1