User Tools

Site Tools


ninjablocks_weater_v6_0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ninjablocks_weater_v6_0 [2015/11/27 22:09] (current)
Line 1: Line 1:
 +**Ninja Blocks Weather Sensor**
 +
 +^Feature^Support^
 +|Sending|{{http://​wiki.pilight.org/​lib/​images/​notsupported.gif}}|
 +|Receiving|{{http://​wiki.pilight.org/​lib/​images/​supported.gif}}|
 +|Config|{{http://​wiki.pilight.org/​lib/​images/​supported.gif}}|
 +
 +===== Supported Brands =====
 +^Brand^Protocol^
 +|Ninja Blocks|ninjablocks_weather|
 +
 +===== Sender Arguments =====
 +
 +// None //
 +
 +===== Config =====
 +<​code>​
 +"​devices":​ {
 + "​ninjablocks":​ {
 + "​protocol":​ [ "​ninjablocks"​ ],
 + "​id":​ [{
 + "​id":​ 1,
 + "​unit":​ 1
 + }],
 + "​humidity":​ 57.00,
 + "​temperature":​ 27.69,
 + }
 +},
 +"​gui":​ {
 + "​ninjablocks":​ {
 + "​name":​ "​Temperature Sensor",​
 + "​group":​ [ "​Misc"​ ],
 + "​media":​ [ "​all"​ ]
 + }
 +}
 +</​code>​
 +
 +===== Optional Settings =====
 +
 +Device Settings
 +
 +^Setting^Default^Format^Description^
 +|show-humidity|1|1 or 0|Don'​t display the humidity value|
 +|show-temperature|1|1 or 0|Don'​t display the temperature value|
 +
 +GUI Settings
 +
 +^Setting^Default^Format^Description^
 +|readonly|0|0 or 1|Enable, Disable controlling this device from the GUIs|
 +
 +===== Protocol =====
 +
 +The ninjablocks protocol sends between 41 and 70 pulses like this
 +<​code>​
 +1083 860 966 986 1970 1953 2083 1829 1927 1014 938 1978 1943 993 946 1003 953 1983 2056 877 934 1020 931 1070 884 2013 1893 1012 930 2008 923 1019 1995 1930 925 1026 978 985 1891 1052 907 1036 913 2031 901 1034 916 1067 1881 1988 971 1004 890 1060 754 72330</​code>​
 +
 +The pulse stream uses the "​Bi-Phase Mark Code" (BMC) or Frequencey/​Double Frequency (F2F) principle as defined in ISO/​IEC7811.
 +
 +The first 6 pulses are the ''​ SYNC header''​ and the last pulse is the ''​footer''​. These are meant to identify the pulses as genuine. We check for their presence, an error in the first pulse of the header is tolerated, if the second sync pulse after the Unit code and the parity bit is correct, the length of the footer pulse is used to identify the protocol and as end of data transmission. ​
 +
 +The first step is to transform this pulse stream into 36 logical bits
 +We can group the sequence of bits into the following groups A to H:
 +
 +<​code>​
 +AAAA BBBB CC DDD EEEEEEE FFFFFFFFFFFFFFF G H
 +1100 0001 00 110 0111001 010011011011001 1 F
 +</​code>​
 +
 +Each of the groups of bits (A to H) has a specific meaning:
 +
 +^Group^Bit #^config name^Range^Description^
 +|A|0-3||12|SYNC Header|
 +|B|4-7|"​unit":​|0 to 15|UnitCode|
 +|C|8-9|"​id:"​|0 to 3|Channel Code|
 +|D|10-12||110|Sync Data|
 +|E|13-19|"​humidity:"​|0 to 100 | Humidity in %|
 +|F|20-34|"​temperature:"​|0 to 32767|Temperature -50°C to 205,99°C|
 +|G|35| |0,1|Even Parity Bit|
 +|H|36| ||Footer or gap pulse followed by Footer|
 +
 +So this code represents:
 +<​code>​
 +{
 +        "​code":​ {
 +                "​id":​ 0,
 +                "​unit":​ 1,
 +                "​temperature":​ 2769,
 +                "​humidity":​ 5700
 +        },
 +        "​origin":​ "​receiver",​
 +        "​protocol":​ "​ninjablocks",​
 +        "​uuid":​ "​0000-00-00-b4-46a46b",​
 +        "​repeats":​ 1
 +}
 +</​code>​
  
ninjablocks_weater_v6_0.txt · Last modified: 2015/11/27 22:09 (external edit)