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

open_door command always uses persisted serial_number #31

Open
matejbart opened this issue Nov 23, 2024 · 12 comments
Open

open_door command always uses persisted serial_number #31

matejbart opened this issue Nov 23, 2024 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@matejbart
Copy link

Description

Hi @AzonInc ,

I have updated to the latest v1.5.0 and the open_door command no longer works (for my outer station) because the command is now built differently (with the internal station's serial_number):

case COMMAND_TYPE_OPEN_DOOR:
if(serial_number == 0)
{
command |= (1 << 12); // 1
command |= (1 << 8); // 1
command |= (address & 0x3F); // 00
}
else
{
command |= (1 << 28); // 1
command |= ((serial_number & 0xFFFFF) << 8); // C30BA
command |= (1 << 7); // 8
command |= (address & 0x3F); // 0
}
break;

The firmware always tries to pass the persisted serial_number to the buildCommand (if it's not set by the caller or if it's just 0).

I therefore modified the protocol.cpp by building the open_door without the serial_number and that solves the problem for me.

I'm just curious why the composition of that command has changed, is this necessary for any other model types? (I'm using a ISH 1030 internal station).

Another thing that I have noticed is the last byte of the open_door command: In the case without the serial_number the address has no longer the leading 8.

For example, my internal station always sends 1180, but that is no longer possible (even though 1100 works just fine). However, since COMMAND_TYPE_STOP_TALKING_DOOR_CALL also uses the 8, I was wondering if this should be aligned with the open_door cmd as well.

Best regards,
Matej

Logs

No response

If you're using an ESPHome YAML config, which version of ESPHome are you running?

2024.11.1

ESPHome Config

No response

@matejbart matejbart added the bug Something isn't working label Nov 23, 2024
@AzonInc
Copy link
Owner

AzonInc commented Nov 24, 2024

I'm just curious why the composition of that command has changed, is this necessary for any other model types?

I just noticed that this could be a streamlined way of building this command while looking at the protocol definitions. But it's most probably not necessary I guess.

Another thing that I have noticed is the last byte of the open_door command: In the case without the serial_number the address has no longer the leading 8.

I couldn't find any definition of that byte in the protocol definitions. That's why I didn't implement it.

We could just remove the long version of the open door command or include a flag to use the king version but when it's not set always use the short 11xx version.

Another question: Could it be related to your outdoor station changing its address? #32
Because that will also cause the command (with serial number) to fail. But as u send 1100 with address 0, which works, it's not related to the address.

@matejbart
Copy link
Author

I just noticed that this could be a streamlined way of building this command while looking at the protocol definitions.

Are you referring to the cmd langer Türöffner from the protocol definitions (starting from line 250)?

From my humble understanding I believe this command serves a different purpose, maybe to keep doors opened until another command is issued (even though I couldn't find such a command). However, in my case the outdoor station uses a door opener relay ("buzzer") to open the door, so I think that the langer Türöffner is simply not designed to work with this setup. (But please correct me if I'm wrong, maybe this works at your outdoor station?)

Furthermore, as all the other indoor stations always just use the 11XX command, I would basically prefer to stick with that and try to mimic the behavior of the indoor stations as good as possible.

I couldn't find any definition of that byte in the protocol definitions. That's why I didn't implement it.

It seems that an 8 (in hex) denotes that the address is coming or targeting an outdoor unit, and when it's 4 then it's from an indoor station. It's the bit before the 6-bit address (definitions starting from line 139 for example, but this is also valid for the 3xxx cmds as well).

We could just remove the long version of the open door command or include a flag to use the king version but when it's not set always use the short 11xx version.

Sounds good, I just think that using the "long" version should probably not be the default option.

Another question: Could it be related to your outdoor station changing its address? #32

No, the "changing address" thing happened afterwards.

But as u send 1100 with address 0, which works, it's not related to the address.

