Closed Icesory closed 10 years ago
This is the station
I have also a excel file where I test some states
Solved the humidity but the temperature is strange
Solved the protocol.
Can pls some one implement this?
module.exports = (helper) ->
pulsesToBinaryMapping = {
'14': '0' #binary 0
'13': '1' #binary 1
'15': '' #footer
}
return protocolInfo = {
name: 'weather4'
type: 'weather'
values:
id:
type: "number"
channel:
type: "number"
temperature:
type: "number"
humidity:
type: "number"
battery:
type: "number"
brands: ["Auriol"]
pulseLengths: [1008, 548, 7920, 4117, 1889, 16052]
pulseCount: 92
decodePulses: (pulses) ->
# pulses could be:
# '00000000121313141414131314131313141314131313141413131313141313141313141414131314141313131415'
# we first map the pulse sequences to binary
binary = helper.map(pulses, pulsesToBinaryMapping)
# binary is now something like: '0110001100000000011000011101011100110001'
# based on this example : T18,8 H71 :1110111001010101011000011000011100010001
# 11101110-0101-0101-011000011000-0111-0001-0001
# 11101110 : Station ID (random after restart)
# 0101 : Check Sum
# 0101 : Batterie 0000=full(3V) 0100=2,6V
# 0100 0000 0110 : temperature is sent by the sensor in °F (and not °C)
# 0111-0001 : humidity first col is tenner, second col is one (einer) { 0111=7 0001=1 }= 71%H
# 0001 : Channel (0001 = 1, xxxx = ?, xxxx = ?)
# the lowest value that the protocol support is 90°F (000000000000).
# In our example it give us 0110 0001 1000
# which is 1560 in decimal
# So the rule is 1560/10 - 90 = 66 °F (18,8 °C) (this rule works fine for all temp
# positive/negative)
t0 = helper.binaryToNumber(binary, 16, 27)
temperature = Math.round((t0 * 10 - 12200) / 18 ) / 10
h0 = helper.binaryToNumber(binary, 28, 31)
h1 = helper.binaryToNumber(binary, 32, 35)
humidity = h0 * 10 + h1
battery = 3 - (helper.binaryToNumber(binary, 12, 15)/10)
return result = {
id: helper.binaryToNumber(binary, 0, 7),
channel: helper.binaryToNumber(binary, 36, 39),
temperature: temperature
humidity: humidity
battery:battery
}
}
module.exports = function(helper) {
var protocolInfo, pulsesToBinaryMapping;
pulsesToBinaryMapping = {
'14': '0',
'13': '1',
'15': ''
};
return protocolInfo = {
name: 'weather4',
type: 'weather',
values: {
id: {
type: "number"
},
channel: {
type: "number"
},
temperature: {
type: "number"
},
humidity: {
type: "number"
},
battery: {
type: "number"
}
},
brands: ["Auriol"],
pulseLengths: [1008, 548, 7920, 4117, 1889, 16052],
pulseCount: 92,
decodePulses: function(pulses) {
var binary, h0, h1, humidity, result, t0, temperature, battery;
binary = helper.map(pulses, pulsesToBinaryMapping);
t0 = helper.binaryToNumber(binary, 16, 27);
temperature = Math.round((t0 * 10 - 12200) / 18) / 10;
h0 = helper.binaryToNumber(binary, 28, 31);
h1 = helper.binaryToNumber(binary, 32, 35);
humidity = h0 * 10 + h1;
battery = 3 - (helper.binaryToNumber(binary, 12, 15)/10);
return result = {
id: helper.binaryToNumber(binary, 0, 7),
channel: helper.binaryToNumber(binary, 36, 39),
temperature: temperature,
humidity: humidity,
battery: battery
};
}
};
};
Great work. I will add it tomorrow.
Good work again, I added it as "weather4" and released a new version of rfcontroljs. If you want to use it with pimatic you need to update to pimatic-homeduino v0.8.21.
Thanks for your work. I have seen, that the bit mapping was wrong. I used the not sortet buckets but rfcontroljs used the sorted buckets.
I have a WeatherStation with a protocol that i cant understand.
RAW: 988, 1032, 984, 1032, 980, 1036, 980, 1032, 556, 7920, 532, 4124, 544, 4096, 548, 4092, 548, 1988, 544, 1808, 548, 4092, 548, 1896, 544, 1988, 548, 4000, 548, 4096, 544, 4096, 548, 1988, 544, 1804, 548, 4092, 548, 4096, 548, 1984, 548, 1804, 548, 4092, 548, 4096, 544, 1988, 544, 1808, 548, 4092, 548, 1892, 548, 1988, 548, 4000, 548, 4096, 544, 4096, 548, 4184, 548, 4004, 544, 1896, 548, 1896, 544, 1988, 548, 1804, 548, 4092, 548, 4096, 544, 4188, 548, 1800, 548, 1896, 548, 1896, 544, 4116, 592, 16056
18,8°C 70% b: 1009 548 7920 4096 1895 16052 0 0 t: 00000000121313131413131314141413141413141414131314141414131314141414131313141414141414141315
-0,7°C 49% b: 990 524 7828 4125 1915 16076 0 0 t: 00000000121313131413131314141414141413131414131414131413131413131414131413141413131414141315
-19,4°C 53% b: 980 533 7936 4119 1899 16056 0 0 t: 00000000121313131413131314131414131413131414141313141313141413131414131413141413131414141315
-17,5°C 57% b: 979 534 7940 4116 1901 16060 0 0 t: 00000000121313131413131314141314141413141314141313131414141314141314131413141313131414141315
-13,4°C 65% b: 991 531 7856 4121 1903 16060 0 0 t: 00000000121313131413131314141314141413141314141313131314131414131414131314141314131414141315
-10.2°C 72% b: 990 526 7856 4124 1912 16080 0 0 t: 00000000121313131413131314141413141413141314131414141414141314131314131313141413141414141315
-7,0°C 77% b: 990 526 7828 4130 1903 16076 0 0 t: 00000000121313131413131314131314131413141314131414141314141413141314131313141313131414141315
18,8°C 71% b: 990 526 7828 4130 1903 16076 0 0 t: 00000000121313131413131314141314131413141314131314141414131314141414131313141414131414141315
I think only the first and the last Data are right. Its look that the station make a interpolation or so.