![]() |
Serial Comms - Printable Version +- vThings Forums (http://forum.vair-monitor.com) +-- Forum: vThings (http://forum.vair-monitor.com/forumdisplay.php?fid=1) +--- Forum: vAir Monitor (CO2, Dust, Tempereature, etc..) (http://forum.vair-monitor.com/forumdisplay.php?fid=2) +--- Thread: Serial Comms (/showthread.php?tid=31) |
Serial Comms - Wookey - 11-22-2016 I am old-fashioned so like to have simple serial comms that I understand rather than this newfangled HTTP/MQTT over wifi and chrome app fanciness. At least to start with. This does not seem to be documented anywhere, but I've discovered that (once you got the thing initialised with the chrome app (which just seems to be doing serial comms, so presumably we could arrange for this not to be necessary?)) the device sends out data at the configured period at 256400 baud down the serial conneciton. Excellent. 2$n�+�h���y$��Heap Heap at start: 35520 Found i2c bus on SDA:SCL = D5 ![]() vESPrino v1.16 build20161024 IP address: 0.0.0.0 Chip ID: 23FE8C ready > Waiting for auto-connect Device will go to Deep Sleep mode, once data is sent. Press [Enter] to abort Setup plugin: Neopixel Setup plugin: DweetIO Setup plugin: WebServer Setup plugin: TimerManager --- Setup SENSORS --- Setup sensor: TEST Setup sensor: SI7021 Found SI7021 - Temperature/Humidity Sensor Setup sensor: BME280 Setup sensor: BMP085 Setup sensor: PM2005 Setup sensor: CDM7160 Found CDM7160 CO2 Sensor --- Setup DESTINATIONS --- Setup Destination: CustomHTTP Setup Destination: SerialDump Setup Destination: MQTT Setup Destination: RFX10 Heap At setup end: 33312 --- DestHanlder: sendValue --- 1 Found SI7021 - Temperature/Humidity Sensor Raw CO2: 1638 CustomHTTPDest::process CustomHTTPDest::invoke = http://192.168.1.116:8080/co2new=1638 Error Code: -1 = connection refused Failed SerialDumpDest::process TEMP : 20.47 HUM : 68.34 CO2 : 1649 CO2R : 1638 MQTTDest::process RFDest::process Going into power-safe mode for 30 seconds And if I hit return I get a prompt ready > at which I can type help: OK help - This help page ## - ##cmd1##cmd2##..##cmdN## prop_list - prop_list prop_set - prop_set "key" "value" prop_jset - prop_jset "key"=value info - factory - Return to defaults debug - Turn on debug scani2c - Scan I2C Bus dumpi2c - Scan I2C Bus dumpCfg - Dump EEPROM Contents heap - Free heap restart - sss - sertest - oled - otahtest - HCP Cfg 1 otah - HCP Cfg 2 otau - HCP Cfg 2 fupd - HCP Cfg 2 scan - wifi - static_wifi - ping - sndiot - sleeptype - delay - ipconfig - nop - nop - no command, send to prevent going into power-safe operation during UI interaction deepsleep - nop - no command, send to prevent going into power-safe operation during UI interaction ledcolor - ledcolor ledbrg - ledbrg ledmode - ledmode dweet_start - dweet_start interval_Sec webserver_start - webserver_start testSensor - testSensor toggle testSesnor siInit - bmeInit - bmpInit - pm2005quiet - pm2005quiet 22:00,03:00,180 (zulu start, zulu end, tz offset in minutes) pm2005int - pm2005int 20,3600 (measure time in seconds - active, quiet (<30sec = dynamic mode) cdmloop - cdmtest b - b for DEBUG - test CDM7160 sensor cdmtest - cdmtest b - b for DEBUG - test CDM7160 sensor cdmreg - cdmreg "regid" "value" cdmperf - cdmreg "regid" "value" custom_url_add - custom_url_add "idx","url" custom_url_jadd - custom_url_add "idx","url" custom_url_clean - custom_url_clean - clean all custom urls serial_dump_toggle - serial_dump_toggle toggle serial dump output mqtt_setup - mqtt_setup "idx"value mqtt_msg_add - mqtt_msg_add "idx"value mqtt_msg_clean - mqtt_msg_clean - clean all mqtt messages rf_setaddr - rf_setaddr "CO2" "136" rf_test - rf_setaddr "CO2" "136" cfgiot1 - HCP Cfg 1 cfgiot2 - HCP Cfg 2 A - AT FW Mock A: G - AT FW Mock G: cfggen - cfg_mqtt - cfg_mqval - atest_mqtt - wsi - sendNow - Process destinatios and send Some of that is fairly obvious. Some less so. Is there a protocol doc I've missed somewhere or would it be helpful if I started one? Is there a wiki or only this forum and the git repos? RE: Serial Comms - admin - 11-22-2016 Aahhh.. you've done such a research, i hope at least you had fun ![]() yeah.. this is a firmware that i've been developing for the past 2 years https://github.com/vlast3k/vESPrino-firmware And also tried to popularize a bit recently in this failed indiegogo https://github.com/vlast3k/vESPrino-firmware Just last week i made the necessary changes so that it can be compiled easily by everyone. Next step is fixing the "help" command so that each command dumps a bit more data. Then i need to add more examples and documentaion. And then i try to popularize it in the ESP8266 community. While there have been other trials for some kind of platform on top of the ESP like - MySensors and ESPEasy - both of them are rather targeted to makers who maintain their own stuff, and not so much about running a product with customers that face bugs and need support. The other thing is the heat management that isn't implemented in neither of them, so you cannot use small enclosures to host the ESP8266 and temperature sensors. Just give me a couple of weeks and i will start publishing those stuff. you can also have a look on the Chrome Config tool, which is pure JS, HTML5 and Bootstrap https://github.com/vlast3k/vAirMonitorConfig which sends the commands RE: Serial Comms - vaanja - 11-22-2016 Hi Vladimir, did you have a chance to evaluate ESP8266 successor ESP32? It looks very promising for future use. Regards, Ivan RE: Serial Comms - admin - 11-22-2016 not yet (too many unexpected surprises with the current sensor ![]() in general i expect that it will take 6-7 months until the firmware support for it is stabilized in general i plan to base my next board on it, so that there woould be also bluetooth support and battery option ![]() and we will see what else |