Git Product home page Git Product logo

node-red-contrib-dyson-purelink's People

Contributors

ajago avatar naimo84 avatar pbrunier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

node-red-contrib-dyson-purelink's Issues

Contributing

Hi,

I'm interested in contributing, would you be ok with some PRs to make the code more ES6/functional style?

Nodes not working at all

Hey naimo84 :)

nun wieder einmal etwas von dir entdeckt nach deiner tollen Arbeit für PiHole, hehe.

Habe versucht den Dyson hier reinzukriegen.

Fehlerlog sieht aktuell so aus:

(node:16) UnhandledPromiseRejectionWarning: StatusCodeError: 429 - "{error: \"Endpoint is not available currently\"}",
    at Request.plumbing.callback (/data/node_modules/request-promise-core/lib/plumbing.js:104:33),
(node:16) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 22),
    at new StatusCodeError (/data/node_modules/request-promise-core/lib/errors.js:32:15),
    at Request.self.callback (/data/node_modules/request/request.js:185:22),
    at Request.RP$callback [as _callback] (/data/node_modules/request-promise-core/lib/plumbing.js:46:31),
    at Request.emit (events.js:314:20),
    at Request.<anonymous> (/data/node_modules/request/request.js:1154:10),
    at IncomingMessage.<anonymous> (/data/node_modules/request/request.js:1076:12),
    at Object.onceWrapper (events.js:420:28),
    at IncomingMessage.emit (events.js:326:22)

Übrigens habe ich viel weiter oben im log auch meine Zugangsdaten im Klartext im log gefunden, ist das im Sinne des Erfinders?

401 error returned when logging in in config node

In the config node, I used to be able to enter my e-mail address and password, and an OTP code would be sent to my e-mail - now when I click "authenticate to get otp", I get the following message in the debug panel:

Error: Request failed with status code 401

Please let me know what other information will be useful to track this down. Thanks!

Maintainer wanted

I don't really use this project and I need to prioritize other projects.
Also Dyson changes their API too often for me to work on these changes.
The best way to become a maintainer is to show you can do the job. Submit some good pull requests.
Issue #16 and #19 maybe a good point to start 👍

Add basic functionality to get a users device info

Is your feature request related to a problem? Please describe.
Enable a user to create a simple report of his/hers device in order to better help the user.

Describe the solution you'd like
A simple JSON

[Feature] SleepTimer Support

Hi folks,

I am currently looking for a solution to integrate my Dyson Pure Cool Link Tower into my Node-RED instance. I already have a self-coded version running for a vanilla node server, but a node-red would just make my setup way easier. I have found this repository which looks awesome. The only thing I am missing is the ability to set the sleep timer.

According to the libpurecoollink python library it is set through the mqtt property sltm

So what we could do is adding the following method to device.ts:

  setSleepTimer(minutes) {
    this._setStatus({ sltm: minutes })
    // optionally also querying the set value of course
  }

The only thing I am not sure about is how this is done throughout the other models.

What do you think generally about it?

Unable to login to dyson through this node

Just got my first dyson DP04, created a new dyson user.
Installed config in node red, with email & password, and tried different country codes (DA, DK, EU & US) with no luck, node is unable to discover the fan, even i have provided ip.
I have tried with another solution in Homebridge, here i got “unable to login at dyson”

Any one with similar login issues at dyson?

wonder if its dyson 2factor login for new devices that is the issue ?
888E565D-D346-4DA9-82EF-4EC83B4A8CE6

Flowdirection should be controllable

I realy love the module and it works well for me so far.

Only issue I expericened is that I am not able to controll the Flowdirection of my purifyier.

Via DysonApp the Flowdirection allows me to change between a direkt airstream (ventilation/cooling) and a diffuse one (just cleaning).

I'd realy appreciate if this control is added in the module, or am I missing an opportunity to contoll it already?

Cheers,
Michael

Adapt to "Dyson Purifier Humidify + Cool Formaldehyde Humidifier White / Gold"

Hi there,

I have a new dyson "Dyson Purifier Humidify + Cool Formaldehyde Humidifier White / Gold" device. Would it be possible to adapt the program to this device? Unfortunately, I can't even turn it off and on. The temperature can be read out and the rotation can also be switched on and off.

setRotation and get rotation are also possible.

I once did a trace with wireshark and with it I got the following read out.
There are two MQTT packages returned:

M9F-EU-serialnumber/status/current{"msg":"CURRENT-STATE","time":"2021-12-08T12:05:57.000Z","mode-reason":"PRC","state-reason":"MODE","rssi":"-52","channel":"5","fqhp":"104144","fghp":"72848","product-state":{"fpwr":"ON","auto":"OFF","oscs":"ON","oson":"ON","nmod":"OFF","rhtm":"OFF","fnst":"FAN","ercd":"NONE","wacd":"NONE","nmdv":"0004","fnsp":"0001","bril":"0002","corf":"ON","cflr":"INV","hflr":"0099","cflt":"SCOF","hflt":"GCOM","sltm":"OFF","osal":"0189","osau":"0189","ancp":"0090","hume":"HUMD","haut":"ON","humt":"0070","rect":"0045","msta":"OFF","clcr":"CLNO","cdrr":"0060","cltr":"0671","wath":"0675","psta":"OFF","fdir":"ON"},"scheduler":{"srsc":"0000000000000000","dstv":"0001","tzid":"0001"}}

