Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSP-W215 Firmware V2.23 #39

Open
Darkman2771 opened this issue Jul 18, 2022 · 5 comments
Open

DSP-W215 Firmware V2.23 #39

Darkman2771 opened this issue Jul 18, 2022 · 5 comments

Comments

@Darkman2771
Copy link

Darkman2771 commented Jul 18, 2022

Hello @LinuxChristian,

I am using your python module in Home Assistant (HA) to integrate my DSP-W215 smart plugs. Four of the plugs are EU version and one is UK version and all of them are running the following firmware:

Firmware External Version: V2.23
Firmware Internal Version: V2.23b02
Date: Tue, 5 Dec 2017
Checksum: 0x06CD0779
2.4GHz regulation domain: EU

I understand that the latest supported firmware for this module is V2.22 and technically V2.23 is not supported, but interestingly enough, I have one EU plug working flawlessly and as expected while the other four are completely functional except for flipping the switch's state from on/off and vice versa. I can manually change the state on these four plugs and HA will read it normally, but if I tried to change it from HA, the slider will wait for 3-4 seconds then revert back automatically with no action on the plug itself nor errors in the log!

I would truly appreciate any feedback, help or pointers from your side especially that my ticket with Home Assistant is stale for 12 days now: home-assistant/core#74515

I would prefer keeping the V2.23 firmware version especially that it fixed security vulnerabilities with the switch but if tweaking the module to fit V2.23 deemed tricky, I will have no option but to downgrade.

Additionally, any update on the reauthentication issue. I see 2 pull requests to address this problem but without any merge?

Thanks for taking the time to read my message.

@LinuxChristian
Copy link
Owner

Hi @Darkman2771

Thanks for reaching out and sorry for the late reply - holidays are busy times.

It does seem strange that one of your EU plugs is working while 3 are not working - the UK version could be a different build. Unfortunally, there are no docs from D-Link on how these plugs work. So it's difficult to debug issues like these. Likely the request to switch the power state has changed slightly. My only suggestion is to try and sniff the network packages from the D-Link app (maybe using wireshark) - maybe you see something interesting by comparing the requets/response. That is my only suggestion. I don't use wireshark a lot so unfortunally I cannot help you how to actually compare the packages but that is where I would start -> google: How to use wireshark 😄

Regarding the reauth issue. I don't use my plugs anymore (haven't used them for years). I starting them up to test the two PRs but unfortunally they don't seem to work anymore. Since I cannot test the PRs and I don't get a lot of complains I decided the risk of merging them was too great. However, if you have time to pull the branches and test the changes I would be happy to take another look. I just don't want to do it without actually trying the code since a lot of users seems to still use this library from HASS.

Cheers,
Christian

@Darkman2771
Copy link
Author

Darkman2771 commented Jul 25, 2022

Hi @LinuxChristian,

Thanks for taking the time to respond to my message and for the pointers, really appreciate it.

I am very comfortable with scripting and wireshark but I have zero idea how these plugs work. I believe I would need a rooted phone with the application installed to redirect the traffic to a machine where I could do the interception and if the requests are done over HTTPS, then I would need to install a cert too, I could even do it with Burpsuite.

The problem is the D-Link Home application is being retired and I can't add these plugs to the mobile application anymore despite my attempts for 3 days now! This means that I won't be able to see how an official valid request looks like.

I am considering a downgrade in this case, but just to double check before resseting the 5 plugs. Is this firmware compatible with your module DSP-W215_fw_revB2_2-22_all_multi_20160301.zip and will it work with the UK version plug and HA?

Note: I will pull #36 as it looks like a prime candidate, I almost finished reviewing the code also, if you have any instructions for the review process let me know to accommodate accordingly.

Thanks again for your time and happy holidays :)

@LinuxChristian
Copy link
Owner

Hi @Darkman2771,

Yes, I agree with your debugging steps. Unfortunately, these devices are not easy to hack.

I am not sure that version will work. I 2018, I got this bug report, #28. He had issues using the B2 versions of the software with this library. Both on v2.22 and v.2.23. So if you can find a B1 version, I would suggest trying that one plug at a time. Several people has reported using this library with v2.22 in general, so I expect it works. I don't know if UK plugs are special. I have only used EU plugs.

Great about the pull request. I have no special guidelines. Mainly just ensuring the changes don't break support for existing HW versions.

@DEDEit
Copy link

DEDEit commented Mar 28, 2023

Hi everyone!
I found an old DSP-W215 scattered in the garage, I wish I could integrate it into the home assistant but I can't find any smartphone app to configure the connection to my mesh network.
The "mydlink" application does not support this model.
Do you have any advice on how to proceed?
Thank you all

@LinuxChristian
Copy link
Owner

@DEDEit - The DSP-Wxxx models are no longer supported by D-Link in general. They are now legacy devices according to them.

Unfortunately, I don't know of any way to activate the devices without the mydlink app. I also have some plugs that are impossible to pair now the app has shutdown support. If you find a workaround please share it in this thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants