Traccar 短信平台改接入到RED中。

Traccar 平台的安装!

1.jpg
2.jpg
3.jpg
4.jpg

我把我的附件打包,大家把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

Basic dXNlciUzQXBhc3N3b3Jk

这是NR的用户名密码吗?如果没有密码怎么设置?是删除还是?
另外这些要改吗?
{
“phone_number”: “{phone}”,
“message”: “{message}”,
“device_id”: 1
}]

短信平台修改不成功,
默认是这样的可以通过 <entry key='sms.http.url'>http://192.168.1.253:1889/Traccar?</entry>
修改后无法启动
<entry key='sms.http.url'>[http://192.168.99.130:1880/Traccar?</entry>](http://192.168.99.130:1880/Traccar?</entry>)
望指教,多谢

<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.200.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
    }]

感谢大佬回复,那我应该部署成功了,再问下,直接用你的流,那么只需要改最后推送的那步,改为自己的企业微信信息就可以了哇?

是的哦~!~!~!~!~!

请问NR流里。第一个填写的是什么地址,

哪个地址呀,不明白您说的是哪个地址呀

NR流里,信息处理 前面那个是 节点是填写什么地址和端口号

大佬。手机的位置信息怎么接入到nr里面?在traccar里面已经能看到位置了

TRACCAR有手机APP的装了设置下就行了,搜下有教程。

我用群晖都装不起来

App装了,也设置了,内网的的traccar也看到位置了,虽然偏移厉害,但是按照论坛教程里的流修改节点后拿不到经纬度数据

我感觉还是我端口没映射号,我nr内网1880,映射到外网是11880,traccar内网没变是5055,我同样也是映射到11880上,然后app地址就是xxx.com:11880/traccar

大佬,我按照教程弄好了,流也导入,不过就是没有反应啊!我在第一个节点后面加了个debug,一直没有东西输出。请指点一下。

上你的配置呀~!~!你怎么配。
自己要系统里要写上手机号哦!~~!不然他不行哦,,,,

<entry key='gt06.timezone'>28800</entry>
<entry key='database.driver'>org.h2.Driver</entry>
<entry key='database.url'>jdbc:h2:./data/database</entry>
<entry key='database.user'>sa</entry>
<entry key='database.password'></entry>
<!--
<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&amp;useSSL=false&amp;allowMultiQueries=true&amp;autoReconnect=true&amp;useUnicode=yes&amp;characterEncoding=UTF-8&amp;sessionVariables=sql_mode=''</entry>
<entry key='database.user'>甯愬彿</entry> 
<entry key='database.password'>瀵嗙爜</entry>
-->



<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.0.200:1880/Traccar?</entry>
<entry key='sms.http.authorization'>Basic Z3pyb2NAcXEuY29tJTNBYWRtaW4</entry>
<entry key='sms.http.template'>
    [{
        "phone_number": "{phone}",
        "message": "{message}",
        "device_id": 1
    }]

这是我的配置,然后traccar平台要怎么配置吗?

1
反正把有电话的地方全写上号码,乱写一个11位的

手机也都填了,点账户里的测试没有显示有发送事件,但手机和企业微信、nodered
都没有反应