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

Worxlandroid integration pin code letters not supported #33377

Open
lseufer opened this issue Mar 28, 2020 · 13 comments
Open

Worxlandroid integration pin code letters not supported #33377

lseufer opened this issue Mar 28, 2020 · 13 comments

Comments

@lseufer
Copy link

@lseufer lseufer commented Mar 28, 2020

The problem

Environment

  • Home Assistant release with the issue: All
  • Last working Home Assistant release (if known):
  • Operating environment (Hass.io/Docker/Windows/etc.): Not relevant
  • Integration causing this issue: worxlandroid
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/worxlandroid/

Problem-relevant configuration.yaml

Traceback/Error logs


Additional information

@springstan
Copy link
Member

@springstan springstan commented Apr 1, 2020

@lseufer please elaborate on your problem and especially what value pin code can have.
How long is the pin code and can it contain letters and numbers at the same time?

@lseufer
Copy link
Author

@lseufer lseufer commented Apr 1, 2020

Sorry about that.
It's 4 characters which can only be A, B, C or D.

@springstan
Copy link
Member

@springstan springstan commented Apr 1, 2020

Which model do you have? I am bit confused that you can only use those four letters instead of integers which are also used in the docs.

@lseufer
Copy link
Author

@lseufer lseufer commented Apr 1, 2020

It's a wr143e. But the pin code is only of use on the keypad on the mower. Perhaps a pin code isn't required when communicating via the API. But as pin code is a required value for this integration, I can't try.

@springstan
Copy link
Member

@springstan springstan commented Apr 1, 2020

You could create a custom_component by copying all relevant files for this integration and changing the following line

vol.Required(CONF_PIN): vol.All(vol.Coerce(str), vol.Match(r"\d{4}")),

to

vol.Required(CONF_PIN): cv.string,

This way you could test this integration with your wr143e.

@lseufer
Copy link
Author

@lseufer lseufer commented Apr 1, 2020

I created the custom component but how do I make HA call it instead of the core one? I tried changing the name of the folder and of the sensor but to no avail. Sorry for the noob question.

@lseufer lseufer changed the title Worxlandroid integartion pin code letters not supported Worxlandroid integration pin code letters not supported Apr 1, 2020
@springstan
Copy link
Member

@springstan springstan commented Apr 1, 2020

You do not need to change the name of the folder or the sensor just keep everything as it is and change that one line. HA loads prioritzes custom components over built-in integrations so you do not have to do anything to call it instead of the core one.

@lseufer
Copy link
Author

@lseufer lseufer commented Apr 1, 2020

It is still asking me for a pin and a numerical one. I did change line 24.

@springstan
Copy link
Member

@springstan springstan commented Apr 1, 2020

Have you restarted?

@lseufer
Copy link
Author

@lseufer lseufer commented Apr 1, 2020

Yes. The config check did not let me so I even rebooted it but I am still getting The following integrations and platforms could not be set up:
sensor.worxlandroid
Please check your config.

@springstan
Copy link
Member

@springstan springstan commented Apr 1, 2020

Have you copied the entire folder and only made the change I suggested?
Here is the documentation reference on where HA is looking for integrations and how they are loaded https://developers.home-assistant.io/docs/creating_integration_file_structure#where-home-assistant-looks-for-integrations

@lseufer
Copy link
Author

@lseufer lseufer commented Apr 1, 2020

That's what I did. I can now put 4 letters instead of numbers but the battery and state entities return "unknown" . Pin is however still mandatory, I can't remove it or leave it blank.

@springstan
Copy link
Member

@springstan springstan commented Apr 2, 2020

One possibility could be that your model is not supported. Moreover, you are correct it is still required since it uses it to do a basic authentication with your device. Not sure if it is possible without having the pin code.

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.