Giter VIP home page Giter VIP logo

zte_tracker's Introduction

GitHub GitHub Repo stars GitHub release (latest by date) hacs_badge

Validate with hassfest

GitHub contributors Maintenance GitHub commit activity GitHub commits since tagged version GitHub last commit

installation_badge

ZTE Router Integration for Home Assistant

Component to integrate some ZTE routers as a device trackers in home assistant.

Features

  • Provides a device_tracker to monitor the connection status of devices in your Wifi and LAN ports.
  • Exposes the status of the scanner in "sensor.zte_tracker".
  • Exposes the service "zte_tracker.pause" to pause/resume the scanner because when the scanner is running the web-admin-console sessions are cancelled.

Compatible routers

Name Model Param
ZTE F6640 F6640
ZTE F6645P F6640P
ZTE H169A H169A
ZTE H2640 H2640
ZTE H288A H288A
ZTE H388X H388X
ZTE H3600P H3600P
ZTE H3640 V10 H3640
ZTE H6645P V2 H6645P

This integration could work with more routers. Try one of the above and see if it works with yours.

Installation

To use this integration, place the following snippet in configuration.yaml.

# Setup the platform zte_tracker
zte_tracker:
     host: 192.168.1.1
     model: F6640
     username: user
     password: !secret zte_password
     interval_seconds: 60
     consider_home: 180
     poll_time: 60
     new_device_defaults:
       track_new_devices: no

Change the following parameters to match your configuration:

host: Your router's local IP address (Usually 192.168.1.1 or 192.168.0.1)

username: Your router's login username (Usually admin)

password: Your router's login password

model: Your router's model. Chose one from the Model column of the table above

For more information about the device_tracker parameters visit the official Home Assistant Documentation

Contributors

  • Thanks to @gselivanof for H288A, H169A models support, @TrinTragula for H388X verification, @kvshino for H2640 verification, @dapuzz for G6645P verification, @onegambler for H3600P verification, @lapo for H6645P verification, @309631 for H3640 verification.

zte_tracker's People

Contributors

juacas avatar selivanof avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

zte_tracker's Issues

track_new_devices: no doesn't seem to be honored on 2024.1.3

As per title, whatever configuration I put in configuration.yaml the integration works but keeps tracking all new devices.
There doesn't seem to be a way to make it honour the track_new_devices: no setting. zte_tracker is the only active tracker and is the first one defined in configuration.yaml.

Version:
Core 2024.1.3
Supervisor 2023.12.0
Operating System 11.4
Frontend 20240104.0

Config:
zte_tracker
host: 192.168.1.1
model: H2640
username: admin
password: ********************
interval_seconds: 60
consider_home: 180
poll_time: 60
new_device_defaults:
track_new_devices: false (tried also False and no)

Works for H6645P V2

I'm using model param H388X which works nicelly for H6645P V2 (italian ISP Dimensione stock router).

H388X - Working fine

I have tried the H288A configuration on a H388X model and it's working fine. You may want to include it in the list of supported devices.
This information may be important for other people like me trying to make Home Assistant work with a router provided by the most popular italian telco provider, TIM.

Thanks for your work!

Error during setup of component zte_tracker

Hello,

After update Home Assistant core to 2024.05 integration zte_tracker stopped work.

I can see this error in logs.

Log details (ERROR)
Logger: homeassistant.setup
Source: setup.py:404
First occurred: 12:05:04 PM (1 occurrences)
Last logged: 12:05:04 PM

Error during setup of component zte_tracker
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 404, in _async_setup_component
result = await task
^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/zte_tracker/init.py", line 68, in setup
hass.async_create_task(
File "/usr/src/homeassistant/homeassistant/core.py", line 816, in async_create_task
self.verify_event_loop_thread("async_create_task")
File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread
frame.report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report
_report_integration(what, integration_frame, level, error_if_integration)
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration
raise RuntimeError(
RuntimeError: Detected that custom integration 'zte_tracker' calls async_create_task from a thread at custom_components/zte_tracker/init.py, line 68: hass.async_create_task(. Please report it to the author of the 'zte_tracker' custom integration.

What could be done to resolve this?

Thanks in advance

ZTE H288A attributes

Hi, Home Assistant 2023.9.1. In overview I get

zte_tracker: on

When visiting details in attributes I get

Scanning: false
Devices
Num devices: 0
Statusmsg: Failed login: Empty sess_token. Device locked?

In configuration.yaml I have

zte_tracker:
host: 10.20.31.254
model: H288A
username: admin
password: !secret zte_password
interval_seconds: 60
consider_home: 180
poll_time: 60
new_device_defaults:
track_new_devices: yes

(of course the zte_password line is present in secrets.yaml)

and I can login and control my router fine from a browser in the above IP.

So I don't know why I get that "Failed login: Empty sess_token. Device locked?" and no devices number.
Any thoughts?

It's working for F6645P as well!!

Hi Jucas, the component is working fine for model F6645P (Wind stock router in Italy)

# Synonym F6645P is like F6640
_MODELS['F6645P'] = _MODELS['F6640']

Thanks a lot for your work. Bye

not showing ip

zte H388X working ok, and all devices added to known_devices.yaml,
but no ip adresses are shown, only mac and name when available.

entity states attributes are:
source_type: router
latitude: .......
longitude: ......
gps_accuracy: 0
scanner: zteDeviceScanner
icon: mdi:router-wireless
friendly_name: ......

is it possible to have also ip address shown?
device_tracker entities are read only, can we have them write also so can change them from ui?

Invalid config after updating Home Assistant to 2024.05

After updating HA Core to 2024.05 the following error message started showing up

`Logger: homeassistant.setup
Source: setup.py:404
First occurred: May 15, 2024 at 06:03:52 (1 occurrences)
Last logged: May 15, 2024 at 06:03:52

Error during setup of component zte_tracker
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 404, in _async_setup_component
result = await task
^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/zte_tracker/init.py", line 68, in setup
hass.async_create_task(
File "/usr/src/homeassistant/homeassistant/core.py", line 816, in async_create_task
self.verify_event_loop_thread("async_create_task")
File "/usr/src/homeassistant/homeassistant/core.py", line 440, in verify_event_loop_thread
frame.report(
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 162, in report
_report_integration(what, integration_frame, level, error_if_integration)
File "/usr/src/homeassistant/homeassistant/helpers/frame.py", line 203, in _report_integration
raise RuntimeError(
RuntimeError: Detected that custom integration 'zte_tracker' calls async_create_task from a thread at custom_components/zte_tracker/init.py, line 68: hass.async_create_task(. Please report it to the author of the 'zte_tracker' custom integration.`

Config error on YAML check

When the code model: ZTE H169A H169A is used the config check requires the code H196A to be used. This just appears to be transposed codes for correction

H2640 works fine

Hi,
I've tried this with my H2640 with the H388X conf and works fine! ;)

ZTE MF286D - Guide to include

Is there a documented process on how to allow your integration to be adapted to another ZTE router? How would you go about assisting your project to include another ZTE unit, what do you need?

M

Compatibility with HA 2021

After installing your plugin in HACS, I'm unable to restart Home Assistant. Could it be due to my HA version being too old? (Home Assistant 2021.12.4)
PixPin_2024-04-15_22-20-20

Could you give me some help?

Originally posted by @1tonsilla in #17 (comment)

H388X parameter invalid? Shouldn't it be supported??

I get this error:
Invalid config for [zte_tracker]: value must be one of ['F6640', 'H196A', 'H288A'] for dictionary value @ data['zte_tracker']['model']. Got 'H388X'. (See /config/configuration.yaml, line 264).

with this config:
zte_tracker:
host: 192.168.1.1
model: H388X
username: xxxxxx
password: xxxxxx
interval_seconds: 60
consider_home: 180
poll_time: 60
new_device_defaults:
track_new_devices: no

why?

ZTE MF289F

Is it possible to use this integration to access the router ZTE MF289F?
There is no username for this router to login. I'd like to be able to restart it via software.
If you need anything to see if there is this possibility, please let me know!

H3600P supported and issue with configuration

Hi I just wanted to share 2 things:

  • Model H3600P as well - I am using the same configuration as H388X

  • I am unable to change some configuration parameters

For example the following:

   zte_tracker:
   host: 192.168.1.1
   model: H388X
   username: a_username
   password: a_password
   interval_seconds: 2
   consider_home: 12
   track_new_devices: false
   new_device_defaults:
     track_new_devices: false

Will

  • Keep adding new devices to the known devices with track: true
  • Keep considering home for 180 seconds (or more)

Am I doing something wrong?

Thanks

Help MC888

Does anyone know how to configure an MC888 Model?

H267A support

hi thank you for this great repo. i tried to write H267A to model but it wasnt possible to test. it gave an error. its probably going to work if i can change the name? so how can i make that possible?

H3640 V10 working

My config was:

# Setup the platform zte_tracker
zte_tracker:
     ...
     model: H6645P
     ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.