Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

Behaviour of v6 gateway #4

Open
partydiktator opened this issue Jul 14, 2021 · 10 comments
Open

Behaviour of v6 gateway #4

partydiktator opened this issue Jul 14, 2021 · 10 comments

Comments

@partydiktator
Copy link

I did some more package capturing when controlling my blinds using the Android IQONTROL NEO app. Here is what i found out about v6 gateways:

Like i already mentioned in #3 , the v6 gateway is not broadcasting a lot of information via UDP - it only sends a broadcast after a blind is fully closed or fully opened. Instead, the android app keeps polling states via two commands:

  • http://192.168.6.170/cmd?XC_FNC=refreshSC&adr=06&type=ER&at=39863c7d69245324364716db638e320c returning {"XC_SUC":{"type":"ER","sid":"06","adr":"06","state":"1001","ts":{"m":"60EDB8F6"}}}

  • the XC_FNC=GetStates command

The XC_FNC=refreshSC command returns the same output wether you pass the at=39863c7d69245324364716db638e320c parameter or not

@partydiktator
Copy link
Author

Furthermore, the android app keeps polling system information using a http://192.168.6.170/info request. This returns all sort of output like networking settings, serial number, hardware information etc. and could probably be used to find out, which gateway version is in use.

@partydiktator
Copy link
Author

Also, the v6 gateway supports two intermediate positions for blinds called "shadow position" and "air position". After you set the positions using the android app you can control them using these commands:

http://192.168.6.170/cmd?XC_FNC=SendSC&type=ER&data=020B for shadow position
http://192.168.6.170/cmd?XC_FNC=SendSC&type=ER&data=020A for air position

@andyboeh
Copy link
Owner

Does

http://192.168.6.170/cmd?XC_FNC=refreshSC&adr=06&type=ER&at=39863c7d69245324364716db638e320c returning {"XC_SUC":{"type":"ER","sid":"06","adr":"06","state":"1001","ts":{"m":"60EDB8F6"}}}

refresh the state via RF, i.e. it resynchronizes to the remote control if you change a blind there? If yes, then it has the same purpose as XC_FNC=refreshER on the v4.

The command

http://192.168.6.170/info

returns an empty output on the v4. Its equivalent is most probably XC_FNC=GetSI on the v4. Could you check whether this reports the same information on your gateway?

Also, the v6 gateway supports two intermediate positions for blinds called "shadow position" and "air position".

This is supported by my blinds, but even on the original remote, I have to press "down" again once the blinds are fully closed to get the "air" position. Calling 0B and 0A just moves my blinds up and down. Anyway, the available positions are limited by what Home Assistant supports: https://www.home-assistant.io/integrations/cover.mqtt/

The biggest problem I'm facing with this is: I do not have a v6 gateway, so I can't easily fix things or add new features just for the v6. I'd be happy if you could create a PR with the relevant changes.

@partydiktator
Copy link
Author

Does XC_FNC=refreshSC refresh the state via RF, i.e. it resynchronizes to the remote control if you change a blind there? If yes, then it has the same purpose as XC_FNC=refreshER on the v4.

Unfortunatley, i cannot check this as the remote i'm using (VarioTel 2) is not giving me any feedback on the information it might receive or store (there is no display on VarioTel 2).

The command http://192.168.6.170/info returns an empty output on the v4. Its equivalent is most probably XC_FNC=GetSI on the v4. Could you check whether this reports the same information on your gateway?

While the XC_FNC=GetSI command is still supported on the v6, its output is quite different than http://192.168.6.170/info. Anyway, it's fine to use XC_FNC=GetSI also for the v6 gateway. My v6 mini gateway seems to be hardwareversion "HWV":"C4" btw.

This is supported by my blinds, but even on the original remote, I have to press "down" again once the blinds are fully closed to get the "air" position. Calling 0B and 0A just moves my blinds up and down.

On my gateway 0B and 0A also work if the blinds are fully closed.

The biggest problem I'm facing with this is: I do not have a v6 gateway, so I can't easily fix things or add new features just for the v6. I'd be happy if you could create a PR with the relevant changes.

I'm aware of that, but unfortunatley my only contribution to your much appreciated work can be helping by debugging and gathering information about the v6 gateway, as i'm not really able to code. Anyway, i can read your code so i might give it a shot one day. ;-)

@andyboeh
Copy link
Owner

Unfortunatley, i cannot check this as the remote i'm using (VarioTel 2) is not giving me any feedback on the information it might receive or store (there is no display on VarioTel 2).

That's no problem:

  1. Get the state of the blind via the API first (i.e. XC_FNC=GetStates)
  2. Drive one blind via the Remote Control and wait until it has reached its full stop position
  3. Check the state via the API (i.e. XC_FNC=GetStates). I suppose it is wrong.
  4. Check if XC_FNC=refreshSC updates the blind position on the Mediola, either immediately or after a subsequent call to XC_FNC=GetStates

On my v4, the position on the Mediola is only correct after issuing XC_FNC=refreshER.

@partydiktator
Copy link
Author

I did like you said and same here: when driving blinds using a remote control the position von the v6 gateway is only correct after issuing XC_FNC=refreshSC

@andyboeh
Copy link
Owner

OK, I tried to summarize the relevant commands on the Wiki, could you check and expand it for the v6?

https://github.com/andyboeh/mediola2mqtt/wiki

This will make implementation easier.

@partydiktator
Copy link
Author

I think you have to give me permission to edit the Wiki

@andyboeh
Copy link
Owner

Right, I changed permissions just now!

@partydiktator
Copy link
Author

Could you tell me the output of the XC_FNC=GetStates&config=1 command on your v4 gateway so i can compare it to the output of my v6?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants