node-red-contrib-eskomsepush 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -37,10 +37,10 @@ If you don't want to use API quota by searching, and you already know the id of
37
37
 
38
38
  To fetch the area id manually, make an `areas_search` API call using your API license key `token`, a word of search `text`. In the response returned by the API, copy the `id` value of the matching area.
39
39
 
40
- In the example below (on MacOS), `curl` is used to query the API and the search text value is 'ballito' (the license key token is invalid and must be replaced with a valid key). The area id value that will be used from this example is `eskmo-15-ballitokwadukuzakwazulunatal`:
40
+ In the example below (on MacOS), `curl` is used to query the API and the search text value is 'ballito' (the license key token is invalid and must be replaced with a valid key).
41
41
 
42
42
  ```
43
- % curl --location --request GET 'https://developer.sepush.co.za/business/2.0/areas_search?text=ballito' --header 'token: 2DFB82AC-46254F6E-A68B26A4-8DF1303E'
43
+ % curl --location --request GET 'https://developer.sepush.co.za/business/3.0/areas_search?text=ballito' --header 'token: 2DFB82AC-46254F6E-A68B26A4-8DF1303E'
44
44
  {
45
45
  "areas":[
46
46
  {"id":"eskmo-15-ballitokwadukuzakwazulunatal","name":"Ballito (15)","region":"Eskom Municipal, Kwadukuza, Kwazulu-Natal"},
@@ -49,6 +49,8 @@ In the example below (on MacOS), `curl` is used to query the API and the search
49
49
  }
50
50
  ```
51
51
 
52
+ > **Note:** The API returns v2-style IDs with a location suffix. When entering the area id in the node, use only the first two dash-separated parts — e.g. use `eskmo-15`, not `eskmo-15-ballitokwadukuzakwazulunatal`. The node will warn you if it detects an old-style ID.
53
+
52
54
  Then you need to fill out which status to follow. This can be either _National_ (Eskom) or _Cape Town_.
53
55
 
54
56
  If the _test_ checkbox has been selected, test data for the specified area will be fetched instead of the actual schedule. This is useful when debugging.
@@ -114,7 +116,7 @@ a matching _schedule_.
114
116
 
115
117
  ### Documentation
116
118
 
117
- Documentation for the API can be found [here](https://documenter.getpostman.com/view/1296288/UzQuNk3E)
119
+ Documentation for the API can be found [here](https://developer.sepush.co.za/business/3.0/)
118
120
 
119
121
  When quota has been exceeded:
120
122
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-eskomsepush",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Node-RED interface for the Eskomsepush API",
5
5
  "scripts": {
6
6
  "build": "tsc && cp src/nodes/eskomsepush.html dist/nodes/ && cp -r src/nodes/icons dist/nodes/",
@@ -144,7 +144,7 @@
144
144
  </script>
145
145
 
146
146
  <script type="text/html" data-help-name="eskomsepush">
147
- <h3 id=""eskomsepushapi>EskomSePush API</h3>
147
+ <h3 id="eskomsepushapi">EskomSePush API</h3>
148
148
 
149
149
  <p>A node for retrieving info from the EskomSePush API.</p>
150
150
 
@@ -152,23 +152,24 @@
152
152
  in South Africa as easy as possible.</p>
153
153
  <p>First you need to configure the node by entering the license key and entering
154
154
  the correct area.</p>
155
- <p>Once deployed, the node will fetch the data from EskomSePush every hour. As
156
- every fetch from the API takes 2 calls, the 50 free queries per day on a
157
- free account should suffice. Every ten minutes the API status is checked to
158
- see how many queries you have left.</p>
155
+ <p>Once deployed, the node fetches data from EskomSePush at a dynamic interval
156
+ calculated from your remaining daily API allowance never more often than needed.
157
+ Every fetch of status and schedule takes 2 API calls. Every ten minutes the
158
+ allowance is checked to see how many queries you have left.</p>
159
159
  <p>Internally the node checks every minute if a schedule is currently active or not. It
160
160
  will also output a message on the first deployment.</p>
161
161
 
162
162
  <h3 id="configuration">Configuration</h3>
163
163
 
164
164
  <p>First you will need a <em>licence key</em>. You can get one from <a href="https://eskomsepush.gumroad.com/l/api">here</a>, by subsribing to the Free model. Note that this is for personal use only.</p>
165
- <p>Next you need to insert the correct area. Once a valid license is filled out, the API can be used for searching the correct area id. Do note that this will cost some of the daily queries. If you don&#39;t want that and you already know the id of the area, fill out the area id manually.</p>
165
+ <p>Next you need to insert the correct area id. Once a valid license is filled out, the search form below can help find it note that each search costs API quota. If you already know the id, fill it out manually.</p>
166
+ <p>Use the short form of the area id: <code>eskmo-15</code>, not <code>eskmo-15-ballitokwadukuzakwazulunatal</code>. If you have an old-style id with a location suffix, the node will still work but will log a warning asking you to update it.</p>
166
167
  <p>Then you need to fill out which status to follow. This can be either <em>National</em> (eskom) or <em>Capetown</em>.</p>
167
168
  <p>The <i>API allowance buffer</i> allows you to reserve some daily unused API calls (so you can use your API key for other integrations too). If you don't use that, set this to _0_ (zero).</p>
168
169
  <p>If the <em>test</em> checkbox has been selected, test data for the area will be fetched instead of the actual schedule. This is useful when debugging.</p>
169
170
  <p>The <em>verbose</em> checkbox will give some additional <tt>node.warn()</tt> messages, appearing in the debug tab. This is also useful when debugging.</p>
170
171
 
171
- <h3 id=""inputs">Inputs</h3>
172
+ <h3 id="inputs">Inputs</h3>
172
173
 
173
174
  <p>
174
175
  The input side is not needed in most cases. The node will output its status every ten minutes and won't update the information it gets from the API more
@@ -253,7 +254,7 @@ a matching <em>schedule</em>.
253
254
 
254
255
  <h1 id="documentation">Documentation</h1>
255
256
 
256
- <p>The GitHub site for the node can be found <a href="https://github.com/dirkjanfaber/node-red-contrib-eskomsepush">here</a>, while the documentation for the API can be found <a href="https://documenter.getpostman.com/view/1296288/UzQuNk3E">here</a>.
257
+ <p>The GitHub site for the node can be found <a href="https://github.com/dirkjanfaber/node-red-contrib-eskomsepush">here</a>, while the documentation for the API can be found <a href="https://developer.sepush.co.za/business/3.0/">here</a>.
257
258
  For issues and/or suggestions for improving the node, please use the <a href="https://github.com/dirkjanfaber/node-red-contrib-eskomsepush/issues">issue tracker</a>.</p>
258
259
  </script>
259
260