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

There is no device when adding local management #3

Open
Xopek1986 opened this issue Sep 1, 2024 · 14 comments
Open

There is no device when adding local management #3

Xopek1986 opened this issue Sep 1, 2024 · 14 comments

Comments

@Xopek1986
Copy link

IMG_20240901_101007
IMG_20240901_101040
The switch is located on a local network. It is being added, but there are no control devices

@slydiman
Copy link
Owner

slydiman commented Sep 1, 2024

I have tested the integration on GPS204 v6.0.231024. What is the firmware version of your device?

Is the same device added locally and via the cloud? Try to remove both records and add only the local record.
If the integration can detect the device during the local adding everything must work.

Try to edit the file /config/sscpoe/custom_component/ssscpoe/protocol.py. Look at lines 459 and 480. Remove the symbol # before the command LOGGER.info(). Then restart Home Assistant, try to remove and add the device locally again and provide the logs around SSCPOE messages.

@Xopek1986
Copy link
Author

Model: GPS204
Software version: 6.0.231024
I tried deleting the cloud option and the local one. I deleted the integration from the home assistant. I installed it again. I set up only local management.

@slydiman
Copy link
Owner

slydiman commented Sep 1, 2024

  1. Download the new version 2024.09.01

  2. Enable debug logs
    Screenshot 2024-09-01 175957

  3. Add the device and provide SSCPOE logs
    Screenshot 2024-09-01 180204

@Xopek1986
Copy link
Author

Xopek1986 commented Sep 1, 2024

I am attaching a log file and screenshots...
home-assistant_sscpoe_2024-09-01T16-03-00.912Z.log
Снимок экрана 2024-09-01 200244
Снимок экрана 2024-09-01 200258

@slydiman
Copy link
Owner

slydiman commented Sep 2, 2024

I see the following in logs:

Searching in 0.015 seconds:

2024-09-01 20:01:45.960 SSCPOE_local_send: {'cmd': 'calludp', 'syn': 'besDYHt9', 'data': {'callcmd': 'search'}}
2024-09-01 20:01:45.975 SSCPOE_local_recv: {'syn': 'besDYHt9', 'data': {'ip': '192.168.10.204', 'sn': 'GPS2040**************A395GG', 'mac': '54**********D4', 'model': 'GPS204', 'Active_state': 'active'}, 'ack': 'calludp'}

Login is OK in 0.016 seconds:

2024-09-01 20:01:54.408 SSCPOE_local_send: {'cmd': 'calludp', 'syn': 'gT3vDdLG', 'data': {'callcmd': 'Security verification', 'password': '123456', 'sn': 'GPS2040**************A395GG', 'command': 'login'}}
2024-09-01 20:01:54.424 SSCPOE_local_recv: {'syn': 'gT3vDdLG', 'data': {'callcmd': 'Security verification', 'login': 'success'}, 'ack': 'calludp'}

The problem is here - no response to the detail request within 1 second:

2024-09-01 20:01:54.430 SSCPOE_local_send: {'cmd': 'calludp', 'syn': 'JMnGsltd', 'data': {'callcmd': 'detail', 'sn': 'GPS2040**************A395GG'}}
2024-09-01 20:01:55.438 SSCPOE_local_request: Timeout

The behavior is the same as unactivated device. But we can see 'Active_state': 'active' in the first response.
No idea what is wrong.
Try the following:

  1. Update the integration to v2024.09.02

  2. Try to reset the device to factory settings using Windows management app
    Screenshot 2024-09-02 094843

  3. You must see that the device is not activated
    Screenshot 2024-09-02 095731

If it does not help, try to add the device to the mobile app by QR code and then remove them.

  1. Add the device to the integration. I have added the own activation procedure.

If nothing will help, I can increase the request timeout to 2 seconds. But we saw that the device can response in 0.015 seconds.

@Xopek1986
Copy link
Author

Xopek1986 commented Sep 2, 2024

According to your instructions in the post above. I did everything point by point, it didn't help

I am attaching a log file...
2024-09-02 220822
home-assistant_sscpoe_2024-09-02T18-03-59.500Z.log

@slydiman
Copy link
Owner

slydiman commented Sep 2, 2024

I see custom_components.sscpoe.coordinator.ApiAuthError: Please conduct security verification first in the log. It means that device is not activated. But you did not delete the device in the integration. I have updated the integration to reactivate already exists devices. Download v2024.09.03 and restart Home Assistant. I recommend to delete any SSCPOE records anyway and add the device again. The device must be activated.

If it will not help, it is necessary to check that IGMPv2 is enabled and works correctly on your Wi-Fi router.

@Xopek1986
Copy link
Author

IGMPv2 is enabled on the router. I have HA installed via Proxmox. Maybe he doesn't allow multicast packages...

@slydiman
Copy link
Owner

slydiman commented Sep 4, 2024

No idea what is wrong.
The device responses for searching and activate/login locally, but does not response for the details request.
Add the device to the cloud and be sure it works correctly.

@Xopek1986
Copy link
Author

Xopek1986 commented Sep 4, 2024

The cloud is working. ports are disabled, port speed is adjusted, etc. So everything is fine via the local network from the application to the PC.

I'll try to install a backup router by the weekend. I will unsubscribe from the test...

@slydiman
Copy link
Owner

slydiman commented Sep 5, 2024

Try to change TTL in the file /config/custom_components/sscpoe/protocol.py, line 447

sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 2)

to

sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 32)

@Xopek1986
Copy link
Author

The TTL has been changed to 32. The device has been added. but the timeout is not stable.
Screenshot_2024-09-05-20-16-06-950_io homeassistant companion android-edit

@slydiman
Copy link
Owner

slydiman commented Sep 5, 2024

Probably something is wrong with IGMPv2 on your router or some other devices conflict with the sscpoe switch. Try to disable IPTV on the router. BTW, what is the model and version of your router? Try to update the router firmware.

@Xopek1986
Copy link
Author

The router model is Asus TUF-3000 V2. The firmware from Merlin 3004.388.8_2_gnuton1_tuf (not official). iptv is turned off.
Screenshot_2024-09-06-06-35-59-333_com android chrome

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

2 participants