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

Shelly Plug password not being escaped properly for special characters #268

Open
Vardoger opened this issue Oct 28, 2021 · 1 comment
Open
Labels
bug Something isn't working

Comments

@Vardoger
Copy link

Vardoger commented Oct 28, 2021

Re https://github.com/geerlingguy/internet-pi/blob/master/example.config.yml#L25

When you use special characters in the 'shelly_plug_http_password' field, data from the Shelly plug will not be available to the Grafana Power Consumption dashboard.

Note #1: It does not matter where in the password the special character(s) are located.

Note #2: 'pihole_password' IS being escaped properly for special characters.

Steps to replicate:

  1. Set password in the Shelly Plug's interface as: $password
  2. Update config.yml --> shelly_plug_http_password --> "$password"
  3. Run 'ansible-playbook main.yml'
  4. Access power-consumption dashboard at http://piholeip:3030
  5. Power Consumption dashboard WILL NOT show data from the Shelly plug!
  6. Set password in the Shelly Plug's interface as: password
  7. Update config.yml --> shelly_plug_http_password --> "password"
  8. Run 'ansible-playbook main.yml'
  9. Access power-consumption dashboard at http://piholeip:3030
  10. Power Consumption dashboard WILL show data from the Shelly plug!!!

Testing with curl confirms data is available from the Shelly Plug with escaped characters in password.

curl http://shellylogin:[email protected]/meter/0
Result: "401 Unauthorized"

curl http://shellylogin:\[email protected]/meter/0
Result: {"power":3.23,"overpower":0.00,"is_valid":true,"timestamp":1635436041,"counters":[2.995, 2.991, 2.962],"total":23708}

(edited only to remove a redundant comment)

@geerlingguy geerlingguy added the bug Something isn't working label Oct 28, 2021
@geerlingguy
Copy link
Owner

That field should work with special characters, so this is most definitely a bug. Hopefully something simple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants