nlrb / com.weather-sensors

Wireless weather sensor app voor Athom Homey
https://apps.athom.com/app/com.weather-sensors
MIT License
14 stars 26 forks source link

Add support for Auriol Z31130-TX device #3

Closed mirakels closed 7 years ago

mirakels commented 7 years ago

Tested with Auriol IAN85059 weather station

nlrb commented 7 years ago

Great, thanks! Do you also have some test payloads for me?

mirakels commented 7 years ago

Payloads seem to vary in big records and small records. Here is a big one. Will dig up smaller ones later on... (this is the raw 433Mhz data if you want the 'translated' I have to do that later...)

{"status":200,"result":[[233,3996,391,2062,395,1052,413,1046,409,2047,390,2038,416,2024,412,1048,413,2039,391,2051,398,1058,403,1057,399,1082,388,1070,405,1055,403,1049,410,1062,399,2043,403,2032,410,2029,401,2050,389,1075,394,2038,402,1049,410,1072,390,2045,406,2020,410,2033,410,2041,391,1077,402,1053,400,2029,408,1072,392,2038,413,1047,409,1073,388,2051,395,3978,398,2053,399,1058,400,1066,401,2043,388,2049,403,2029,412,1049,410,2046,390,2049,405,1052,399,1055,405,1076,383,1072,408,1049,404,1070,393,1070,410,2029,396,2034,406,2045,388,2044,412,1050,412,2026,400,1080,378,1080,399,2038,393,2050,385,2052,406,2030,398,1060,402,1077,390,2050,394,1079,381,2032,404,1065,394,1072,403,2026,411,3997,392,2031,410,1060,401,1064,404,2033,398,2031,407,2042,392,1082,401,2028,400,2049,393,1072,398,1060,395,1063,406,1067,389,1064,411,1051,403,1084,374,2059,398,2023,410,2032,404,2047,389,1069,408,2030,404,1071,381,1075,405,2027,401,2035,409,2038,397,2048,406,1051,400,1071,388,2049,404,1052,407,2029,404,1071,393,1062,413,2023,408,3994,404,2029,402,1072,392,1072,394,2034,406,2035,396,2050,404,1047,407,2028,416,2045,383,1072,406,1056,399,1076,381,1080,403,1050,412,1047,402,1070,257],[400,2025,415,2038,391,2043,408,1058,405,2030,403,1072,402,1058,396,2040,399,2039,392,2053,403,2030,399,1070,392,1074,402,2032,405,1056,403,2045,389,1072,398,1062,402,2045,386,3999,395,2057,379,1076,402,1052,404,2051,389,2042,402,2031,406,1070,391,2045,404,2030,410,1048,404,1073,392,1070,403,1052,412,1071,381,1078,395,1061,401,2032,405,2040,405,2030,407,2025,410,1070,385,2049,404,1063,403,1063,390,2049,398,2034,403,2051,385,2049,400,1058,402,1049,410,2049,398,1057,406,2034,396,1077,384,1071,409,2022,408,4001,391,2042,400,1065,403,1059,399,2042,399,2040,393,2053,399,1048,408,2042,391,2047,398,1060,404,1074,381,1080,403,1053,400,1060,396,1079,401,1058,400,2022,403,2048,391,2050,398,2280,400,1078,386,2051,392,1063,399,1058,399,2044,415,2029,403,2022,416,2042,399,1064,402,1059,400,2043,389,1070,403,2035,402,1066,388,1071,406,2028,405,3997,396,2030,406,1069,392,1073,401,2033,404,2045,383,2050,400,1065,399,2048,389,2034,408,1059,400,1074,390,1071,403,1053,401,1052,409,1067,408,1059,405,2020,412,2042,408,2026,404,2034,404,1070,404,2032,400,1060,402,1077,383,2052,394,2030,404,2044,397,2047,403,1052,403,1072,390,2035,412,1061,391,2056,384,1071,257],[402,2035,398,3996,394,2051,403,1058,400,1061,403,2041,404,2031,402,2027,405,1076,406,2019,414,2022,404,1073,403,1058,398,1068,393,1078,383,1074,399,1060,405,1063,390,2047,406,2025,400,2052,393,2040,402,1061,401,2050,384,1068,407,1061,395,2046,393,2055,395,2031,400,2053,386,1073,403,1048,404,2045,392,1072,400,2031,404,1072,393,1074,395,2026,410,3990,397,2048,390,1073,403,1070,388,2022,408,2052,402,2029,400,1070,392,2044,404,2030,401,1081,382,1073,401,1061,392,1055,412,1064,403,1060,406,1059,393,2051,404,2029,400,2034,399,2042,415,1053,402,2043,387,1081,397,1058,404,2029,404,2041,406,2030,404,2043,388,1077,394,1059,407,2049,381,1072,401,2033,406,1074,384,1072,406,2026,406,3991,393,2050,390,1071,403,1049,411,2042,393,2042,402,2034,402,1069,393,2040,410,2025,401,1080,381,1072,403,1050,409,1066,387,1077,406,1057,400,1067,392,2047,400,2018,417,2058,373,2061,385,1059,405,2037,396,1070,405,1047,408,2050,382,2045,412,2022,405,2045,408,1060,393,1057,410,2036,414,1048,409,2022,409,1070,400,1059,406,2025,403,3993,394,2062,389,1057,405,1058,401,2042,414,2028,402,2041,397,1068,406,2030,404,2043,389,1077,394,1057,406,1070,385,1072,398,1062,403,1071,257],[407,2028,401,2041,398,2038,410,2025,404,1079,400,2034,403,1050,405,1075,393,2035,404,2044,385,2045,406,2033,404,1066,391,1070,402,2034,404,1068,389,2047,402,1056,398,1072,386,2044,411,3979,408,2040,399,1070,392,1066,405,2023,407,2047,400,2032,402,1071,396,2043,398,2036,402,1070,383,1081,398,1059,395,1073,390,1071,395,1062,406,1069,382,2051,403,2028,409,2038,407,2031,407,1048,402,2049,404,1050,414,1063,393,2039,406,2035,395,2047,388,2043,413,1050,402,1067,404,2030,411,1060,392,2052,406,1048,409,1071,380,2044,171,4518]]}

