node-red-contrib-huemagic 5.0.0 → 5.1.0

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.
Files changed (85) hide show
  1. package/CHANGELOG.md +25 -1
  2. package/README.md +68 -3
  3. package/examples/Deutsch/Hue Bridge.json +98 -0
  4. package/examples/English/Hue Bridge.json +98 -0
  5. package/examples/Espa/303/261ol/Hue Bridge.json" +98 -0
  6. package/examples/Fran/303/247ais/Hue Bridge.json" +98 -0
  7. package/examples/Italiano/Hue Bridge.json +98 -0
  8. package/examples/Nederlands/Hue Bridge.json +98 -0
  9. package/examples/Polski/Hue Bridge.json +98 -0
  10. package/examples/Portugu/303/252s/Hue Bridge.json" +98 -0
  11. package/examples/T/303/274rk/303/247e/Hue Bridge.json" +98 -0
  12. package/examples//316/225/316/273/316/273/316/267/316/275/316/271/316/272/316/254/Hue Bridge.json" +98 -0
  13. package/huemagic/hue-bridge-config.js +19 -5
  14. package/huemagic/hue-bridge.js +106 -0
  15. package/huemagic/hue-buttons.html +212 -3
  16. package/huemagic/hue-buttons.js +94 -2
  17. package/huemagic/hue-group.js +2 -3
  18. package/huemagic/hue-light.js +2 -3
  19. package/huemagic/locales/de/hue-bridge.html +19 -0
  20. package/huemagic/locales/de/hue-bridge.json +7 -1
  21. package/huemagic/locales/de/hue-buttons.html +2 -0
  22. package/huemagic/locales/de/hue-buttons.json +21 -1
  23. package/huemagic/locales/de/hue-group.html +1 -1
  24. package/huemagic/locales/de/hue-light.html +1 -1
  25. package/huemagic/locales/el/hue-bridge.html +19 -0
  26. package/huemagic/locales/el/hue-bridge.json +7 -1
  27. package/huemagic/locales/el/hue-buttons.html +2 -0
  28. package/huemagic/locales/el/hue-buttons.json +21 -1
  29. package/huemagic/locales/el/hue-group.html +1 -1
  30. package/huemagic/locales/el/hue-light.html +1 -1
  31. package/huemagic/locales/en/hue-bridge.html +19 -0
  32. package/huemagic/locales/en/hue-bridge.json +7 -1
  33. package/huemagic/locales/en/hue-buttons.html +2 -0
  34. package/huemagic/locales/en/hue-buttons.json +21 -1
  35. package/huemagic/locales/en/hue-group.html +1 -1
  36. package/huemagic/locales/en/hue-light.html +1 -1
  37. package/huemagic/locales/es/hue-bridge.html +19 -0
  38. package/huemagic/locales/es/hue-bridge.json +7 -1
  39. package/huemagic/locales/es/hue-buttons.html +2 -0
  40. package/huemagic/locales/es/hue-buttons.json +21 -1
  41. package/huemagic/locales/es/hue-group.html +1 -1
  42. package/huemagic/locales/es/hue-light.html +1 -1
  43. package/huemagic/locales/fr/hue-bridge.html +19 -0
  44. package/huemagic/locales/fr/hue-bridge.json +7 -1
  45. package/huemagic/locales/fr/hue-buttons.html +2 -0
  46. package/huemagic/locales/fr/hue-buttons.json +21 -1
  47. package/huemagic/locales/fr/hue-group.html +1 -1
  48. package/huemagic/locales/fr/hue-light.html +1 -1
  49. package/huemagic/locales/it/hue-bridge.html +19 -0
  50. package/huemagic/locales/it/hue-bridge.json +7 -1
  51. package/huemagic/locales/it/hue-buttons.html +2 -0
  52. package/huemagic/locales/it/hue-buttons.json +21 -1
  53. package/huemagic/locales/it/hue-group.html +1 -1
  54. package/huemagic/locales/it/hue-light.html +1 -1
  55. package/huemagic/locales/nl/hue-bridge.html +19 -0
  56. package/huemagic/locales/nl/hue-bridge.json +7 -1
  57. package/huemagic/locales/nl/hue-buttons.html +2 -0
  58. package/huemagic/locales/nl/hue-buttons.json +21 -1
  59. package/huemagic/locales/nl/hue-group.html +1 -1
  60. package/huemagic/locales/nl/hue-light.html +1 -1
  61. package/huemagic/locales/pl/hue-bridge.html +19 -0
  62. package/huemagic/locales/pl/hue-bridge.json +7 -1
  63. package/huemagic/locales/pl/hue-buttons.html +2 -0
  64. package/huemagic/locales/pl/hue-buttons.json +21 -1
  65. package/huemagic/locales/pl/hue-group.html +1 -1
  66. package/huemagic/locales/pl/hue-light.html +1 -1
  67. package/huemagic/locales/pt/hue-bridge.html +19 -0
  68. package/huemagic/locales/pt/hue-bridge.json +7 -1
  69. package/huemagic/locales/pt/hue-buttons.html +2 -0
  70. package/huemagic/locales/pt/hue-buttons.json +21 -1
  71. package/huemagic/locales/pt/hue-group.html +1 -1
  72. package/huemagic/locales/pt/hue-light.html +1 -1
  73. package/huemagic/locales/tr/hue-bridge.html +19 -0
  74. package/huemagic/locales/tr/hue-bridge.json +7 -1
  75. package/huemagic/locales/tr/hue-buttons.html +2 -0
  76. package/huemagic/locales/tr/hue-buttons.json +21 -1
  77. package/huemagic/locales/tr/hue-group.html +1 -1
  78. package/huemagic/locales/tr/hue-light.html +1 -1
  79. package/huemagic/utils/api.js +5 -5
  80. package/huemagic/utils/color.js +2 -2
  81. package/huemagic/utils/http.js +278 -0
  82. package/huemagic/utils/image.js +180 -0
  83. package/huemagic/utils/messages.js +161 -1
  84. package/huemagic/utils/syncbox.js +3 -3
  85. package/package.json +6 -5
