At this moment get_serial_number is implemented in different ways.
HTTP and TCP use a special packet to get it. This packet seems to be part of the protocol used by EasyMP and iProjection software.
Serial uses the ESC/VP21 SNO? command.
It seems these methods return different values.
HTTP and TCP take 8 bytes/characters from the returned packet while the value returned by SNO seems to be 11 characters.
It might even be that the value in the special packet contains the projector name instead of a serial number.
This is based on info in this repo. The protocol.md only mentions projector name. Looking at the Wireshark captures in that repo the bytes that are extracted contain data like 45 42 31 42 38 38 34 45 which is EB1B884E in ascii. That looks similar to the default projector name for my LS11000W which is EB63EC94. These seem to only have hex characters (0-9A-F). It also seems that these characters are not related to the mac address. I can also change the projector name which would probably change that value.
But since my projector does not support the special packet I can not verify.
For comparison; SNO? returns a value like XATC5600048 for my LS11000W, other examples I found are NPCF1Y0202L and SPGF340554L, so these contain non-hex characters and are 11 long.
This causes a few issues.
- When changing the used connection from Serial to HTTP or TCP the serial number will change so Home Assistant will see it as a different device. It is currently not possible to change the connection type in Home Assistant, but it is something I wanted to build because I want to switch from serial to http or tcp on my projector to remove the need for the tcp-to-serial convertor that is currently being used.
- Some projectors do not support the special packet (e.g. LS11000W), but do support SNO. However just changing the implementation to SNO will break existing configurations in Home Assistant because the serial number will change.
- If the value in the special packet is indeed the projectorname it is not a stable identifier to use in Home Assistant.
It is unclear why the special packet approach was chosen for HTTP and TCP and SNO for Serial (other than that Serial can not do a socket). I guess the special packet existed before SNO was introduced for serial.
This issue is mostly for documenting the findings. Not sure what a solution would be yet. I am leaning towards the future moving to using SNO?. The command is a normal ESC/VP21 command, works when the projector is off and is a stable serial number. It also works on all protocols, so one way for all. This is assuming that all projectors support SNO, it would be nice to get some data on that. But this would need some thought on how to allow migration in some way to avoid breaking peopels setup in Home Assistant.
At this moment
get_serial_numberis implemented in different ways.HTTP and TCP use a special packet to get it. This packet seems to be part of the protocol used by EasyMP and iProjection software.
Serial uses the ESC/VP21
SNO?command.It seems these methods return different values.
HTTP and TCP take 8 bytes/characters from the returned packet while the value returned by SNO seems to be 11 characters.
It might even be that the value in the special packet contains the projector name instead of a serial number.
This is based on info in this repo. The protocol.md only mentions projector name. Looking at the Wireshark captures in that repo the bytes that are extracted contain data like
45 42 31 42 38 38 34 45which isEB1B884Ein ascii. That looks similar to the default projector name for my LS11000W which isEB63EC94. These seem to only have hex characters (0-9A-F). It also seems that these characters are not related to the mac address. I can also change the projector name which would probably change that value.But since my projector does not support the special packet I can not verify.
For comparison; SNO? returns a value like
XATC5600048for my LS11000W, other examples I found areNPCF1Y0202LandSPGF340554L, so these contain non-hex characters and are 11 long.This causes a few issues.
It is unclear why the special packet approach was chosen for HTTP and TCP and SNO for Serial (other than that Serial can not do a socket). I guess the special packet existed before SNO was introduced for serial.
This issue is mostly for documenting the findings. Not sure what a solution would be yet. I am leaning towards the future moving to using
SNO?. The command is a normal ESC/VP21 command, works when the projector is off and is a stable serial number. It also works on all protocols, so one way for all. This is assuming that all projectors support SNO, it would be nice to get some data on that. But this would need some thought on how to allow migration in some way to avoid breaking peopels setup in Home Assistant.