nberardi / scrypted-dyson

MIT License
0 stars 0 forks source link

401 error #2

Closed monsieurlatte closed 1 year ago

monsieurlatte commented 1 year ago

Trying to migrate my install over from homebridge to scrypted, when I put in my username and password I get 401 error. Is there anyway to set this up with just using a known local password? I already have one for my previous install.

[Status 401 Unauthorized] Unable to authenticate user. aborting, authorization header not provided

nberardi commented 1 year ago

There is no ability to setup individual devices right now. It is something I am exploring. If you are receiving a 401, make sure you log out of the current Dyson app.

On Sun, Nov 27, 2022 at 2:21 PM monsieurlatte @.***> wrote:

Trying to migrate my install over from homebridge to scrypted, when I put in my username and password Iget 401 error. Is there anyway to set this up with just using a known local password? I already have one for my previous install.

— Reply to this email directly, view it on GitHub https://github.com/nberardi/scrypted-dyson/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACEH5H7TTNQUKIE2AI3ZNTWKOYC3ANCNFSM6AAAAAASMVGDUM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

monsieurlatte commented 1 year ago

I have signed my iOS device out over 3 hours ago and still not working. Only other setup I have is using local auth.  Oh well thanks for replying!On Nov 27, 2022, at 6:40 PM, Nick Berardi @.***> wrote: There is no ability to setup individual devices right now. It is something I am exploring. If you are receiving a 401, make sure you log out of the current Dyson app.

On Sun, Nov 27, 2022 at 2:21 PM monsieurlatte @.***> wrote:

Trying to migrate my install over from homebridge to scrypted, when I put in my username and password Iget 401 error. Is there anyway to set this up with just using a known local password? I already have one for my previous install.

— Reply to this email directly, view it on GitHub https://github.com/nberardi/scrypted-dyson/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACEH5H7TTNQUKIE2AI3ZNTWKOYC3ANCNFSM6AAAAAASMVGDUM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

nberardi commented 1 year ago

Can you share the output from the console? Sent from my iPhone, expect autocorrection issuesOn Nov 27, 2022, at 6:46 PM, monsieurlatte @.> wrote: I have signed my iOS device out over 3 hours ago and still not working. Only other setup I have is using local auth.  Oh well thanks for replying!On Nov 27, 2022, at 6:40 PM, Nick Berardi @.> wrote: There is no ability to setup individual devices right now. It is something I am exploring. If you are receiving a 401, make sure you log out of the current Dyson app.

On Sun, Nov 27, 2022 at 2:21 PM monsieurlatte @.***> wrote:

Trying to migrate my install over from homebridge to scrypted, when I put in my username and password Iget 401 error. Is there anyway to set this up with just using a known local password? I already have one for my previous install.

— Reply to this email directly, view it on GitHub https://github.com/nberardi/scrypted-dyson/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACEH5H7TTNQUKIE2AI3ZNTWKOYC3ANCNFSM6AAAAAASMVGDUM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

monsieurlatte commented 1 year ago

server version: 0.4.1 plugin version: scrypted-dyson 0.1.4 plugin loaded [Status 401 Unauthorized] Unable to authenticate user. aborting, authorization header not provided

On Nov 27, 2022, at 9:23 PM, Nick Berardi @.***> wrote:

Can you share the output from the console? Sent from my iPhone, expect autocorrection issuesOn Nov 27, 2022, at 6:46 PM, monsieurlatte @.> wrote: I have signed my iOS device out over 3 hours ago and still not working. Only other setup I have is using local auth. Oh well thanks for replying!On Nov 27, 2022, at 6:40 PM, Nick Berardi @.> wrote: There is no ability to setup individual devices right now. It is something I am exploring. If you are receiving a 401, make sure you log out of the current Dyson app.

On Sun, Nov 27, 2022 at 2:21 PM monsieurlatte @.***> wrote:

Trying to migrate my install over from homebridge to scrypted, when I put in my username and password Iget 401 error. Is there anyway to set this up with just using a known local password? I already have one for my previous install.

— Reply to this email directly, view it on GitHub https://github.com/nberardi/scrypted-dyson/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACEH5H7TTNQUKIE2AI3ZNTWKOYC3ANCNFSM6AAAAAASMVGDUM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***> — Reply to this email directly, view it on GitHub https://github.com/nberardi/scrypted-dyson/issues/2#issuecomment-1328444620, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIV6MIP53EDVAECPA3PGQ3WKQJTXANCNFSM6AAAAAASMVGDUM. You are receiving this because you authored the thread.

monsieurlatte commented 1 year ago

I may be way off key here since I dont know the first thing about coding, but here’s a link to the homebridge dyson setup that uses local authentication if that helps you at all in the future.

https://github.com/lukasroegner/homebridge-dyson-pure-cool#readme lukasroegner/homebridge-dyson-pure-cool: Plugin for using the Dyson Pure Cool fans in homebridge. github.com

On Nov 27, 2022, at 9:23 PM, Nick Berardi @.***> wrote:

Can you share the output from the console? Sent from my iPhone, expect autocorrection issuesOn Nov 27, 2022, at 6:46 PM, monsieurlatte @.> wrote: I have signed my iOS device out over 3 hours ago and still not working. Only other setup I have is using local auth. Oh well thanks for replying!On Nov 27, 2022, at 6:40 PM, Nick Berardi @.> wrote: There is no ability to setup individual devices right now. It is something I am exploring. If you are receiving a 401, make sure you log out of the current Dyson app.

On Sun, Nov 27, 2022 at 2:21 PM monsieurlatte @.***> wrote:

Trying to migrate my install over from homebridge to scrypted, when I put in my username and password Iget 401 error. Is there anyway to set this up with just using a known local password? I already have one for my previous install.

— Reply to this email directly, view it on GitHub https://github.com/nberardi/scrypted-dyson/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACEH5H7TTNQUKIE2AI3ZNTWKOYC3ANCNFSM6AAAAAASMVGDUM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***> — Reply to this email directly, view it on GitHub https://github.com/nberardi/scrypted-dyson/issues/2#issuecomment-1328444620, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIV6MIP53EDVAECPA3PGQ3WKQJTXANCNFSM6AAAAAASMVGDUM. You are receiving this because you authored the thread.

nberardi commented 1 year ago

Once the devices are discovered in the cloud they authenticate using the same approach. The limitation is that Scryted doesn’t provide a way to create individual devices. The authentication would work the same way it does in Homebridge if they provided that capability.

On Mon, Nov 28, 2022 at 12:13 PM monsieurlatte @.***> wrote:

I may be way off key here since I dont know the first thing about coding, but here’s a link to the homebridge dyson setup that uses local authentication if that helps you at all in the future.

https://github.com/lukasroegner/homebridge-dyson-pure-cool#readme lukasroegner/homebridge-dyson-pure-cool: Plugin for using the Dyson Pure Cool fans in homebridge. github.com

On Nov 27, 2022, at 9:23 PM, Nick Berardi @.***> wrote:

Can you share the output from the console? Sent from my iPhone, expect autocorrection issuesOn Nov 27, 2022, at 6:46 PM, monsieurlatte @.> wrote: I have signed my iOS device out over 3 hours ago and still not working. Only other setup I have is using local auth. Oh well thanks for replying!On Nov 27, 2022, at 6:40 PM, Nick Berardi @.> wrote: There is no ability to setup individual devices right now. It is something I am exploring. If you are receiving a 401, make sure you log out of the current Dyson app.

On Sun, Nov 27, 2022 at 2:21 PM monsieurlatte @.***> wrote:

Trying to migrate my install over from homebridge to scrypted, when I put in my username and password Iget 401 error. Is there anyway to set this up with just using a known local password? I already have one for my previous install.

— Reply to this email directly, view it on GitHub https://github.com/nberardi/scrypted-dyson/issues/2, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AACEH5H7TTNQUKIE2AI3ZNTWKOYC3ANCNFSM6AAAAAASMVGDUM

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***> — Reply to this email directly, view it on GitHub < https://github.com/nberardi/scrypted-dyson/issues/2#issuecomment-1328444620>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABIV6MIP53EDVAECPA3PGQ3WKQJTXANCNFSM6AAAAAASMVGDUM . You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub https://github.com/nberardi/scrypted-dyson/issues/2#issuecomment-1329455565, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACEH5E5K5Q4G6PQPSHY5LDWKTR2ZANCNFSM6AAAAAASMVGDUM . You are receiving this because you commented.Message ID: @.***>

monsieurlatte commented 1 year ago

Ah gotcha. Any ideas on the authentication header issue I have?On Nov 30, 2022, at 10:23 AM, Nick Berardi @.***> wrote: Once the devices are discovered in the cloud they authenticate using the same approach. The limitation is that Scryted doesn’t provide a way to create individual devices. The authentication would work the same way it does in Homebridge if they provided that capability.

On Mon, Nov 28, 2022 at 12:13 PM monsieurlatte @.***> wrote:

I may be way off key here since I dont know the first thing about coding, but here’s a link to the homebridge dyson setup that uses local authentication if that helps you at all in the future.

https://github.com/lukasroegner/homebridge-dyson-pure-cool#readme lukasroegner/homebridge-dyson-pure-cool: Plugin for using the Dyson Pure Cool fans in homebridge. github.com

On Nov 27, 2022, at 9:23 PM, Nick Berardi @.***> wrote:

Can you share the output from the console? Sent from my iPhone, expect autocorrection issuesOn Nov 27, 2022, at 6:46 PM, monsieurlatte @.> wrote: I have signed my iOS device out over 3 hours ago and still not working. Only other setup I have is using local auth. Oh well thanks for replying!On Nov 27, 2022, at 6:40 PM, Nick Berardi @.> wrote: There is no ability to setup individual devices right now. It is something I am exploring. If you are receiving a 401, make sure you log out of the current Dyson app.

On Sun, Nov 27, 2022 at 2:21 PM monsieurlatte @.***> wrote:

Trying to migrate my install over from homebridge to scrypted, when I put in my username and password Iget 401 error. Is there anyway to set this up with just using a known local password? I already have one for my previous install.

— Reply to this email directly, view it on GitHub https://github.com/nberardi/scrypted-dyson/issues/2, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AACEH5H7TTNQUKIE2AI3ZNTWKOYC3ANCNFSM6AAAAAASMVGDUM

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***> — Reply to this email directly, view it on GitHub < https://github.com/nberardi/scrypted-dyson/issues/2#issuecomment-1328444620>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABIV6MIP53EDVAECPA3PGQ3WKQJTXANCNFSM6AAAAAASMVGDUM . You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub https://github.com/nberardi/scrypted-dyson/issues/2#issuecomment-1329455565, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACEH5E5K5Q4G6PQPSHY5LDWKTR2ZANCNFSM6AAAAAASMVGDUM . You are receiving this because you commented.Message ID: @.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

nberardi commented 1 year ago

Please check out the 0.2.0 version. It should allow you to take the ipAddress, serialNumber, and credentials you already have in Homebridge and setup the devices manually.

monsieurlatte commented 1 year ago

whoa, fast work on that! I took all my info from homebridge (disabled the plugin in there and rebooted the fan just to be sure) but I am seeing this in the console.

plugin version: scrypted-dyson 0.2.0 connecting to : mqtt://10.0.0.13 MQTT error: Error: Connection refused: Bad username or password MQTT offline. MQTT disconnected. MQTT reconnecting. MQTT error: Error: Connection refused: Bad username or password MQTT disconnected. MQTT reconnecting. MQTT error: Error: Connection refused: Bad username or password MQTT disconnected. MQTT reconnecting. MQTT error: Error: Connection refused: Bad username or password MQTT disconnected.

On Dec 3, 2022, at 5:35 PM, Nick Berardi @.***> wrote:

Please check out the 0.2.0 version. It should allow you to take the ipAddress, serialNumber, and credentials you already have in Homebridge and setup the devices manually.

— Reply to this email directly, view it on GitHub https://github.com/nberardi/scrypted-dyson/issues/2#issuecomment-1336296500, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIV6MKRUU5U65PSMOJKDO3WLPYMPANCNFSM6AAAAAASMVGDUM. You are receiving this because you authored the thread.

nberardi commented 1 year ago

I have an idea of what’s going on, I will need to publish a new update with the changes.

nberardi commented 1 year ago

I forgot the credentials was a JSON object. Remove the devices you created and update to the latest v0.2.1 version and enter the IP Address and the Credentials into the Homebridge Credentials field. You should be good to go after that.

monsieurlatte commented 1 year ago

Yep that worked! I chose the dyson 475 (not sure how to figure out the model numbers from your dropdown but from a google search it seemed that maybe it was what I had. I have the TP02 (ignore this saw you had them listed in the readme). All works!!!! You have anyway to take a buy me a coffee donation?

On Dec 4, 2022, at 5:53 AM, Nick Berardi @.***> wrote:

I have an idea of what’s going on, I will need to publish a new update with the changes.

— Reply to this email directly, view it on GitHub https://github.com/nberardi/scrypted-dyson/issues/2#issuecomment-1336417472, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIV6MMBY65BF73SRWGR6FLWLSO4ZANCNFSM6AAAAAASMVGDUM. You are receiving this because you authored the thread.

monsieurlatte commented 1 year ago

One more note (and not a deal breaker) the air quality sensor goes from reading something to unknown a lot and finally the percentage when the fan is set to auto doesn't appear to update, the plugin shows it as whatever it was at when you turned on auto feature but as auto changes from 01-10 plugin always says the previous setting.

nberardi commented 1 year ago

@monsieurlatte I should advertise my buymeacoffee link, any donations are more than welcome.

Regarding the air quality sensor, that is a bug I am still tracking down the root cause. It appears to be a bug between the Dyson plugin and the HomeKit integration. I should have time in the next week or so to focus on it, as it is annoying me too. :)

nberardi commented 1 year ago

@monsieurlatte I found the issue, I was accidentally trigging the code to send Unknown before setting the real value. Please updated to release v0.2.2.

I am going to resolve this issue for now since the original 401 issue was worked around with manual device creation.

monsieurlatte commented 1 year ago

Wonderful! Thanks so much, have a wonderful holiday!

On Dec 11, 2022, at 1:10 PM, Nick Berardi @.***> wrote:

I found the issue, I was accidentally trigging the code to send Unknown before setting the real value. Please updated to release v0.2.2

— Reply to this email directly, view it on GitHub https://github.com/nberardi/scrypted-dyson/issues/2#issuecomment-1345657345, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIV6MPXZYKUBZTAH6TV6U3WMY7LPANCNFSM6AAAAAASMVGDUM. You are receiving this because you were mentioned.