M9F-EU-serialnumber/status/current{"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2021-12-08T12:05:57.000Z","data":{"tact":"2947","hact":"0049","pm25":"0000","pm10":"0000","va10":"0005","noxl":"0003","p25r":"0001","p10r":"0001","hcho":"0004","hchr":"0011","sltm":"OFF"}}

For on and off, for example, I think the command "fpwr" would have to be used instead of "fmod".

Unfortunately, the commands cannot be passed on 1: 1, so the program must be adapted.

The table from the ioBroker project seems to me to be quite complete.

Thank you very much for your help.

CURRENT-STATE

name meaning possible values Unit
mode-reason Current Mode has been set by RemoteControl, App, Scheduler PRC, LAPP, LSCH, PUI  
state-reason   MODE  
rssi WIFI Strength -100 - 0 dBm
channel WIFI Channel 52  
fqhp   96704  
fghp   70480

product-state

name meaning possible values Unit
ercd Last Error Code NONE , or some hexa values  
filf remaining Filter life 0000 - 4300 hours
fmod Mode FAN , AUTO, OFF  
fpwr Main Power ON, OFF  
fnst Fan Status ON , OFF, FAN  
fnsp Fan speed 0001 - 0010, AUTO  
fdir Fandirection aka. Jet focus/ ON=Front, OFF=Back ON, OFF  
ffoc JetFocus ON, OFF  
nmod Night mode ON , OFF  
oson Oscillation ON , OFF  
osal OscillationAngle Lower Boundary 0005 - 355 ° (degrees)
osau OscillationAngle Upper Boundary 0005 - 355 ° (degrees)
oscs OscillationActive ON, OFF, IDLE  
ancp OscillationAngle CUST, 0180 ° (degrees)
qtar Air Quality target 0001=Good, 0002=Normal, 0003=Bad, 0004=Very bad  
rhtm Continuous Monitoring ON, OFF  
auto AutomaticMode ON, OFF  
nmdv NightMode Max Fanspeed? 0004  
cflr Status Carbonfilter 0000 - 0100 Percent
cflt Carbonfilter CARF, NONE  
hflr Status HEPA-Filter 0000 - 0100 Percent
hflt HEPA-Filter GHEP, GCOM  
sltm Sleeptimer ON, OFF  
hmod Heater Mode [ON/OFF] HEAT  
hmax Target temperature for heating 0 .. 5000 K
hume HumidificationMode ON, OFF,  
haut Humidify Auto Mode HUMIDIFY_AUTO_MODE_ON, HUMIDIFY_AUTO_MODE_OFF  
humt Humidification Target HUMIDIFICATION_MODE_OFF, HUMIDIFICATION_MODE_THIRTY, HUMIDIFICATION_MODE_FORTY, HUMIDIFICATION_MODE_FIFTY, HUMIDIFICATION_MODE_SIXTY, HUMIDIFICATION_MODE_SEVENTY  
cdrr CleanDurationRemaining integer minutes
rect AutoHumidificationTarget integer %
cltr TimeRemainingToNextClean integer hours
wath WaterHardness SOFT="2025", MEDIUM="1350", HARD="0675"  
wacd WarningCode NONE...  
rstf reset filter lifecycle 'RSTF', 'STET', RESET_FILTER_LIFE_IGNORE, RESET_FILTER_LIFE_ACTION  
corf Temperature format ON=Celsius, OFF=Fahrenheit  
clcr DeepcleanCycle CLNO=inactive, CLAC=Deep clean in progress, CLCM=Finished  
hsta Heating state ACTIVE/IDLE  
msta Humidification state Active/Idle OFF, HUMD  
psta [HP0x] Unknown INIT, CLNG, INV, OFF  
bril unknown 0002 LEVEL_LOW, LEVEL_MEDIUM, LEVEL_HIGH
fqhp unknown    
tilt [HP0x] Unknown string  
dial [DP0x] Unknown    

AirQuality Value

Hi! How do you get the AirQuality value? I see you take the value of dust and voc and add them to another. Then you divide them by 2 and multiply with the sensitivity. The problem is that I get 5 almost everytime although the value in the Dyson app is 2.

I‘m using the Dyson Pure & Cool Tower and I can‘t define a sensitivity value there. Maybe it is possible to get the value directly from the Dyson cloud?

     airQuality = Math.min(Math.max(Math.floor((dustValue + vocValue) / 2 * this.sensitivity), 1), 5)

TP02 fanspeed isn't working

I am able to turn my TP02 on and off by sending commands, but can't get fan speed to work. No matter what value is passed, fan speed goes to 1.

image

No output

Hi

I managed to get this briefly working for about a 5 minute period, however i'm now just getting no output at all:

I've just setup a very simple input, i've tried payload true (which worked the first time around) and msg.payload.actions getTemperature,
image

The config picks up my device so i don't think theres any authentication issues. Like i said it was just working fine then all of a sudden no response, i've tried every single action and nothing.
This is a PE9-UK -455 Model.