It's really interesting that even though the outer stations address has changed, sending 1100, 1180 and 1181 still works. Maybe there is a setting in the outdoor stations unit to always react on 11xx`?

@AzonInc
Copy link
Owner

AzonInc commented Nov 24, 2024

Are you referring to the cmd langer Türöffner from the protocol definitions (starting from line 250)?

Yea, that's the one. Here in this building they also have the door buzzer and probably the same control unit as in urs (there is only option as far as I know). Here it worked just fine (also at other peoples setup) so I thought implementing it is fine but I will remove the serial number version.

It seems that an 8 (in hex) denotes that the address is coming or targeting an outdoor unit, and when it's 4 then it's from an indoor station. It's the bit before the 6-bit address (definitions starting from line 139 for example, but this is also valid for the 3xxx cmds as well).

I'm not sure if an outdoor station is opening the door itself (at least I've never seen an outdoor station sending 11xx by itself, but never say never).
For the 3xxx its just the door readiness flag to pickup calls (after ringing)

It's really interesting that even though the outer stations address has changed, sending 1100, 1180 and 1181 still works. Maybe there is a setting in the outdoor stations unit to always react on 11xx`?

If there are two outdoor stations 1100 won't work for both of them (tested).

@AzonInc
Copy link
Owner

AzonInc commented Nov 24, 2024

It's changed in 2024.11.2

@AzonInc
Copy link
Owner

AzonInc commented Nov 25, 2024

Can I close this or do we still need to do smth here?

Oh and btw. I just called the TCS technical support hotline and they told me that the 32 bit open door command is the same as the 16 bit one and should always work. However the short one does not always work when there is set a restriction to specific serial numbers.

There is an option to limit which indoor stations are allowed to open the outdoor station.

@matejbart
Copy link
Author

Thx for the update, and yes I have also seen in the manual of the service device that there is a difference between the short and long open door command, but I couldn't figure out which command to send to check if the limitation on the outer station is active or not, maybe this is something that can be only programmed via the configo software?

@AzonInc
Copy link
Owner

AzonInc commented Nov 25, 2024

Thx for the update, and yes I have also seen in the manual of the service device that there is a difference between the short and long open door command, but I couldn't figure out which command to send to check if the limitation on the outer station is active or not, maybe this is something that can be only programmed via the configo software?

Yes that's what the guy told me today, it's an advanced feature only configurable via configo.

@matejbart
Copy link
Author

Just for the sake of documentation, the online configo manual reveals that the setting Lange Türöffnerfunktion als Rufprotokoll is set on the control unit (and not the outer unit as I have wrongly guessed before), it would be just interesting to figure out how the internal stations know that the long command should be used - this could be also tracked by the firmware and adjusted automatically.

Another thing worth noting is that the outer stations have a setting to only allow the open door command to be "executed" while being in Türbereitschaft or even only during a voice call, but this seems to be deactivated by default.

@AzonInc
Copy link
Owner

AzonInc commented Nov 26, 2024

Another thing worth noting is that the outer stations have a setting to only allow the open door command to be "executed" while being in Türbereitschaft or even only during a voice call, but this seems to be deactivated by default.

Some have it enabled which is quite annoying because it prevents the open door button to work properly.

it would be just interesting to figure out how the internal stations know that the long command should be used - this could be also tracked by the firmware and adjusted automatically.

I have a TCS test system at home so I could try whatever but I just need to know what.

@matejbart
Copy link
Author

I have a TCS test system at home so I could try whatever but I just need to know what.

As you have mentioned in #32 (comment) that your TCS system starts to use the long_door command after the control button of any internal station is hit. Does every other indoor station react on that command immediately, or does it need to be called out by the outer station first?

Because if it's the latter, then this information - that the indoor stations need to use the long_door command - must be somehow encoded in the door call command.

@AzonInc
Copy link
Owner

AzonInc commented Nov 27, 2024 via email

@matejbart
Copy link
Author

ok, then I think we're done here 👍 feel free to close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants