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

Request: Fallback To Manual IP Entry On Discovery Fail #9

Open
danieledwardgeorgehitchcock opened this issue Aug 8, 2023 · 5 comments

Comments

@danieledwardgeorgehitchcock

Hi,

I run my HA instance and IOT network in separate VLANs, HA also runs in an isolated Docker container as such, the automated discovery for this integration does not work for me.

Would it be possible to add the facility to manually add the IP of my T-Smart device as a fallback?

@PistolPeteUK
Copy link

PistolPeteUK commented Oct 2, 2023

+1. HA is on my LAN and my thermostat is on my IOT VLAN.

@andrzej-r
Copy link

Please. I had to change the whole network only to add this single device. In this line I see autodiscovery broadcasts all devices on the single network - nice convenience feature for getting things work out of the box but it breaks with VLANS or separate L3 networks.

@andrzej-r
Copy link

This is very hacky but it has solved my problem. At one point the sensor stopped communicating with m container completely.

In this file:
/usr/local/lib/python3.11/site-packages/tsmart/tsmart.py

change the line 54 to use an actual IP address instead of the broadcast one:

await stream.send(message, ("192.168.1.2", UDP_PORT))

@pdw-mb
Copy link
Owner

pdw-mb commented Feb 11, 2024

I'm sorry I've not made any progress on this, as given the total lack of security on these things, running on a separate network/VLAN makes a lot of sense!

Unfortunately, I've really struggled to understand how to do this in HA. We're currently using the config_entry_flow.register_discovery_flow helper from HA, which as far as I can tell, doesn't have any way to provide user input if discovery fails.

Also, the module currently stores no state: it just rediscovers devices each time its started. To support this, we'll also need to store the entered IP, which I also don't know how to do.

Hints and PRs gratefully received :-)

@andrew-codechimp
Copy link

andrew-codechimp commented Mar 16, 2024

Hi, just looking at this integration as I'm about to get a T-Smart myself.
I've created some integrations myself, particularly Battery Notes and already solved some of the bits you're having trouble with, but I'm no means a HA expert and understand it's hard with the lack of documentation.

Happy to help improve this as and when I've got free time but notice you don't have a VS Code dev container environment within your project. Are you happy for me to add the required config files for this to your project? It won't get in the way of how you develop now but for anyone with VS Code/Docker it creates a nice HA dev instance with debug capabilities.

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

5 participants