Regards
Jake

Not all functions do work

Hello,

I try to use this node, but it seems functioning only partly. I have a Dyson Pure Cool.

If I try to set fan speed, it returns the actual fan-speed, but does not set a new fan speed
If I set rotaion on, it works, but setting rotation off does not work.

Do I do somethng wrong, or is the node not working 100%?

Regards G. Brink

Edit:
found the solution. Used function nodes with payload.action for all settings. Works good.
Speed setting: for example 3 needs to be set as speed 30. Then it works.

Cannot select a device

Thank you for writing this plugin and I'm excited to use it. I am able to configure it and the device search shows a list of my 3 pure hot + cool link. However I cannot select from the list. I'm sorry I'm not more familiar with creating nodes to find the issue directly. Thank you!
Node-RED___192_168_51_21

Some missing fan types

Great module. Very much appreciated.

One of the my purifiers work, while the other doesn't. I ended up removing it from my Dyson account for now, but it is a model HP02 (aka 455).

I found the additional product types below from here:
https://github.com/lukasroegner/homebridge-dyson-pure-cool/blob/master/src/dyson-pure-cool-device.js

// Creates the device information from the API results let model = 'Pure Cool'; let hardwareRevision = ''; let hasHeating = false; let hasHumidifier = false; let hasJetFocus = false; let hasAdvancedAirQualitySensors = false; switch (productType) { case '358': model = 'Dyson Pure Humidify+Cool'; hardwareRevision = 'PH01'; hasAdvancedAirQualitySensors = true; hasHumidifier = true; hasJetFocus = true; break; case '438': model = 'Dyson Pure Cool Tower'; hardwareRevision = 'TP04'; hasJetFocus = true; hasAdvancedAirQualitySensors = true; break; case '455': model = 'Dyson Pure Hot+Cool Link'; hardwareRevision = 'HP02'; hasHeating = true; hasJetFocus = true; break; case '469': model = 'Dyson Pure Cool Link Desk'; hardwareRevision = 'DP01'; break; case '475': model = 'Dyson Pure Cool Link Tower'; hardwareRevision = 'TP02'; break; case '520': model = 'Dyson Pure Cool Desk'; hardwareRevision = 'DP04'; hasJetFocus = true; hasAdvancedAirQualitySensors = true; break; case '527': model = 'Dyson Pure Hot+Cool'; hardwareRevision = 'HP04'; hasJetFocus = true; hasAdvancedAirQualitySensors = true; hasHeating = true; break; }

Dyson link should have the possibility to clear action

When you selected an action in the Dyson link node, it should be possible to clear the action. When the item is selected once, it is not possible to clear it.
This makes sending JSON with the action included useless, because the action is overruled by the action field. The possibility to clear the action prevents the need for the user to create a new node.

Refactor project

Project needs some refactoring for:

  • Reusable temp conversions
  • Classes and subclasses for different device types
  • Out of range errors for faulty input
  • Uniform usage and conversion of strings, floats and ints both on input and output

Functions randomly not working/documentation lacking for less experienced users

Hi,
I didn't really know where to put this, so I filed it as a bug (as suggested by the contribution-document).

I am trying to get my Dyson Hot and Cool running (through openhab->node-red), but wasn really successful so far:

  • I was able to turn the device on/off with the "turn On" "turn Off" function. Sometimes after restarting node-red this does not work - the commands are just ignored. I have entered the IP adress of the device and the configuration of the node seems to be ok, since all devices (I have two in total) are correctly discovered/changes in the name are instantly reflected
  • I was not able to control the rotation. The documentation says setRotation in msg.payload.rotation must be set. However, there seems to be the possibility to supply a "Value" throug the gui? Though format and possible values are unknown. Setting it to "1" seems to enable rotation, disabling setting it to zero was unsuccessful, however...
  • I was also not able to control the fan speed. Same problem as above.

Also I am not sure how to exactly provide the values msg.payload.rotation and msg.payload.speed. The speed value for example is stored in an OpenHab String, so it is passed directly as the payload. While I can overwrite the payload itself with a function using a "payload: false" statement for example, "payload.speed: 5" gives an syntax error... I think it would be really helpful if real node examples would be given in the documentation...

Thanks a lot!

Support for Pure Cool TP04

I installed the nodes and communication seems to work. getTemperature and setFanSpeed are working but I can’t neither turn the device on or off nor setting it to auto mode. Can you add support for tp04?

Use in Node RED

Hi,

unfortunately no signals are sent to my Dyson and I don't get any values. Is there an example here that you can give me?

Thanks in advance.
Lars

100% fanspeed issue

I'm having issues setting my TP04 to 100% fan speed. I did some research by adding some markers in the code showing some of the data. I did do some getFanSpeed calls while sweeping over the entire range using the official Dyson app. Afterwards I did a sweep of setFanSpeed calls from 10% to 100%

getFanSpeed fnsp: AUTO
getFanSpeed fnsp: 0001
getFanSpeed fnsp: 0002
getFanSpeed fnsp: 0003
getFanSpeed fnsp: 0004
getFanSpeed fnsp: 0005
getFanSpeed fnsp: 0006
getFanSpeed fnsp: 0007
getFanSpeed fnsp: 0008
getFanSpeed fnsp: 0009
getFanSpeed fnsp: 0010
setFanSpeed fnsp: 1
_setStatus Data: {"fnsp":"0001"}
getFanSpeed fnsp: 0001
setFanSpeed fnsp: 2
_setStatus Data: {"fnsp":"0002"}
getFanSpeed fnsp: 0002
setFanSpeed fnsp: 3
_setStatus Data: {"fnsp":"0003"}
getFanSpeed fnsp: 0003
setFanSpeed fnsp: 9
_setStatus Data: {"fnsp":"0009"}
getFanSpeed fnsp: 0009
setFanSpeed fnsp: 10
_setStatus Data: {"fnsp":"00010"}
getFanSpeed fnsp: 0009

As you can see all goes well until we reach 100%. The 10 in fnsp from the setFanSpeed function is prefixed with 3 zeros. The Dyson does not seem to interpret that at all.
I'm willing to fix the code and do a PR, but I'm unsure if 00010 is a bug for all Dyson models, since I only own one model. Maybe some other models, you tested, do use 00010. Can you inform me on this? @naimo84 @ajago

How to set temperature

hiii :)

I tried

{"action":"setTemperature","temperature":"22"}

but this action is probably not implemented?
and also should get Celsius or Fahrenheit?
if not implemented? Will this be implemented?

thank you very much
Neno

Feature request

Hi i've come across your project after recently getting a Dyson Heat+Cool and was wondering if it would be possible to add the heat functionality? It works perfectly but would be great if i could be able to set the temperature.

Thanks heaps if this is possible!

No longer connecting to Dyson cloud

Hi naimo84, first off, thanks for your code!
I'm working with it on raspbian stretch, and it worked marvellously until a couple of days ago, when I took a fresh sd card, put debian Buster on it, and attempted to install my whole home automation environment, including node red, and your node, of course.

Obviously didn't remember the password, so went ahead and reset it.
From then, when I edit the dyson-config node with my credentials, and get back to the dyson-link node, I don't get my device name anymore, and node red spits out the very weird and redundant log I'll attach below.
Then I got back at my stretch sd card that was working perfectly, and I get the very same behaviour, after changing the newly reset password, inside the dyson-config node.

I'm telling you about all these steps, to better address the issue
I have a dyson hot+cool link, and I have been able to use the android app all along (occasionaly updating the password everytime i changed it)

