-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
38d01fd
commit 7b1ce64
Showing
6 changed files
with
123 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# RuuviTag (RAWv2 data format) | ||
|
||
|Model Id|[RuuviTag_RAWv2](https://github.com/theengs/decoder/blob/development/src/devices/RuuviTag_RAWv2_json.h)| | ||
|-|-| | ||
|Brand|Ruuvi| | ||
|Model|RuuviTag| | ||
|Short Description| Open source environmental sensor| | ||
|Communication|BLE broadcast| | ||
|Frequency|2.4Ghz| | ||
|Power source|CR2477| | ||
|Exchanged data|temperature, humidity, pressure, acceleration, voltage, TX power, movement counter, measurement sequence number| | ||
|Encrypted|No| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -79,6 +79,7 @@ class TheengsDecoder { | |
INODE_EM, | ||
IBT_2X, | ||
RUUVITAG_RAWV1, | ||
RUUVITAG_RAWV2, | ||
}; | ||
|
||
private: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
const char* _RuuviTag_RAWv2_json = "{\"brand\":\"Ruuvi\",\"model\":\"RuuviTag\",\"model_id\":\"RuuviTag_RAWv2\",\"condition\":[\"manufacturerdata\",\"=\",52,\"index\",0,\"990405\"],\"properties\":{\"tempc\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",6,4,false,true],\"post_proc\":[\"/\",200]},\"hum\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",10,4,false,false],\"post_proc\":[\"/\",400]},\"pres\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",14,4,false,false],\"post_proc\":[\"+\",50000,\"/\",100]},\"accx\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",18,4,false,true],\"post_proc\":[\"/\",1000]},\"accy\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",22,4,false,true],\"post_proc\":[\"/\",1000]},\"accz\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",26,4,false,true],\"post_proc\":[\"/\",1000]},\"volt\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",30,4,false,false],\"post_proc\":[\">\",5,\"+\",1600,\"/\",1000]},\"tx\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",30,4,false,false],\"post_proc\":[\"%\",32,\"*\",2,\"-\",40]},\"mov\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",34,2,false,false]},\"seq\":{\"decoder\":[\"value_from_hex_data\",\"manufacturerdata\",36,4,false,false]}}}"; | ||
/*R""""( | ||
{ | ||
"brand":"Ruuvi", | ||
"model":"RuuviTag", | ||
"model_id":"RuuviTag_RAWv2", | ||
"condition":["manufacturerdata", "=", 52, "index", 0, "990405"], | ||
"properties":{ | ||
"tempc":{ | ||
"decoder":["value_from_hex_data", "manufacturerdata", 6, 4, false, true], | ||
"post_proc":["/", 200] | ||
}, | ||
"hum":{ | ||
"decoder":["value_from_hex_data", "manufacturerdata", 10, 4, false, false], | ||
"post_proc":["/", 400] | ||
}, | ||
"pres":{ | ||
"decoder":["value_from_hex_data", "manufacturerdata", 14, 4, false, false], | ||
"post_proc":["+", 50000, "/", 100] | ||
}, | ||
"accx":{ | ||
"decoder":["value_from_hex_data", "manufacturerdata", 18, 4, false, true], | ||
"post_proc":["/", 1000] | ||
}, | ||
"accy":{ | ||
"decoder":["value_from_hex_data", "manufacturerdata", 22, 4, false, true], | ||
"post_proc":["/", 1000] | ||
}, | ||
"accz":{ | ||
"decoder":["value_from_hex_data", "manufacturerdata", 26, 4, false, true], | ||
"post_proc":["/", 1000] | ||
}, | ||
"volt":{ | ||
"decoder":["value_from_hex_data", "manufacturerdata", 30, 4, false, false], | ||
"post_proc":[">", 5, "+", 1600, "/", 1000] | ||
}, | ||
"tx":{ | ||
"decoder":["value_from_hex_data", "manufacturerdata", 30, 4, false, false], | ||
"post_proc":["%", 32, "*", 2, "-", 40] | ||
}, | ||
"mov":{ | ||
"decoder":["value_from_hex_data", "manufacturerdata", 34, 2, false, false] | ||
}, | ||
"seq":{ | ||
"decoder":["value_from_hex_data", "manufacturerdata", 36, 4, false, false] | ||
} | ||
} | ||
})"""";*/ | ||
|
||
const char* _RuuviTag_RAWv2_json_props = "{\"properties\":{\"hum\":{\"unit\":\"%\",\"name\":\"humidity\"},\"tempc\":{\"unit\":\"°C\",\"name\":\"temperature\"},\"pres\":{\"unit\":\"hPa\",\"name\":\"pressure\"},\"accx\":{\"unit\":\"g\",\"name\":\"accelerationX\"},\"accy\":{\"unit\":\"g\",\"name\":\"accelerationY\"},\"accz\":{\"unit\":\"g\",\"name\":\"accelerationZ\"},\"volt\":{\"unit\":\"V\",\"name\":\"voltage\"},\"tx\":{\"unit\":\"dBm\",\"name\":\"TX power\"},\"mov\":{\"unit\":\"int\",\"name\":\"movement counter\"},\"seq\":{\"unit\":\"int\",\"name\":\"measurement sequence number\"}}}"; | ||
/*R""""( | ||
{ | ||
"properties":{ | ||
"hum":{ | ||
"unit":"%", | ||
"name":"humidity" | ||
}, | ||
"tempc":{ | ||
"unit":"°C", | ||
"name":"temperature" | ||
}, | ||
"pres":{ | ||
"unit":"hPa", | ||
"name":"pressure" | ||
}, | ||
"accx":{ | ||
"unit":"g", | ||
"name":"accelerationX" | ||
}, | ||
"accy":{ | ||
"unit":"g", | ||
"name":"accelerationY" | ||
}, | ||
"accz":{ | ||
"unit":"g", | ||
"name":"accelerationZ" | ||
}, | ||
"volt":{ | ||
"unit":"V", | ||
"name":"voltage" | ||
}, | ||
"tx":{ | ||
"unit":"dBm", | ||
"name":"TX power" | ||
}, | ||
"mov":{ | ||
"unit":"int", | ||
"name":"movement counter" | ||
}, | ||
"seq":{ | ||
"unit":"int", | ||
"name":"measurement sequence number" | ||
} | ||
} | ||
})"""";*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters