發表文章

目前顯示的是 11月, 2020的文章

Heltec AB01 uA sleep mode...how?

圖片
 The document of heltec mentioned an 3.5uA sleep mode( https://heltec-automation-docs.readthedocs.io/en/latest/cubecell/ ), but you won't be able to achive this using USB connected power. Nor a lipo battery...since there are LDO on board which can't be sleeped. here are somedata I found on web: Power consumption: https://heltec.org/project/htcc-ab01/ LoRa Rx Mode: 10mA LoRa 10dBm output: 70mA LoRa 14dBm output: 90mA LoRa 17dBm output: 100mA LoRa 20dBm output: 105mA Sleep Mode (USB powered): 9.6mA Sleep Mode (VBAT/battery powered): 11uA Sleep Mode (3.3V pin powered): 3.5uA the measurement of 3.5uA is done with an external 3.3V power source directly. Which is not really useful in real application. If their nr is correct. An other solution is to use a life battery(maybe coin battery will also work.) directly connect to 3.3V pin on board. The chip can stand upto 3.6V, charged life is about 3.6V. So I did so, but I 1st tried 3.5V life(I did not full charged the battery.) The board s

Using local node red to get TTN lorawan data through ubidots

圖片
 This is kind of cloud data to local data storage. I have a Lorawan node sending data to TTN. I have it presented on Ubidots  . which provide a very good presentation of data and management of device and data. Ubidots also provide 2 nodes in node red, one to put data to Ubidots, one to receive data from ubidots. ubidots_out is to send data to ubidots using MQTT ubidots_in is to receive data from ubidots using MQTT Getting data to/from Ubidots has a great example: https://help.ubidots.com/en/articles/1440402-connect-node-red-with-ubidots I have 2 shorts of data on Ubidots, one is direct data integration from TTN, one my local zigbee sensor data uploaded to ubidots using node:ubidots_out. To receive the 2nd type of data correctly with ubidots in, you will need to add device label in your message payload when using ubitdots out to up load your data. Othe wise, you can still view the data on the dashboard, but won't be able to down load it. The 2nd tricky thing is the format returned f

LoraWAN TTN http data to gsheet

圖片
this one work, and can parsing field data with json, it first has to run setup.  also change your payload based on the data field. The problem I met is that the decode data is not shown, same as the down link url https://blog.squix.org/2017/07/thethingsnetwork-how-to-use-google-spreadsheet-to-log-data.html this one is another version originated form above.: https://github.com/Uspizig/Ttn-gooogle-script Nice one: https://github.com/avbentem/libelium-waspmote-lorawan  is a well documented project, there is a section of http to google sheet and run on latest V8 runtime of google app script. https://github.com/avbentem/libelium-waspmote-lorawan/blob/master/src/google-sheets/README.md the code will send email to sheet owner in case of any error. So make sure you adjust the field property correctly.  After modification of  row.push fields. part, it works pretty well. my little question is that since few days, my sensor node always resend 3-4 times as retry. I will look into this. For these h

zigbee2mqtt, node red, influxdb and grafana

圖片
 the iotstak comes with infuxDB:a data base very similar to firebase, which you don't need to setup the database every data type to make it work. But you still need to setup a name of database, this is done with a terminal and command, there is not yet web like configuration page. To access the ssh in a container, easy way is to go through portainer Once connect to ssh, type in influx to get into database, then you can use SQL like command to create you database. But luckily, there is a program:  https://github.com/CymaticLabs/InfluxDBStudio which can do the database things easier. The defaultuser:password of influxDB in IOTstack is : nordred: nodered Now, back to node red. To put data into influxDB you have to select the influxDB out the influxDB in means to get data from influxDB into nodered. then you have to config the server, the port of influxDB is 8086 Once server set, the measurement is the page where the data is loged.(you can set it here, no need to set this in influxDB)

小米 Zigbee device採買經驗

圖片
 第一次是從露天上買 第二次想從掏寶買,結果因為產品帶電池,集貨倉拒收...價格差異不大, 還是在台灣買吧~ 新一代的小米 gateway, 建入了多種LPWAN, wifi,bt,zigbee, 所以有的device很難看出是那種協定,最好的方法是查一下zigbee2mqtt:https://www.zigbee2mqtt.io/information/supported_devices.html device很多, ikea的部分台灣買不到... 小米的章節 https://www.zigbee2mqtt.io/information/supported_devices.html#xiaomi 小米有  Aqara 跟   MiJia   兩系列, 不太知道是什麼差異... 每個都有圖以及型號, 點進去都有pairing 的資料...功能的描述也比較清楚...有使用的問題也會report 在裏面

TTN data from cloud to local node red....not supporting Pi

 I have set up a node for temp/humid in TTNWan, and a local zigbee2mqtt runs locally. The Zigbee2mqtt runs on a pi3B+ with docker(IOTstack) together with node-RED. There is a  node-red-contrib-ttn   seems able to get data from ttn to local(? wondering how they manage theIP)       found example here:  https://flows.nodered.org/node/node-red-contrib-ttn you can install it through palette management, but nodes won't show up until you stop and restart node-RED from portainer. But after installation from palette, the node shows up, but the contain is not exactly correct, there is no option of config as explained here: https://github.com/TheThingsNetwork/nodered-app-node/blob/master/docs/quickstart.md so I login to portainer and re install with npm command, it shows that my node version is outofdate. Reading on git,  https://github.com/TheThingsNetwork/nodered-app-node#the-things-network-node-red-nodes these nodes are not supported on Pi...Why??? but it seems we can use MQTT in node red