a few more weird behaviours I'm able to address are:
the dyson-config node, before restarting node red, is marked to be unused (both with "0 nodes using this config" and the warning when I deploy my flow.
and looking at the logs: the country keeps on being switched to "DE", while I was, and presently am, using "EU" as from my device serial.

here's the log, pardon the redundancies, it's just the first few seconds in of a fresh node red session.

StatusCodeError: 404 - {"Message":"No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."} at new StatusCodeError (/home/pi/.node-red/node_modules/request-promise-core/lib/errors.js:32:15) at Request.plumbing.callback (/home/pi/.node-red/node_modules/request-promise-core/lib/plumbing.js:104:33) at Request.RP$callback [as _callback] (/home/pi/.node-red/node_modules/request-promise-core/lib/plumbing.js:46:31) at Request.self.callback (/home/pi/.node-red/node_modules/request/request.js:185:22) at Request.emit (events.js:223:5) at Request.<anonymous> (/home/pi/.node-red/node_modules/request/request.js:1161:10) at Request.emit (events.js:223:5) at IncomingMessage.<anonymous> (/home/pi/.node-red/node_modules/request/request.js:1083:12) at Object.onceWrapper (events.js:312:28) at IncomingMessage.emit (events.js:228:7) { name: 'StatusCodeError', statusCode: 404, message: 404 - {"Message":"No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."}`,
error: {
Message: "No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."
},
options: {
url: 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE',
method: 'POST',
body: { Email: 'myeditedusername', Password: 'myeditedpassword' },
agentOptions: { rejectUnauthorized: false },
json: true,
callback: [Function: RP$callback],
transform: undefined,
simple: true,
resolveWithFullResponse: false,
transform2xxOnly: false
},
response: IncomingMessage {
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: null,
pipesCount: 0,
flowing: true,
ended: true,
endEmitted: true,
reading: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
paused: false,
emitClose: true,
autoDestroy: false,
destroyed: false,
defaultEncoding: 'utf8',
awaitDrain: 0,
readingMore: true,
decoder: null,
encoding: null
},
readable: false,
_events: [Object: null prototype] {
end: [Array],
close: [Array],
data: [Function],
error: [Function]
},
_eventsCount: 4,
_maxListeners: undefined,
socket: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.cp.dyson.com',
alpnProtocol: false,
authorized: false,
authorizationError: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.cp.dyson.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: false,
parser: null,
_httpMessage: [ClientRequest],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 517,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
connection: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.cp.dyson.com',
alpnProtocol: false,
authorized: false,
authorizationError: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.cp.dyson.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: false,
parser: null,
_httpMessage: [ClientRequest],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 517,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers: {
'cache-control': 'no-cache',
pragma: 'no-cache',
'content-type': 'application/json; charset=utf-8',
expires: '-1',
date: 'Thu, 06 Feb 2020 22:02:54 GMT',
connection: 'close',
'content-length': '141'
},
rawHeaders: [
'Cache-Control',
'no-cache',
'Pragma',
'no-cache',
'Content-Type',
'application/json; charset=utf-8',
'Expires',
'-1',
'Date',
'Thu, 06 Feb 2020 22:02:54 GMT',
'Connection',
'close',
'Content-Length',
'141'
],
trailers: {},
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 404,
statusMessage: 'Not Found',
client: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.cp.dyson.com',
alpnProtocol: false,
authorized: false,
authorizationError: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.cp.dyson.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: false,
parser: null,
_httpMessage: [ClientRequest],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 517,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
_consuming: false,
_dumped: false,
req: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [TLSSocket],
connection: [TLSSocket],
_header: 'POST /v1/userregistration/authenticate?country=DE HTTP/1.1\r\n' +
'host: api.cp.dyson.com\r\n' +
'accept: application/json\r\n' +
'content-type: application/json\r\n' +
'content-length: 63\r\n' +
'Connection: close\r\n' +
'\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Agent],
socketPath: undefined,
method: 'POST',
insecureHTTPParser: undefined,
path: '/v1/userregistration/authenticate?country=DE',
_ended: true,
res: [Circular],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
[Symbol(kNeedDrain)]: false,
[Symbol(isCorked)]: false,
[Symbol(kOutHeaders)]: [Object: null prototype]
},
request: Request {
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
method: 'POST',
body: '{"Email":"myeditedusername","Password":"myeditedpassword"}',
agentOptions: [Object],
readable: true,
writable: true,
explicitMethod: true,
_qs: [Querystring],
_auth: [Auth],
_oauth: [OAuth],
_multipart: [Multipart],
_redirect: [Redirect],
_tunnel: [Tunnel],
_rp_resolve: [Function],
_rp_reject: [Function],
_rp_promise: [Promise],
_rp_callbackOrig: undefined,
callback: [Function],
_rp_options: [Object],
headers: [Object],
setHeader: [Function],
hasHeader: [Function],
getHeader: [Function],
removeHeader: [Function],
localAddress: undefined,
pool: [Object],
dests: [],
__isRequestRequest: true,
_callback: [Function: RP$callback],
uri: [Url],
proxy: null,
tunnel: true,
setHost: true,
originalCookieHeader: undefined,
_disableCookies: true,
_jar: undefined,
port: 443,
host: 'api.cp.dyson.com',
path: '/v1/userregistration/authenticate?country=DE',
_json: true,
httpModule: [Object],
agentClass: [Function: Agent],
agent: [Agent],
_started: true,
href: 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE',
req: [ClientRequest],
ntick: true,
response: [Circular],
originalHost: 'api.cp.dyson.com',
originalHostHeaderName: 'host',
responseContent: [Circular],
_destdata: true,
_ended: true,
_callbackCalled: true
},
toJSON: [Function: responseToJSON],
caseless: Caseless { dict: [Object] },
body: {
Message: "No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."
}
}
}
unhandledRejection StatusCodeError: 404 - {"Message":"No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."}
at new StatusCodeError (/home/pi/.node-red/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/home/pi/.node-red/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/home/pi/.node-red/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/home/pi/.node-red/node_modules/request/request.js:185:22)
at Request.emit (events.js:223:5)
at Request. (/home/pi/.node-red/node_modules/request/request.js:1161:10)
at Request.emit (events.js:223:5)
at IncomingMessage. (/home/pi/.node-red/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:312:28)
at IncomingMessage.emit (events.js:228:7) {
name: 'StatusCodeError',
statusCode: 404,
message: 404 - {"Message":"No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."},
error: {
Message: "No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."
},
options: {
url: 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE',
method: 'POST',
body: { Email: 'myeditedusername', Password: 'myeditedpassword' },
agentOptions: { rejectUnauthorized: false },
json: true,
callback: [Function: RP$callback],
transform: undefined,
simple: true,
resolveWithFullResponse: false,
transform2xxOnly: false
},
response: IncomingMessage {
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: null,
pipesCount: 0,
flowing: true,
ended: true,
endEmitted: true,
reading: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
paused: false,
emitClose: true,
autoDestroy: false,
destroyed: false,
defaultEncoding: 'utf8',
awaitDrain: 0,
readingMore: true,
decoder: null,
encoding: null
},
readable: false,
_events: [Object: null prototype] {
end: [Array],
close: [Array],
data: [Function],
error: [Function]
},
_eventsCount: 4,
_maxListeners: undefined,
socket: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.cp.dyson.com',
alpnProtocol: false,
authorized: false,
authorizationError: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.cp.dyson.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: false,
parser: null,
_httpMessage: [ClientRequest],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 517,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
connection: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.cp.dyson.com',
alpnProtocol: false,
authorized: false,
authorizationError: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.cp.dyson.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: false,
parser: null,
_httpMessage: [ClientRequest],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 517,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers: {
'cache-control': 'no-cache',
pragma: 'no-cache',
'content-type': 'application/json; charset=utf-8',
expires: '-1',
date: 'Thu, 06 Feb 2020 22:02:54 GMT',
connection: 'close',
'content-length': '141'
},
rawHeaders: [
'Cache-Control',
'no-cache',
'Pragma',
'no-cache',
'Content-Type',
'application/json; charset=utf-8',
'Expires',
'-1',
'Date',
'Thu, 06 Feb 2020 22:02:54 GMT',
'Connection',
'close',
'Content-Length',
'141'
],
trailers: {},
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 404,
statusMessage: 'Not Found',
client: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.cp.dyson.com',
alpnProtocol: false,
authorized: false,
authorizationError: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.cp.dyson.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: false,
parser: null,
_httpMessage: [ClientRequest],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 517,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
_consuming: false,
_dumped: false,
req: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [TLSSocket],
connection: [TLSSocket],
_header: 'POST /v1/userregistration/authenticate?country=DE HTTP/1.1\r\n' +
'host: api.cp.dyson.com\r\n' +
'accept: application/json\r\n' +
'content-type: application/json\r\n' +
'content-length: 63\r\n' +
'Connection: close\r\n' +
'\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Agent],
socketPath: undefined,
method: 'POST',
insecureHTTPParser: undefined,
path: '/v1/userregistration/authenticate?country=DE',
_ended: true,
res: [Circular],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
[Symbol(kNeedDrain)]: false,
[Symbol(isCorked)]: false,
[Symbol(kOutHeaders)]: [Object: null prototype]
},
request: Request {
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
method: 'POST',
body: '{"Email":"myeditedusername","Password":"myeditedpassword"}',
agentOptions: [Object],
readable: true,
writable: true,
explicitMethod: true,
_qs: [Querystring],
_auth: [Auth],
_oauth: [OAuth],
_multipart: [Multipart],
_redirect: [Redirect],
_tunnel: [Tunnel],
_rp_resolve: [Function],
_rp_reject: [Function],
_rp_promise: [Promise],
_rp_callbackOrig: undefined,
callback: [Function],
_rp_options: [Object],
headers: [Object],
setHeader: [Function],
hasHeader: [Function],
getHeader: [Function],
removeHeader: [Function],
localAddress: undefined,
pool: [Object],
dests: [],
__isRequestRequest: true,
_callback: [Function: RP$callback],
uri: [Url],
proxy: null,
tunnel: true,
setHost: true,
originalCookieHeader: undefined,
_disableCookies: true,
_jar: undefined,
port: 443,
host: 'api.cp.dyson.com',
path: '/v1/userregistration/authenticate?country=DE',
_json: true,
httpModule: [Object],
agentClass: [Function: Agent],
agent: [Agent],
_started: true,
href: 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE',
req: [ClientRequest],
ntick: true,
response: [Circular],
originalHost: 'api.cp.dyson.com',
originalHostHeaderName: 'host',
responseContent: [Circular],
_destdata: true,
_ended: true,
_callbackCalled: true
},
toJSON: [Function: responseToJSON],
caseless: Caseless { dict: [Object] },
body: {
Message: "No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."
}
}
}
unhandledRejection StatusCodeError: 404 - {"Message":"No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."}
at new StatusCodeError (/home/pi/.node-red/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/home/pi/.node-red/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/home/pi/.node-red/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/home/pi/.node-red/node_modules/request/request.js:185:22)
at Request.emit (events.js:223:5)
at Request. (/home/pi/.node-red/node_modules/request/request.js:1161:10)
at Request.emit (events.js:223:5)
at IncomingMessage. (/home/pi/.node-red/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:312:28)
at IncomingMessage.emit (events.js:228:7) {
name: 'StatusCodeError',
statusCode: 404,
message: 404 - {"Message":"No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."},
error: {
Message: "No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."
},
options: {
url: 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE',
method: 'POST',
body: { Email: 'myeditedusername', Password: 'myeditedpassword' },
agentOptions: { rejectUnauthorized: false },
json: true,
callback: [Function: RP$callback],
transform: undefined,
simple: true,
resolveWithFullResponse: false,
transform2xxOnly: false
},
response: IncomingMessage {
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: null,
pipesCount: 0,
flowing: true,
ended: true,
endEmitted: true,
reading: false,
sync: true,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: false,
paused: false,
emitClose: true,
autoDestroy: false,
destroyed: false,
defaultEncoding: 'utf8',
awaitDrain: 0,
readingMore: true,
decoder: null,
encoding: null
},
readable: false,
_events: [Object: null prototype] {
end: [Array],
close: [Array],
data: [Function],
error: [Function]
},
_eventsCount: 4,
_maxListeners: undefined,
socket: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.cp.dyson.com',
alpnProtocol: false,
authorized: false,
authorizationError: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.cp.dyson.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: false,
parser: null,
_httpMessage: [ClientRequest],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 517,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
connection: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.cp.dyson.com',
alpnProtocol: false,
authorized: false,
authorizationError: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.cp.dyson.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: false,
parser: null,
_httpMessage: [ClientRequest],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 517,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers: {
'cache-control': 'no-cache',
pragma: 'no-cache',
'content-type': 'application/json; charset=utf-8',
expires: '-1',
date: 'Thu, 06 Feb 2020 22:02:54 GMT',
connection: 'close',
'content-length': '141'
},
rawHeaders: [
'Cache-Control',
'no-cache',
'Pragma',
'no-cache',
'Content-Type',
'application/json; charset=utf-8',
'Expires',
'-1',
'Date',
'Thu, 06 Feb 2020 22:02:54 GMT',
'Connection',
'close',
'Content-Length',
'141'
],
trailers: {},
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 404,
statusMessage: 'Not Found',
client: TLSSocket {
_tlsOptions: [Object],
_secureEstablished: true,
_securePending: false,
_newSessionPending: false,
_controlReleased: true,
_SNICallback: null,
servername: 'api.cp.dyson.com',
alpnProtocol: false,
authorized: false,
authorizationError: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
encrypted: true,
_events: [Object: null prototype],
_eventsCount: 9,
connecting: false,
_hadError: false,
_parent: null,
_host: 'api.cp.dyson.com',
_readableState: [ReadableState],
readable: true,
_maxListeners: undefined,
_writableState: [WritableState],
writable: false,
allowHalfOpen: false,
_sockname: null,
_pendingData: null,
_pendingEncoding: '',
server: undefined,
_server: null,
ssl: [TLSWrap],
_requestCert: true,
_rejectUnauthorized: false,
parser: null,
_httpMessage: [ClientRequest],
[Symbol(res)]: [TLSWrap],
[Symbol(asyncId)]: 517,
[Symbol(kHandle)]: [TLSWrap],
[Symbol(lastWriteQueueSize)]: 0,
[Symbol(timeout)]: null,
[Symbol(kBuffer)]: null,
[Symbol(kBufferCb)]: null,
[Symbol(kBufferGen)]: null,
[Symbol(kBytesRead)]: 0,
[Symbol(kBytesWritten)]: 0,
[Symbol(connect-options)]: [Object]
},
_consuming: false,
_dumped: false,
req: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: null,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [TLSSocket],
connection: [TLSSocket],
_header: 'POST /v1/userregistration/authenticate?country=DE HTTP/1.1\r\n' +
'host: api.cp.dyson.com\r\n' +
'accept: application/json\r\n' +
'content-type: application/json\r\n' +
'content-length: 63\r\n' +
'Connection: close\r\n' +
'\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Agent],
socketPath: undefined,
method: 'POST',
insecureHTTPParser: undefined,
path: '/v1/userregistration/authenticate?country=DE',
_ended: true,
res: [Circular],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
[Symbol(kNeedDrain)]: false,
[Symbol(isCorked)]: false,
[Symbol(kOutHeaders)]: [Object: null prototype]
},
request: Request {
_events: [Object: null prototype],
_eventsCount: 5,
_maxListeners: undefined,
method: 'POST',
body: '{"Email":"myeditedusername","Password":"myeditedpassword"}',
agentOptions: [Object],
readable: true,
writable: true,
explicitMethod: true,
_qs: [Querystring],
_auth: [Auth],
_oauth: [OAuth],
_multipart: [Multipart],
_redirect: [Redirect],
_tunnel: [Tunnel],
_rp_resolve: [Function],
_rp_reject: [Function],
_rp_promise: [Promise],
_rp_callbackOrig: undefined,
callback: [Function],
_rp_options: [Object],
headers: [Object],
setHeader: [Function],
hasHeader: [Function],
getHeader: [Function],
removeHeader: [Function],
localAddress: undefined,
pool: [Object],
dests: [],
__isRequestRequest: true,
_callback: [Function: RP$callback],
uri: [Url],
proxy: null,
tunnel: true,
setHost: true,
originalCookieHeader: undefined,
_disableCookies: true,
_jar: undefined,
port: 443,
host: 'api.cp.dyson.com',
path: '/v1/userregistration/authenticate?country=DE',
_json: true,
httpModule: [Object],
agentClass: [Function: Agent],
agent: [Agent],
_started: true,
href: 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE',
req: [ClientRequest],
ntick: true,
response: [Circular],
originalHost: 'api.cp.dyson.com',
originalHostHeaderName: 'host',
responseContent: [Circular],
_destdata: true,
_ended: true,
_callbackCalled: true
},
toJSON: [Function: responseToJSON],
caseless: Caseless { dict: [Object] },
body: {
Message: "No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."
}
}
}
{
'Unhandled Rejection at': Promise {
StatusCodeError: 404 - {"Message":"No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."}
at new StatusCodeError (/home/pi/.node-red/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/home/pi/.node-red/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/home/pi/.node-red/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/home/pi/.node-red/node_modules/request/request.js:185:22)
at Request.emit (events.js:223:5)
at Request. (/home/pi/.node-red/node_modules/request/request.js:1161:10)
at Request.emit (events.js:223:5)
at IncomingMessage. (/home/pi/.node-red/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:312:28)
at IncomingMessage.emit (events.js:228:7) {
name: 'StatusCodeError',
statusCode: 404,
message: 404 - {"Message":"No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."},
error: [Object],
options: [Object],
response: [IncomingMessage]
}
},
reason: StatusCodeError: 404 - {"Message":"No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."}
at new StatusCodeError (/home/pi/.node-red/node_modules/request-promise-core/lib/errors.js:32:15)
at Request.plumbing.callback (/home/pi/.node-red/node_modules/request-promise-core/lib/plumbing.js:104:33)
at Request.RP$callback [as _callback] (/home/pi/.node-red/node_modules/request-promise-core/lib/plumbing.js:46:31)
at Request.self.callback (/home/pi/.node-red/node_modules/request/request.js:185:22)
at Request.emit (events.js:223:5)
at Request. (/home/pi/.node-red/node_modules/request/request.js:1161:10)
at Request.emit (events.js:223:5)
at IncomingMessage. (/home/pi/.node-red/node_modules/request/request.js:1083:12)
at Object.onceWrapper (events.js:312:28)
at IncomingMessage.emit (events.js:228:7) {
name: 'StatusCodeError',
statusCode: 404,
message: 404 - {"Message":"No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."},
error: {
Message: "No HTTP resource was found that matches the request URI 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE'."
},
options: {
url: 'https://api.cp.dyson.com/v1/userregistration/authenticate?country=DE',
method: 'POST',
body: [Object],
agentOptions: [Object],
json: true,
callback: [Function: RP$callback],
transform: undefined,
simple: true,
resolveWithFullResponse: false,
transform2xxOnly: false
},
response: IncomingMessage {
_readableState: [ReadableState],
readable: false,
_events: [Object: null prototype],
_eventsCount: 4,
_maxListeners: undefined,
socket: [TLSSocket],
connection: [TLSSocket],
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers: [Object],
rawHeaders: [Array],
trailers: {},
rawTrailers: [],
aborted: false,
upgrade: false,
url: '',
method: null,
statusCode: 404,
statusMessage: 'Not Found',
client: [TLSSocket],
_consuming: false,
_dumped: false,
req: [ClientRequest],
request: [Request],
toJSON: [Function: responseToJSON],
caseless: [Caseless],
body: [Object]
}
}
}`

Can't connect (authenticate to get otp failure)

Describe the bug
Can't use the extension on latest nodered version.

When I click "authenticate to get otp" nodered logs print:

"AxiosError: Request failed with status code 400"

(Email and password are valid, country code too)

And I opened the dyson app.

Any idea what can be the root cause ?

Add option to bypass cloud and supply mqtt username and password directly

I'd like to avoid having to supply the cloud username/password/country. According to https://community.home-assistant.io/t/dyson-pure-cool-link-local-mqtt-control/217263 the required details to derive the mqtt username and password are also available from the sicker on the device (at least it works for my dyson pure hot+cool link).

The username is the serial number -- i.e. the middle part of the Product SSID, i.e. for DYSON-ABC-DE-FGHIJKLM-495 the username is ABC-DE-FGHIJKLM (495 is the device type). The password is the base64 encoded sha512 of the Product Wi-Fi Password, i.e. for abcdefgh the hashed password is o6jIG8l8JWABDXOJvIiqyXShBODiOBIgxuCExNzNHS0X1PhtsxwqhR3IDmaB10czxV3NA92W9gYs3aEqKRrmzg==

Dyson-MQTT2RRD implements this feature, it would be nice if node-red-contrib-dyson-purelink could too.

Country parameter issue

Hi, I'm french so my Country-Code is FR but the node is not working at all...

I saw in the code that the third parameter (country) of the DysonPureLine object instantiation is a fixed value 'DE'

In dyson-link.ts
let pureLink = new DysonPurelink(node.config.username, node.config.password, 'DE');

I'm not sure, but It should be something like
let pureLink = new DysonPurelink(node.config.username, node.config.password, node.config.country);
no ?

Node not communicating

Hi sir,

excellent product for NodeRED.. I find myself not able to make it work though. Here is my flow:

[{"id":"e6babaf.08e4348","type":"tab","label":"test","disabled":false,"info":""},{"id":"d0a9fcc3.0605a","type":"dyson-link","z":"e6babaf.08e4348","confignode":"16b72c43.3c3aec","device":"1","deviceserial":"","action":"getTemperature","value":0,"x":360,"y":220,"wires":[["2dbcd57b.6680e2"]]},{"id":"2dbcd57b.6680e2","type":"debug","z":"e6babaf.08e4348","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":610,"y":300,"wires":[]},{"id":"b8be35d7.ae246","type":"inject","z":"e6babaf.08e4348","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":300,"wires":[["d0a9fcc3.0605a"]]},{"id":"16b72c43.3c3aec","type":"dyson-config","z":"","username":"[email protected]","password":"XXXXXXXXXX","country":"IT"}]

I put an Inject node to have something out of your Dyson node, but nothing seems to come out. Would you please help me out in understanding what's wrong with it?
Plus, the list of devices is not selectable, it looks as though it's read-only: I do see my Dyson device, but I am not able to select it

Unable to configure

After placing the Node and clicking the node, nothing happens, so you cannot configure it.
Also after doing this no other node that needs configuring works until you restart Node-red.

I have tried this with a Node-red test version on a linux machine v3.1.3 and on my regular Pi4 machine installed as an addon to Home assistant v17.0.9, and both are the same.

Can you help please?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.