|
8 | 8 | required: true |
9 | 9 | }, |
10 | 10 | request: { |
11 | | - value: 'all_messwerte' |
| 11 | + value: 'all_zaehlpunkte_values' |
12 | 12 | }, |
13 | 13 | period: { |
14 | 14 | value: 'current_month' |
15 | 15 | }, |
16 | | - wertetyp: { |
| 16 | + granularity: { |
17 | 17 | value: 'METER_READ' |
18 | 18 | }, |
19 | 19 | kundenNr: { |
|
33 | 33 | types: [{ |
34 | 34 | value: 'request', |
35 | 35 | options: [ |
36 | | - { value: 'all_messwerte', label: 'Get Messwerte for all Zählpunkte' }, |
37 | | - { value: 'zaehlpunkt_messwerte', label: 'Get Messwerte for specific Zählpunkt' }, |
38 | | - { value: 'all_zaehlpunkte', label: 'Get all Zählpunkte metadata' } |
| 36 | + { value: 'all_zaehlpunkte_values', label: 'Get values for all Zählpunkte' }, |
| 37 | + { value: 'single_zaehlpunkt_values', label: 'Get values for specific Zählpunkt' }, |
| 38 | + { value: 'all_metadata', label: 'Get metadata for all Zählpunkte' } |
39 | 39 | ] |
40 | 40 | }] |
41 | 41 | }) |
42 | 42 |
|
43 | 43 | $('#node-input-request').change(function() { |
44 | 44 | switch ($('#node-input-request').val()) { |
45 | | - case 'all_messwerte': |
| 45 | + case 'all_zaehlpunkte_values': |
46 | 46 | $('#row-period').show() |
47 | | - $('#row-wertetyp').show() |
| 47 | + $('#row-granularity').show() |
48 | 48 | $('#row-kundenNr').hide() |
49 | 49 | $('#row-zaehlpunktNr').hide() |
50 | 50 | break |
51 | | - case 'zaehlpunkt_messwerte': |
| 51 | + case 'single_zaehlpunkt_values': |
52 | 52 | $('#row-period').show() |
53 | | - $('#row-wertetyp').show() |
| 53 | + $('#row-granularity').show() |
54 | 54 | $('#row-kundenNr').show() |
55 | 55 | $('#row-zaehlpunktNr').show() |
56 | 56 | break |
57 | | - case 'all_zaehlpunkte': |
| 57 | + case 'all_metadata': |
58 | 58 | $('#row-period').hide() |
59 | | - $('#row-wertetyp').hide() |
| 59 | + $('#row-granularity').hide() |
60 | 60 | $('#row-kundenNr').hide() |
61 | 61 | $('#row-zaehlpunktNr').hide() |
62 | 62 | break |
|
76 | 76 | }] |
77 | 77 | }) |
78 | 78 |
|
79 | | - |
80 | | - $('#node-input-wertetyp').typedInput({ |
| 79 | + $('#node-input-granularity').typedInput({ |
81 | 80 | types: [{ |
82 | | - value: 'wertetyp', |
| 81 | + value: 'granularity', |
83 | 82 | options: [ |
| 83 | + { value: 'METER_READ', label: 'Meter values' }, |
84 | 84 | { value: 'DAY', label: 'Daily values' }, |
85 | | - { value: 'QUARTER_HOUR', label: 'Quarter-hourly values' }, |
86 | | - { value: 'METER_READ', label: 'Meter read' } |
| 85 | + { value: 'QUARTER_HOUR', label: 'Quarter-hourly values' } |
87 | 86 | ] |
88 | 87 | }] |
89 | 88 | }) |
90 | | - |
91 | | - |
92 | 89 | }, |
93 | 90 | inputs: 1, |
94 | 91 | outputs: 1, |
|
112 | 109 | <label for="node-input-period"><i class="fa fa-calendar"></i> Period</label> |
113 | 110 | <input type="text" id="node-input-period"> |
114 | 111 | </div> |
115 | | - <div class="form-row" id="row-wertetyp"> |
116 | | - <label for="node-input-wertetyp"><i class="fa fa-calendar"></i> Wertetyp</label> |
117 | | - <input type="text" id="node-input-wertetyp"> |
| 112 | + <div class="form-row" id="row-granularity"> |
| 113 | + <label for="node-input-granularity"><i class="fa fa-bar-chart-o"></i> Granularity</label> |
| 114 | + <input type="text" id="node-input-granularity"> |
118 | 115 | </div> |
119 | 116 | <div class="form-row" id="row-kundenNr"> |
120 | 117 | <label for="node-input-kundenNr"><i class="fa fa-id-card-o"></i> Kundennr.</label> |
|
125 | 122 | <input type="text" id="node-input-zaehlpunktNr"> |
126 | 123 | </div> |
127 | 124 | <div class="form-row"> |
128 | | - <label for="node-input-name"><i class="fa fa-tag"></i> Name</label> |
129 | | - <input type="text" id="node-input-name" placeholder="Name"> |
| 125 | + <label for="node-input-name"><i class="fa fa-tag"></i> Name</label> |
| 126 | + <input type="text" id="node-input-name" placeholder="Name"> |
130 | 127 | </div> |
131 | 128 | </script> |
132 | 129 |
|
|
148 | 145 |
|
149 | 146 | Messwerte of a specific Zählpunkt can only be retrieved, if Kundennr. is provided. Each Zählpunkt is assigned to one Kundennr. It's not needed if you retrieve Messwerte of all Zählpunkte. This gathers data of all Zählpunkte, which are related to the user account, even if they are assigned to different Kundennr. |
150 | 147 |
|
151 | | -If you retrieve just Zählpunkte metdata, non smart meters are included as well. |
| 148 | +Request type and granularity can only be set via node config, not via msg properties (inputs). If you retrieve just Zählpunkte metadata, non-smart meters are included as well. |
152 | 149 |
|
153 | 150 | API error responses are not particularly meaningful. That means, if you are using a wrong Kundennr. or wrong combination of Kundennr. and Zählpunkt, it is not unlikely, that you will receive a HTTP response with status code 500 (instead of 404) and no further description. If you are trying to access Zählpunkte, which do not belong to your account, it is possible that you will receive HTTP status 404 instead of 403 and so on (at least this could be argued with security considerations). |
154 | 151 |
|
|
0 commit comments