dib0 / elro_connects

The ELRO Connects uses a propriety protocol on the local network over UDP. This is the reversed engineered python implementation of the protocol.
MIT License
16 stars 7 forks source link

DEVICE_NAME_REPLY is handled as unregistered_name when unknown device #22

Closed Skons closed 2 years ago

Skons commented 2 years ago

Why is a device registered as unregistered_name when it is not known as a device? https://github.com/dib0/elro_connects/blob/be9a7280fd267e87e917e077c15cfe501afdbcee/elro/hub.py#L216

When I spin up ELRO Connects I also got the same issue as #18. Only DEVICE_STATUS_UPDATE and DEVICE_ALARM_TRIGGER are used as valid inputs for creating a device. If DEVICE_NAME_REPLY is received with a device that is not known, shouldn't it be registered as new device? If the hub presents a device, I think it is not an unregistered_name, but a real device coming from the hub.

Skons commented 2 years ago

I found why, if the name is not known it will be set by this command https://github.com/dib0/elro_connects/blob/be9a7280fd267e87e917e077c15cfe501afdbcee/elro/hub.py#L219 🤦‍♂️