Traccar 平台的安装!
我把我的附件打包,大家把SHORT这个短信模板安我这样修改,
Traccar.zip (5.5 KB)大家下载看看,我就这么瞎改的。
-------------------------------时间这里必须还要这样写下------------
<entry key='gt06.timezone'>28800</entry>
-------------------------------以下是配置数据库我把它配到群晖下面不修改的可以不用下面这些------------
<entry key='database.driver'>com.mysql.jdbc.Driver</entry>
<entry key='database.url'>jdbc:mysql://192.168.1.253:3307/Traccar?serverTimezone=UTC&useSSL=false&allowMultiQueries=true&autoReconnect=true&useUnicode=yes&characterEncoding=UTF-8&sessionVariables=sql_mode=''</entry>
<entry key='database.user'>帐号</entry>
<entry key='database.password'>密码</entry>
----------------------------------------以下是配置短信平吧我们直接配到我们的RED上去
<entry key='notificator.types'>web,mail,sms</entry>
<entry key='notificator.sms.manager.class'>org.traccar.sms.HttpSmsClient</entry>
<entry key='sms.http.url'>[http://192.168.1.253:1889/Traccar?</entry>](http://192.168.1.253:1889/Traccar?</entry>)
<entry key='sms.http.authorization'>Basic dXNlciUzQXBhc3N3b3Jk</entry>
<entry key='sms.http.template'>
{
"phone_number": "{phone}",
"message": "{message}",
"device_id": 1
}]
-------------------------------------帐号农密码在线生成---------------------
网址:https://base64.supfree.net/
--------------------------------------RED配置!!!!!------------------------------
[{"id":"53198836.a19ac8","type":"switch","z":"5e7133db.e0a6ec","name":"","property":"states","propertyType":"msg","rules":[{"t":"regex","v":"exceeds|超速","vt":"str","case":true},{"t":"regex","v":"offline|离线","vt":"str","case":true},{"t":"regex","v":"stopped|停止","vt":"str","case":true},{"t":"regex","v":"ignition","vt":"str","case":true},{"t":"regex","v":"moving|移动","vt":"str","case":true},{"t":"regex","v":"online|上线","vt":"str","case":true},{"t":"regex","v":"offline|脱机","vt":"str","case":true},{"t":"regex","v":"entered","vt":"str","case":true},{"t":"regex","v":"exited","vt":"str","case":true},{"t":"regex","v":"alarm|报警","vt":"str","case":true},{"t":"regex","v":"maintenance|维护","vt":"str","case":true},{"t":"regex","v":"command|命令结果","vt":"str","case":true},{"t":"regex","v":"changed|改变","vt":"str","case":true}],"checkall":"false","repair":false,"outputs":13,"x":430,"y":1040,"wires":[[],[],[],["d75754cf.1e0978"],[],[],[],["a9e03ee1.6c8ba"],["df12f63e.fb7358"],[],[],[],[]]},{"id":"d75754cf.1e0978","type":"switch","z":"5e7133db.e0a6ec","name":"","property":"message","propertyType":"msg","rules":[{"t":"regex","v":"ON","vt":"str","case":true},{"t":"regex","v":"OFF","vt":"str","case":true}],"checkall":"false","repair":false,"outputs":2,"x":550,"y":1000,"wires":[["f9533d07.3019c"],["ebc3da83.a73a08"]]},{"id":"a9e03ee1.6c8ba","type":"function","z":"5e7133db.e0a6ec","name":"进入","func":"msg.payload = msg.name+'在'+msg.time+'进入了'+msg.message\nmsg.touser = 'xuehao'\nreturn msg;\n","outputs":1,"noerr":0,"x":610,"y":1060,"wires":[["52c041c5.7acff"]]},{"id":"df12f63e.fb7358","type":"function","z":"5e7133db.e0a6ec","name":"离开","func":"msg.payload = msg.name+'在'+msg.time+'离开了'+msg.message\nmsg.touser = 'xuehao'\nreturn msg;\n","outputs":1,"noerr":0,"x":610,"y":1100,"wires":[["52c041c5.7acff"]]},{"id":"e5d6f0ff.9581d","type":"function","z":"5e7133db.e0a6ec","name":"信息处理","func":"msg.name = msg.payload[0].message.split(\"||\")[0]\nmsg.states = msg.payload[0].message.split(\"||\")[1]\nmsg.message = msg.payload[0].message.split(\"||\")[2]\nmsg.time = msg.payload[0].message.split(\"||\")[3]\n\nreturn msg;\n\n\n","outputs":1,"noerr":0,"x":290,"y":1040,"wires":[["53198836.a19ac8"]]},{"id":"f9533d07.3019c","type":"function","z":"5e7133db.e0a6ec","name":"启动","func":"msg.payload = msg.name+'在'+msg.time+'启动'\nmsg.touser = 'xuehao'\nreturn msg;","outputs":1,"noerr":0,"x":690,"y":980,"wires":[[]]},{"id":"ebc3da83.a73a08","type":"function","z":"5e7133db.e0a6ec","name":"熄火","func":"msg.payload = msg.name+'在'+msg.time+'熄火'\nmsg.touser = 'xuehao'\nreturn msg;\n","outputs":1,"noerr":0,"x":690,"y":1020,"wires":[[]]},{"id":"52c041c5.7acff","type":"bizwechat-pushbear","z":"5e7133db.e0a6ec","name":"","bizwechat":"e53dae82.60f31","touser":"","toparty":"","title":"汽车信息","description":"","x":870,"y":1060,"wires":[[]]},{"id":"e93a580f.ff20c8","type":"http in","z":"5e7133db.e0a6ec","name":"","url":"/Traccar","method":"post","upload":true,"swaggerDoc":"","x":110,"y":1040,"wires":[["e5d6f0ff.9581d","9e88e95c.8f0d08"]]},{"id":"9e88e95c.8f0d08","type":"http response","z":"5e7133db.e0a6ec","name":"","statusCode":"","headers":{},"x":290,"y":1080,"wires":[]},{"id":"e53dae82.60f31","type":"bizwechat-configurator","z":"","name":"","port":"","corpid":"","agentid":"","corpsecret":"","url":"","token":"","aeskey":"","client_id":"","client_secret":""}]
效果!!!!
在此教程结束,以上GPS型号为GT06大家可以去闲鱼去买有家有,然后接到自己的平台台只要一个短信。
SERVER,1,你的域名,端口号,0#
这个自己修改呀~!~!~!
在此非常感谢~!~!@dodo.jie