@@ -252,5 +252,103 @@
252
252
  ]
253
253
  ],
254
254
  "icon": "node-red/alert.svg"
255
+ },
256
+ {
257
+ "id": "c1a7f4b2d3e08a11",
258
+ "type": "comment",
259
+ "z": "bf04a073.be4428",
260
+ "name": "Naar nieuwe apparaten zoeken",
261
+ "info": "",
262
+ "x": 140,
263
+ "y": 600,
264
+ "wires": []
265
+ },
266
+ {
267
+ "id": "b2c8e5a1f4d09b22",
268
+ "type": "inject",
269
+ "z": "bf04a073.be4428",
270
+ "name": "Apparaten zoeken starten",
271
+ "props": [
272
+ {
273
+ "p": "payload"
274
+ }
275
+ ],
276
+ "repeat": "",
277
+ "crontab": "",
278
+ "once": false,
279
+ "onceDelay": 0.1,
280
+ "topic": "",
281
+ "payload": "{\"searchDevices\":true}",
282
+ "payloadType": "json",
283
+ "x": 150,
284
+ "y": 640,
285
+ "wires": [
286
+ [
287
+ "ea4668e7.fac4f"
288
+ ]
289
+ ],
290
+ "icon": "node-red-contrib-huemagic/hue-bridge.svg"
291
+ },
292
+ {
293
+ "id": "d3e9f6b2a5c10c33",
294
+ "type": "comment",
295
+ "z": "bf04a073.be4428",
296
+ "name": "Entertainmentzones",
297
+ "info": "",
298
+ "x": 130,
299
+ "y": 700,
300
+ "wires": []
301
+ },
302
+ {
303
+ "id": "e4f0a7c3b6d21d44",
304
+ "type": "inject",
305
+ "z": "bf04a073.be4428",
306
+ "name": "Entertainmentzone starten",
307
+ "props": [
308
+ {
309
+ "p": "payload"
310
+ }
311
+ ],
312
+ "repeat": "",
313
+ "crontab": "",
314
+ "once": false,
315
+ "onceDelay": 0.1,
316
+ "topic": "",
317
+ "payload": "{\"entertainment\":{\"action\":\"start\"}}",
318
+ "payloadType": "json",
319
+ "x": 160,
320
+ "y": 740,
321
+ "wires": [
322
+ [
323
+ "ea4668e7.fac4f"
324
+ ]
325
+ ],
326
+ "icon": "node-red-contrib-huemagic/hue-group.svg"
327
+ },
328
+ {
329
+ "id": "f5a1b8d4c7e32e55",
330
+ "type": "inject",
331
+ "z": "bf04a073.be4428",
332
+ "name": "Entertainmentzone stoppen",
333
+ "props": [
334
+ {
335
+ "p": "payload"
336
+ }
337
+ ],
338
+ "repeat": "",
339
+ "crontab": "",
340
+ "once": false,
341
+ "onceDelay": 0.1,
342
+ "topic": "",
343
+ "payload": "{\"entertainment\":{\"action\":\"stop\"}}",
344
+ "payloadType": "json",
345
+ "x": 160,
346
+ "y": 780,
347
+ "wires": [
348
+ [
349
+ "ea4668e7.fac4f"
350
+ ]
351
+ ],
352
+ "icon": "node-red-contrib-huemagic/hue-group.svg"
255
353
  }
256
354
  ]
@@ -252,5 +252,103 @@
252
252
  ]
253
253
  ],
254
254
  "icon": "node-red/alert.svg"
255
+ },
256
+ {
257
+ "id": "c1a7f4b2d3e08a11",
258
+ "type": "comment",
259
+ "z": "bf04a073.be4428",
260
+ "name": "Wyszukiwanie nowych urządzeń",
261
+ "info": "",
262
+ "x": 140,
263
+ "y": 600,
264
+ "wires": []
265
+ },
266
+ {
267
+ "id": "b2c8e5a1f4d09b22",
268
+ "type": "inject",
269
+ "z": "bf04a073.be4428",
270
+ "name": "Uruchom wyszukiwanie urządzeń",
271
+ "props": [
272
+ {
273
+ "p": "payload"
274
+ }
275
+ ],
276
+ "repeat": "",
277
+ "crontab": "",
278
+ "once": false,
279
+ "onceDelay": 0.1,
280
+ "topic": "",
281
+ "payload": "{\"searchDevices\":true}",
282
+ "payloadType": "json",
283
+ "x": 150,
284
+ "y": 640,
285
+ "wires": [
286
+ [
287
+ "ea4668e7.fac4f"
288
+ ]
289
+ ],
290
+ "icon": "node-red-contrib-huemagic/hue-bridge.svg"
291
+ },
292
+ {
293
+ "id": "d3e9f6b2a5c10c33",
294
+ "type": "comment",
295
+ "z": "bf04a073.be4428",
296
+ "name": "Strefy rozrywki",
297
+ "info": "",
298
+ "x": 130,
299
+ "y": 700,
300
+ "wires": []
301
+ },
302
+ {
303
+ "id": "e4f0a7c3b6d21d44",
304
+ "type": "inject",
305
+ "z": "bf04a073.be4428",
306
+ "name": "Uruchom strefę rozrywki",
307
+ "props": [
308
+ {
309
+ "p": "payload"
310
+ }
311
+ ],
312
+ "repeat": "",
313
+ "crontab": "",
314
+ "once": false,
315
+ "onceDelay": 0.1,
316
+ "topic": "",
317
+ "payload": "{\"entertainment\":{\"action\":\"start\"}}",
318
+ "payloadType": "json",
319
+ "x": 160,
320
+ "y": 740,
321
+ "wires": [
322
+ [
323
+ "ea4668e7.fac4f"
324
+ ]
325
+ ],
326
+ "icon": "node-red-contrib-huemagic/hue-group.svg"
327
+ },
328
+ {
329
+ "id": "f5a1b8d4c7e32e55",
330
+ "type": "inject",
331
+ "z": "bf04a073.be4428",
332
+ "name": "Zatrzymaj strefę rozrywki",
333
+ "props": [
334
+ {
335
+ "p": "payload"
336
+ }
337
+ ],
338
+ "repeat": "",
339
+ "crontab": "",
340
+ "once": false,
341
+ "onceDelay": 0.1,
342
+ "topic": "",
343
+ "payload": "{\"entertainment\":{\"action\":\"stop\"}}",
344
+ "payloadType": "json",
345
+ "x": 160,
346
+ "y": 780,
347
+ "wires": [
348
+ [
349
+ "ea4668e7.fac4f"
350
+ ]
351
+ ],
352
+ "icon": "node-red-contrib-huemagic/hue-group.svg"
255
353
  }
256
354
  ]
@@ -252,5 +252,103 @@
252
252
  ]
253
253
  ],
254
254
  "icon": "node-red/alert.svg"
