shaiu / technicolor

This is an integration for HomeAssistant. It's a Device Tracker component for the Technicolor Gateway.
MIT License
7 stars 3 forks source link

Warning and not working after update #3

Closed fatuuse closed 3 years ago

fatuuse commented 3 years ago

Devices unavailable after update of integration and HASS core in Docker container.

Log

/usr/local/lib/python3.8/site-packages/technicolorgateway/modal.py:28: GuessedAtParserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.

The code that caused this warning is on line 28 of the file /usr/local/lib/python3.8/site-packages/technicolorgateway/modal.py. To get rid of this warning, pass the additional argument 'features="lxml"' to the BeautifulSoup constructor.

  soup = BeautifulSoup(content)

Technicolor HACS

latest 73604eb

Router

Software Version
17.2
Hardware Version
VBNT-H

Device modal eg.

<fieldset>
      <legend>Devices</legend>
      <div class="control-group"><table id="devices" class="table table-striped" data-stateid=""><thead><tr><th>Status</th><th>Priority</th><th>Hostname</th><th>IP address</th><th>MAC address</th><th>Type</th><th>Port</th><th></th></tr></thead><tbody><tr><td><span class="simple-desc"><div class="light green"></div></span></td><td><div class="switch switch disabled"><div class="switcher" texton="ON" textoff="OFF" valon="1" valoff="0"></div><input value="0" type="hidden" name="priority" id="priority"></div></td><td>Mate</td><td>192.168.1.2</td><td>02:11:12:12:12:12</td><td>ethernet</td><td>4</td> <td><div id="" class="btn btn-mini btn-table-edit tooltip-on" data-placement="top" data-original-title="Edit"><i class="icon-edit"></i>  </div></td></tr></tbody></table></div>
    </fieldset>

System Health

version core-2021.6.6
installation_type Home Assistant Container
dev false
hassio false
docker true
virtualenv false
python_version 3.8.9
os_name Linux
os_version 4.4.59+
arch x86_64
timezone Europe/Stockholm
Home Assistant Community Store GitHub API | ok -- | -- Github API Calls Remaining | 4766 Installed Version | 1.13.2 Stage | running Available Repositories | 849 Installed Repositories | 17
shaiu commented 3 years ago

Hi @fatuuse I need the html page of your device-modal from your router. You can find it at: http://192.168.1.1/modals/device-modal.lp (could be that your router has a different ip address) Please note that this holds all your ip/mac addresses of your router. This is sensitive data. I understand if you don't want to share it so you can just change the numbers to what ever you want. Because all I need is the structure of the page (could be that it's different than mine)

fatuuse commented 3 years ago

Is this part of page enough?

<fieldset>
      <legend>Devices</legend>
      <div class="control-group"><table id="devices" class="table table-striped" data-stateid=""><thead><tr><th>Status</th><th>Priority</th><th>Hostname</th><th>IP address</th><th>MAC address</th><th>Type</th><th>Port</th><th></th></tr></thead><tbody><tr><td><span class="simple-desc"><div class="light green"></div></span></td><td><div class="switch switch disabled"><div class="switcher" texton="ON" textoff="OFF" valon="1" valoff="0"></div><input value="0" type="hidden" name="priority" id="priority"></div></td><td>Mate</td><td>192.168.1.2</td><td>02:11:12:12:12:12</td><td>ethernet</td><td>4</td> <td><div id="" class="btn btn-mini btn-table-edit tooltip-on" data-placement="top" data-original-title="Edit"><i class="icon-edit"></i>  </div></td></tr></tbody></table></div>
    </fieldset>
shaiu commented 3 years ago

@fatuuse Please update the integration. I've deployed a fix. Please let me know if it's fixed by your end.

fatuuse commented 3 years ago

Working!

But still got the log warning:

usr/local/lib/python3.8/site-packages/technicolorgateway/modal.py:28: GuessedAtParserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.

The code that caused this warning is on line 28 of the file /usr/local/lib/python3.8/site-packages/technicolorgateway/modal.py. To get rid of this warning, pass the additional argument 'features="lxml"' to the BeautifulSoup constructor.

  soup = BeautifulSoup(content)
shaiu commented 3 years ago

Hi @fatuuse , Please open another issue for this warning and I'll fix it. Thanks.