iot_water_monitor_v2
Dependencies: easy-connect-v16 Watchdog FP MQTTPacket RecordType-v-16 watersenor_and_temp_code
jsonString.md
- Committer:
- DuyLionTran
- Date:
- 2018-04-03
- Revision:
- 57:898fcb6692cd
- Parent:
- 55:c405323f8d5a
File content as of revision 57:898fcb6692cd:
# PACKET JSON DETAILS 1/ SYSTEM TO SERVER {"type":1, "deviceId": "string", "cmdID":uint16_t,"adc0":uint16_t,"adc1":uint16_t,"adc2":uint16_t,"adc3":uint16_t} //no need to display this one {"type":2,"deviceId": "string", "time":epoch, "cmdID":uint16_t, "temperature0":float, "oxygen0":float} //sensor values //map voi cai hien //map voi cai hien thi thi nhiet do DO {"type":3,"deviceId": "string", "time":epoch, "cmdID":uint16_t,"relayState1":int 0 or 1, "relayState2":int 0 or 1} //relay state values //thoi gian thiet bi //Ngo ra 1 //Ngo ra 2 {"type":4, "deviceId": "string", "time":epoch, "cmdID":uint16_t,"mode":int 0 or 1,"OxygenThreshold":int ,"TemperatureThreshold":int, "uploadInterval":int} //config values 0 for automatic //che do hoat dong //nguong tac dong DO //nguong tac dong nhiet do //tan suat lay du lieu 1 for manual cmdID should increase 1 if all 4 types are sent successfully 2/ SERVER TO SYSTEM //send one command when pressing one button. For example when there 4 buttons with 4 different commands, pressing button A will send command 0, not sending all 4 commands 0 1 2 3 (y em la moi nut nhan chi gui 1 command thoi dc ko anh? gui het 4 comman 1 luc de bi loi lam a) {"type":0, "deviceId": "string", "cmdID":uint16_t} //Calib button {"type":1, "deviceId": "string", "cmdID":uint16_t, "AlarmTime":epoch, "SetRelayState1":int 0 or 1, "SetRelayState2":int 0 or 1} //Set time to turn on//off the relay //Cái này là tính nang hen gio bat tat relay, and Danh thêm vô giúp em dc ko ?? {"type":2, "deviceId": "string", "cmdID":uint16_t,"relayState1":int 0 or 1, "relayState2":int 0 or 1} //Ði?u khi?n relay nhu cu {"type":3, "deviceId": "string", "cmdID":"uint16_t","mode":int 0 or 1,"OxygenThreshold":int,"TemperatureThreshold":int, "uploadInterval":int, "setRTCTime":epoch} 1 for automatic //field cuoi là cài dat gio cho 0 for manual //thiet bi {"type":4, "deviceId": "string", "cmdID":uint16_t} //Cái này là nút synchronize, nh?n vô phát là c?p nh?t h?t giá tr? c?m bi?n uint8_t CONFIG_Mode; uint8_t CONFIG_MinOxi; uint8_t CONFIG_MaxOxi; uint16_t CONFIG_UploadInterval;