255
+ },
256
+ {
257
+ "id": "c1a7f4b2d3e08a11",
258
+ "type": "comment",
259
+ "z": "bf04a073.be4428",
260
+ "name": "Procurar novos dispositivos",
261
+ "info": "",
262
+ "x": 140,
263
+ "y": 600,
264
+ "wires": []
265
+ },
266
+ {
267
+ "id": "b2c8e5a1f4d09b22",
268
+ "type": "inject",
269
+ "z": "bf04a073.be4428",
270
+ "name": "Iniciar a procura de dispositivos",
271
+ "props": [
272
+ {
273
+ "p": "payload"
274
+ }
275
+ ],
276
+ "repeat": "",
277
+ "crontab": "",
278
+ "once": false,
279
+ "onceDelay": 0.1,
280
+ "topic": "",
281
+ "payload": "{\"searchDevices\":true}",
282
+ "payloadType": "json",
283
+ "x": 150,
284
+ "y": 640,
285
+ "wires": [
286
+ [
287
+ "ea4668e7.fac4f"
288
+ ]
289
+ ],
290
+ "icon": "node-red-contrib-huemagic/hue-bridge.svg"
291
+ },
292
+ {
293
+ "id": "d3e9f6b2a5c10c33",
294
+ "type": "comment",
295
+ "z": "bf04a073.be4428",
296
+ "name": "Zonas de entretenimento",
297
+ "info": "",
298
+ "x": 130,
299
+ "y": 700,
300
+ "wires": []
301
+ },
302
+ {
303
+ "id": "e4f0a7c3b6d21d44",
304
+ "type": "inject",
305
+ "z": "bf04a073.be4428",
306
+ "name": "Iniciar a zona de entretenimento",
307
+ "props": [
308
+ {
309
+ "p": "payload"
310
+ }
311
+ ],
312
+ "repeat": "",
313
+ "crontab": "",
314
+ "once": false,
315
+ "onceDelay": 0.1,
316
+ "topic": "",
317
+ "payload": "{\"entertainment\":{\"action\":\"start\"}}",
318
+ "payloadType": "json",
319
+ "x": 160,
320
+ "y": 740,
321
+ "wires": [
322
+ [
323
+ "ea4668e7.fac4f"
324
+ ]
325
+ ],
326
+ "icon": "node-red-contrib-huemagic/hue-group.svg"
327
+ },
328
+ {
329
+ "id": "f5a1b8d4c7e32e55",
330
+ "type": "inject",
331
+ "z": "bf04a073.be4428",
332
+ "name": "Parar a zona de entretenimento",
333
+ "props": [
334
+ {
335
+ "p": "payload"
336
+ }
337
+ ],
338
+ "repeat": "",
339
+ "crontab": "",
340
+ "once": false,
341
+ "onceDelay": 0.1,
342
+ "topic": "",
343
+ "payload": "{\"entertainment\":{\"action\":\"stop\"}}",
344
+ "payloadType": "json",
345
+ "x": 160,
346
+ "y": 780,
347
+ "wires": [
348
+ [
349
+ "ea4668e7.fac4f"
350
+ ]
351
+ ],
352
+ "icon": "node-red-contrib-huemagic/hue-group.svg"
255
353
  }
256
354
  ]
@@ -252,5 +252,103 @@
252
252
  ]
253
253
  ],
254
254
  "icon": "node-red/alert.svg"
