發表文章

目前顯示的是 2020的文章

2010 skoda superb combi ABS error

圖片
recently I got the ABS and ESP warning lights. Using scanning tool I got 01276 error. If I reset the code, and start again it won't show up, but few days later, it comes back... I did some search on the web, the first recommendation is to start with fuse of ABS.. http://wiki.ross-tech.com/wiki/index.php/01276#01276_-_ABS_Hydraulic_Pump_.28V64.29:_Implausible_Signal I checked my manual, but complete confused, since the layout does not match my car fuse boxs. Check again the manual, there is a version 2 of fusebox layout... Here is the fuse box in engine room: Where F5=20A and F25=40A is related to ABS valves and pump Here is my fuse box of dash board. Where the F2=5A related to ABS/ESP and tire pressure control update20201206 the warning light comes and goes several time, it does not light up in these 2 days... The warning comes up in following weeks, again and again...but only when the first start up of the day, once it's gone on other re-start of engine, it will not show up ag

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

Zigbee2mqtt Node-red google sheet

圖片
  Excel sheet is an old old tradition of engineering. I have my zig2mqtt runs correctly on Pi3B, as well as mqtt and node-red. But the document on how to write data to google sheet seems very unclear to me. I did a search in managing palette and there is 2: With article on the  viseo one: https://www.rodened.com/posts/how-to-read-and-write-data-to-a-google-sheet-in-node-red-1/ I tried the  node-red-contrib-viseo-google-spreadsheet after correctly set up credential, share the google sheet, I was able to access the google sheet, for get cell..etc. But when I try to append a row I could not figure out what is the data format to feed in the node. I gave up after a night of testing. then I found this blog: https://grassrootengineer.medium.com/apply-node-red-to-google-sheet-e0c7db9ada8  This lead me to this node: node-red-contrib-google-sheets still no much documentation, but I have better luck on this. This node will log the payload into the cell. and I figure out how to append a row. [[&qu

Booting pi 4 from USB with SSD on Jmicron SATA USB adapter

圖片
I have a Pi4 4GB version, it boots ok with sd card. I followed the instruction here:  https://www.tomshardware.com/how-to/boot-raspberry-pi-4-usb it works with my TDK 32GB usb drive, but it does not work with my SATA to USB3 adapter. Mine looks like the one in this video then in this discussion: https://www.raspberrypi.org/forums/viewtopic.php?t=286835 it talks about the adapter of JMicron, and what to do to make it works. https://www.raspberrypi.org/forums/viewtopic.php?t=286835#p1734395 after all the update of eeprom, and setup the pi config, plug in your ssd, use lsusb to find the ID of your adapter. the number may vary, mine is 152d:0578 pi@raspberrypi:~ $ lsusb Bus 002 Device 002: ID 152d:0579 JMicron Technology Corp. / JMicron USA Technology Corp. Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 1411:1819 Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub then do the sd copier stu

cubecell and IIC sensors powered by Vext issue

  http://community.heltec.cn/t/cubecell-vext-with-i2c-sensors/886/2 Testing on IIC sensor such as BME280/BMP280 and DH1750, and controlled by Vext, it seems there is a problem on IIC bus when power back the Vext. The dirty solution is to add     Wire.begin(); and Wire.end(); so my structure is like this:(power related in red, IIC in green, sensors in blue)   pinMode(Vext, OUTPUT);   digitalWrite(Vext, LOW);   delay(200);  Wire.begin();   if (!bme280.init()) {     Serial.println("bme280 error!");   }   delay(100);   temperature = bme280.getTemperature();   pressure =  bme280.getPressure() / 100;   humidity = bme280.getHumidity();   if(lightMeter.begin()) {   Serial.println(F("BH1750 inited"));   } delay(100);// critical to get reading, but the first reading is always 0   float lux = lightMeter.readLightLevel(true);     Serial.print("Light: ");   Serial.print(lux);   Serial.println(" lx");   Wire.end();     digitalWrite(Vext, HIGH);// turn off the

zigbee2Mqtt part 1 with CC2530 and FTDI

圖片
from here: https://github.com/koenkk/zigbee2mqtt https://www.zigbee2mqtt.io/information/supported_devices.html Zigbee2mqtt supports several CC2530 and CC2531 devices. Both can be used as a router or coordinator. A discussion of these devices can be found  here . For more information about a coordinator and routers can be found  here . Z-Stack coordinator firmwares This repository contains various Z-Stack coordinator firmwares. Overiew Z-Stack Device Zigbee Direct children Routes Notes Z-Stack_Home_1.2 (default) CC2531 1.2 HA 20 30/0 CC2530, CC2530 + CC2591, CC2530 + CC2592 1.2 HA 16 30/0 Z-Stack_Home_1.2 (source_routing) CC2531, CC2530, CC2530 + CC2591, CC2530 + CC2592 1.2 HA 5 40/40 Z-Stack_3.0.x CC2531 3.0 15 40/0 -  Discussion #1445 - Max 40 Zigbee 3.0 devices CC2530, CC2530 + CC2591, CC2530 + CC2592 3.0 10 40/0 -  Discussion #1445 - Max 40 Zigbee 3.0 devices Z-Stack_3.x.0 CC26X2R1, CC1352P_2 3.0 50 100/200 -  Discussion #1429 - Max 200 Zigbee 3.0 devices an

LoraWAN TTN node device Part2: with MCCI LoRaWAN LMIC library on TTGO ESP32 Lora

圖片
 For LMiC based lib, the most recommended is MCCI LoraWan https://github.com/mcci-catena/arduino-lmic since it's an active project, frequently maintained, well documented. even with a doc on how to add region , but I don't have enough knowledge to understand the code. functions tested with loraWan 1.02/1.03, support OTAA. Adafruit has an article on this lib with their feather board. https://learn.adafruit.com/the-things-network-for-feather/overview Before starting coding, you  have to go to your TTN console and register a device in your existing application,  the Device ID is some thing for your memo, nothing related to the network.  For the device EUI, since we don't have one on chip, you can ckick on the symbol, this EUI will be generated by TTN.  once every thing is ready, the register tap will become green, now register it. then you will have your device EUI, applicaiton EUI and app key, you will need these in your code. Some library will make these parameters configur