mirakels commented 7 years ago

Here is part of a downloaded statistics: "signal": "Auriol/Z31130", "enabled": true, "stats": { "total": 2842, "ok": "100%", "error": "0%", "invalid": "0%", "lengths": { "36": 2842 }, "payloads": [ { "data": "0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1", "valid": true, "when": "2017-05-15T20:48:18.729Z" }, { "data": "0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1", "valid": true, "when": "2017-05-15T20:48:18.744Z" }, { "data": "0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1", "valid": true, "when": "2017-05-15T20:48:18.812Z" }, { "data": "0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1", "valid": true, "when": "2017-05-15T20:49:15.154Z" }, { "data": "0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1", "valid": true, "when": "2017-05-15T20:49:15.409Z" }, { "data": "0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1", "valid": true, "when": "2017-05-15T20:49:15.426Z" }, { "data": "0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1", "valid": true, "when": "2017-05-15T20:49:15.678Z" }, { "data": "0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1", "valid": true, "when": "2017-05-15T20:49:15.695Z" }, { "data": "0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1", "valid": true, "when": "2017-05-15T20:49:15.709Z" }, { "data": "0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1", "valid": true, "when": "2017-05-15T20:49:15.777Z" } ], "debug": [ "[22:48:18.745] Sensor value has changed: false", "[22:48:18.810] 36 [0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1]", "[22:48:18.811] Id= 127 BatOk= 1 Chan= 0 Temp= 22.5 Hum= 49", "[22:48:18.812] Sensor value has changed: false", "[22:49:15.153] 36 [0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1]", "[22:49:15.154] Id= 127 BatOk= 1 Chan= 0 Temp= 22.5 Hum= 49", "[22:49:15.155] Sensor value has changed: false", "[22:49:15.407] 36 [0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1]", "[22:49:15.408] Id= 127 BatOk= 1 Chan= 0 Temp= 22.5 Hum= 49", "[22:49:15.409] Sensor value has changed: false", "[22:49:15.425] 36 [0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1]", "[22:49:15.426] Id= 127 BatOk= 1 Chan= 0 Temp= 22.5 Hum= 49", "[22:49:15.427] Sensor value has changed: false", "[22:49:15.675] 36 [0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1]", "[22:49:15.676] Id= 127 BatOk= 1 Chan= 0 Temp= 22.5 Hum= 49", "[22:49:15.679] Sensor value has changed: false", "[22:49:15.686] 36 [0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1]", "[22:49:15.694] Id= 127 BatOk= 1 Chan= 0 Temp= 22.5 Hum= 49", "[22:49:15.695] Sensor value has changed: false", "[22:49:15.708] 36 [0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1]", "[22:49:15.709] Id= 127 BatOk= 1 Chan= 0 Temp= 22.5 Hum= 49", "[22:49:15.710] Sensor value has changed: false", "[22:49:15.776] 36 [0,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1,1,0,0,0,1]", "[22:49:15.777] Id= 127 BatOk= 1 Chan= 0 Temp= 22.5 Hum= 49", "[22:49:15.778] Sensor value has changed: false" ], "last": { "id": "127", "type": "TH", "channel": "0", "data": { "lowbattery": false, "temperature": 22.5, "humidity": 49 }, "protocol": "auriol", "lastupdate": "2017-05-15T20:49:15.777Z" } }

nlrb commented 7 years ago

Thanks for the data. Added one to the test suite.

Question on the channel number. Does it support multiple channels (looks like it does)? Then normally numbering starts at 1. Should we add a +1?

mirakels commented 7 years ago

yes it supports multiple channels. The device has a switch to select channel 1, 2 or 3. So yes it might be good to do +1