255
+ },
256
+ {
257
+ "id": "c1a7f4b2d3e08a11",
258
+ "type": "comment",
259
+ "z": "bf04a073.be4428",
260
+ "name": "Yeni cihaz arama",
261
+ "info": "",
262
+ "x": 140,
263
+ "y": 600,
264
+ "wires": []
265
+ },
266
+ {
267
+ "id": "b2c8e5a1f4d09b22",
268
+ "type": "inject",
269
+ "z": "bf04a073.be4428",
270
+ "name": "Cihaz aramasını başlat",
271
+ "props": [
272
+ {
273
+ "p": "payload"
274
+ }
275
+ ],
276
+ "repeat": "",
277
+ "crontab": "",
278
+ "once": false,
279
+ "onceDelay": 0.1,
280
+ "topic": "",
281
+ "payload": "{\"searchDevices\":true}",
282
+ "payloadType": "json",
283
+ "x": 150,
284
+ "y": 640,
285
+ "wires": [
286
+ [
287
+ "ea4668e7.fac4f"
288
+ ]
289
+ ],
290
+ "icon": "node-red-contrib-huemagic/hue-bridge.svg"
291
+ },
292
+ {
293
+ "id": "d3e9f6b2a5c10c33",
294
+ "type": "comment",
295
+ "z": "bf04a073.be4428",
296
+ "name": "Eğlence alanları",
297
+ "info": "",
298
+ "x": 130,
299
+ "y": 700,
300
+ "wires": []
301
+ },
302
+ {
303
+ "id": "e4f0a7c3b6d21d44",
304
+ "type": "inject",
305
+ "z": "bf04a073.be4428",
306
+ "name": "Eğlence alanını başlat",
307
+ "props": [
308
+ {
309
+ "p": "payload"
310
+ }
311
+ ],
312
+ "repeat": "",
313
+ "crontab": "",
314
+ "once": false,
315
+ "onceDelay": 0.1,
316
+ "topic": "",
317
+ "payload": "{\"entertainment\":{\"action\":\"start\"}}",
318
+ "payloadType": "json",
319
+ "x": 160,
320
+ "y": 740,
321
+ "wires": [
322
+ [
323
+ "ea4668e7.fac4f"
324
+ ]
325
+ ],
326
+ "icon": "node-red-contrib-huemagic/hue-group.svg"
327
+ },
328
+ {
329
+ "id": "f5a1b8d4c7e32e55",
330
+ "type": "inject",
331
+ "z": "bf04a073.be4428",
332
+ "name": "Eğlence alanını durdur",
333
+ "props": [
334
+ {
335
+ "p": "payload"
336
+ }
337
+ ],
338
+ "repeat": "",
339
+ "crontab": "",
340
+ "once": false,
341
+ "onceDelay": 0.1,
342
+ "topic": "",
343
+ "payload": "{\"entertainment\":{\"action\":\"stop\"}}",
344
+ "payloadType": "json",
345
+ "x": 160,
346
+ "y": 780,
347
+ "wires": [
348
+ [
349
+ "ea4668e7.fac4f"
350
+ ]
351
+ ],
352
+ "icon": "node-red-contrib-huemagic/hue-group.svg"
255
353
  }
256
354
  ]
@@ -252,5 +252,103 @@
252
252
  ]
253
253
  ],
254
254
  "icon": "node-red/alert.svg"
255
+ },
256
+ {
257
+ "id": "c1a7f4b2d3e08a11",
258
+ "type": "comment",
259
+ "z": "bf04a073.be4428",
260
+ "name": "Αναζήτηση νέων συσκευών",
261
+ "info": "",
262
+ "x": 140,
263
+ "y": 600,
264
+ "wires": []
265
+ },
266
+ {
267
+ "id": "b2c8e5a1f4d09b22",
268
+ "type": "inject",
269
+ "z": "bf04a073.be4428",
270
+ "name": "Έναρξη αναζήτησης συσκευών",
271
+ "props": [
272
+ {
273
+ "p": "payload"
274
+ }
275
+ ],
276
+ "repeat": "",
277
+ "crontab": "",
278
+ "once": false,
279
+ "onceDelay": 0.1,
280
+ "topic": "",
281
+ "payload": "{\"searchDevices\":true}",
282
+ "payloadType": "json",
283
+ "x": 150,
284
+ "y": 640,
285
+ "wires": [
286
+ [
287
+ "ea4668e7.fac4f"
288
+ ]
289
+ ],
290
+ "icon": "node-red-contrib-huemagic/hue-bridge.svg"
291
+ },
292
+ {
293
+ "id": "d3e9f6b2a5c10c33",
294
+ "type": "comment",
295
+ "z": "bf04a073.be4428",
296
+ "name": "Ζώνες entertainment",
297
+ "info": "",
298
+ "x": 130,
299
+ "y": 700,
300
+ "wires": []
301
+ },
302
+ {
303
+ "id": "e4f0a7c3b6d21d44",
304
+ "type": "inject",
305
+ "z": "bf04a073.be4428",
306
+ "name": "Έναρξη ζώνης entertainment",
307
+ "props": [
308
+ {
309
+ "p": "payload"
310
+ }
311
+ ],
312
+ "repeat": "",
313
+ "crontab": "",
314
+ "once": false,
315
+ "onceDelay": 0.1,
316
+ "topic": "",
317
+ "payload": "{\"entertainment\":{\"action\":\"start\"}}",
318
+ "payloadType": "json",
319
+ "x": 160,
320
+ "y": 740,
321
+ "wires": [
322
+ [
323
+ "ea4668e7.fac4f"
324
+ ]
325
+ ],
326
+ "icon": "node-red-contrib-huemagic/hue-group.svg"
327
+ },
328
+ {
329
+ "id": "f5a1b8d4c7e32e55",
330
+ "type": "inject",
331
+ "z": "bf04a073.be4428",
332
+ "name": "Διακοπή ζώνης entertainment",
333
+ "props": [
334
+ {
335
+ "p": "payload"
336
+ }
337
+ ],
338
+ "repeat": "",
339
+ "crontab": "",
340
+ "once": false,
341
+ "onceDelay": 0.1,
342
+ "topic": "",
343
+ "payload": "{\"entertainment\":{\"action\":\"stop\"}}",
344
+ "payloadType": "json",
345
+ "x": 160,
346
+ "y": 780,
347
+ "wires": [
348
+ [
349
+ "ea4668e7.fac4f"
350
+ ]
351
+ ],
352
+ "icon": "node-red-contrib-huemagic/hue-group.svg"
255
353
  }
256
354
  ]
@@ -7,7 +7,7 @@ module.exports = function(RED)
7
7
  const events = require('events');
8
8
  const dayjs = require('dayjs');
9
9
  const diff = require("deep-object-diff").diff;
10
- const axios = require('axios');
10
+ const httpUtils = require('./utils/http');
11
11
  const https = require('https');
12
12
  const fastq = require('fastq');
13
13
 
@@ -408,7 +408,8 @@ module.exports = function(RED)
408
408
  if(type == "bridge")
409
409
  {
410
410
  try {
411
- const message = new HueBridgeMessage(targetResource, options);
411
+ // THE BRIDGE ALSO REPORTS THE RESOURCES THAT HAVE NO NODE OF THEIR OWN
412
+ const message = new HueBridgeMessage(targetResource, { resources: scope.resources, ...options });
412
413
 
413
414
  // GET CURRENT STATE MESSAGE
414
415
  let currentState = message.msg;
@@ -619,6 +620,18 @@ module.exports = function(RED)
619
620
  }
620
621
  }
621
622
 
623
+ // FIND THE DEVICE THAT OFFERS A CERTAIN SERVICE (FROM NODES)
624
+ this.deviceWithService = function(type)
625
+ {
626
+ for (const [id, resource] of Object.entries(scope.resources))
627
+ {
628
+ if(id === "_groupsOf") { continue; }
629
+ if(resource["services"] && resource["services"][type]) { return id; }
630
+ }
631
+
632
+ return false;
633
+ }
634
+
622
635
  // PATCH RESOURCE (FROM NODES)
623
636
  this.patch = function(type, id, patch, version = 2)
624
637
  {
@@ -852,7 +865,8 @@ module.exports = function(RED)
852
865
  // DISCOVER HUE BRIDGES ON LOCAL NETWORK
853
866
  RED.httpAdmin.get('/hue/bridges', RED.auth.needsPermission('hue-bridge.read'), async function(req, res, next)
854
867
  {
855
- axios({
868
+ // THE ONLY REQUEST THAT LEAVES THE LOCAL NETWORK, SO THIS ONE MAY GO THROUGH A PROXY
869
+ httpUtils.request({
856
870
  "method": "GET",
857
871
  "url": "https://discovery.meethue.com",
858
872
  "headers": {
@@ -912,10 +926,10 @@ module.exports = function(RED)
912
926
  else
913
927
  {
914
928
  // MODERN BRIDGES (AND THE BRIDGE PRO) NO LONGER ANSWER ON PLAIN HTTP
915
- axios({
929
+ httpUtils.request({
916
930
  "method": "POST",
917
931
  "url": "https://"+req.query.ip+"/api",
918
- "httpsAgent": new https.Agent({ rejectUnauthorized: false }),
932
+ "agent": new https.Agent({ rejectUnauthorized: false }),
919
933
  "proxy": false, // THE BRIDGE IS ON THE LOCAL NETWORK, NEVER GO THROUGH A PROXY
920
934
  "headers": {
921
935
  "Content-Type": "application/json; charset=utf-8"