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

Version 2.2 & groups #32

Open
jjpeet opened this issue Aug 5, 2022 · 15 comments
Open

Version 2.2 & groups #32

jjpeet opened this issue Aug 5, 2022 · 15 comments

Comments

@jjpeet
Copy link

jjpeet commented Aug 5, 2022

Hi @mtgeekman thanks for all your work on this one.

I just had some clarification questions regarding your v2.2 comments.

Until now I've created three blinds for one room which has two blinds in it - Lounge Left Blind, Lounge Right Blind and Lounge Blind which uses the room code. Mostly use this room code based one.

In your comments, were you saying I should stop doing it this way, and instead use HA groups configuration for that room code based one? Please see my config below.

Thx
James

# COVERS
cover:
  - platform: neosmartblinds
    name: Lounge Left Blind
    host: xx.xx.xx.xx
    hub_id: xxxxxxxxxxxxxxxxxx
    protocol: tcp
    port: 8839
    blind_code: 030.117-01
    close_time: 21.47
    rail: 1
    percent_support: 2
    motor_code: wt
    # start_position: 50
  - platform: neosmartblinds
    name: Lounge Right Blind
    host: xx.xx.xx.xx
    hub_id: xxxxxxxxxxxxxxxxxx
    protocol: tcp
    port: 8839
    blind_code: 030.117-00
    close_time: 21.47
    rail: 1
    percent_support: 2
    motor_code: wt
    # start_position: 50
  - platform: neosmartblinds
    name: Lounge Blind
    host: xx.xx.xx.xx
    hub_id: xxxxxxxxxxxxxxxxxx
    protocol: tcp
    port: 8839
    blind_code: 030.117-15
    close_time: 21.47
    rail: 1
    percent_support: 2
    motor_code: wt
    # start_position: 50
@gee-jay-bee
Copy link
Collaborator

I planned to add an example to the readme, hadn't got to it yet. Based on my setup, I think your config could be something like this:


cover:
  - platform: neosmartblinds
    name: Lounge Left Blind
    host: xx.xx.xx.xx
    hub_id: xxxxxxxxxxxxxxxxxx
    protocol: tcp
    port: 8839
    blind_code: 030.117-01
    close_time: 21.47
    rail: 1
    percent_support: 2
    motor_code: wt
    # start_position: 50
    parent_group: &lounge_blind_code 030.117-15
  - platform: neosmartblinds
    name: Lounge Right Blind
    host: xx.xx.xx.xx
    hub_id: xxxxxxxxxxxxxxxxxx
    protocol: tcp
    port: 8839
    blind_code: 030.117-00
    close_time: 21.47
    rail: 1
    percent_support: 2
    motor_code: wt
    # start_position: 50
    parent_group: *lounge_blind_code
  - platform: group 
    name: Lounge Blind
    entities:
      - cover.lounge_right_blind
      - cover.lounge_left_blind

Using the group should automatically use the parent_group code.

@jjpeet
Copy link
Author

jjpeet commented Aug 5, 2022

Great thanks - will give it a go.
Thx
JP

@vexter0944
Copy link

I used the code above and by gee-jay-bee - and it 'works' but sometimes 2 shades go up, sometimes 3, sometimes 4 (I only have 4 in this room) - I've tried just parent group and the code above - same results. Am I missing something?

@gee-jay-bee
Copy link
Collaborator

Do the blinds that go up all start moving at the same time or is there a delay between them?

@vexter0944
Copy link

It appears that the ones that are going up are all going at the same time. If there's any logs I can look for (either on the neo hub or in HASS) - let me know and I'll try to find them. I was planning on trying to ratchet up the logs for the neosmartblinds integration to see if I could see anything more today. I appreciate the help!

@gee-jay-bee
Copy link
Collaborator

The integration emits some (hopefully) useful logs at debug level so worth setting that and repeating the test.

The hub logs are not something we can access but their support team can look if we can't find anything in the integration logs (one of them is on discord).

If the group blinds are all starting and stopping to move at the exact same time then it sounds like the group code is being used and that might suggest some of the blinds aren't always "hearing" the command perhaps? If they start moving one after another then the group behaviour is failing ... hopefully logs will help figure this out

@vexter0944
Copy link

vexter0944 commented Aug 11, 2022 via email

@vexter0944
Copy link

vexter0944 commented Aug 11, 2022 via email

@gee-jay-bee
Copy link
Collaborator

I'm struggling to read the log on my phone but I would expect one of the blinds to be nominated to take care of sending the command to the group whilst the others only track the state and don't send a command to the hub. This is the "aggregation" into one command.

For a thinner log, you could try something like this:

logger: 
  default: error 
  logs: 
    custom_components.neosmartblinds: debug

@vexter0944
Copy link

better logs:

2022-08-12 20:15:49.691 DEBUG (MainThread) [custom_components.neosmartblinds.neo_smart_blind] 131.146-02, checking for aggregation 131.146-15
2022-08-12 20:15:49.691 DEBUG (MainThread) [custom_components.neosmartblinds.neo_smart_blind] dn, observing blind commands for 0.250s
2022-08-12 20:15:49.691 DEBUG (MainThread) [custom_components.neosmartblinds.neo_smart_blind] 131.146-05, checking for aggregation 131.146-15
2022-08-12 20:15:49.692 DEBUG (MainThread) [custom_components.neosmartblinds.neo_smart_blind] dn, observing blind commands for 0.250s
2022-08-12 20:15:49.692 DEBUG (MainThread) [custom_components.neosmartblinds.neo_smart_blind] 131.146-03, checking for aggregation 131.146-15
2022-08-12 20:15:49.692 DEBUG (MainThread) [custom_components.neosmartblinds.neo_smart_blind] dn, observing blind commands for 0.249s
2022-08-12 20:15:49.692 DEBUG (MainThread) [custom_components.neosmartblinds.neo_smart_blind] 131.146-04, checking for aggregation 131.146-15
2022-08-12 20:15:49.692 DEBUG (MainThread) [custom_components.neosmartblinds.neo_smart_blind] dn, observing blind commands for 0.249s
2022-08-12 20:15:49.700 DEBUG (MainThread) [custom_components.neosmartblinds.neo_smart_blind] 131.146-02, issuing to group command instead 131.146-15
2022-08-12 20:15:49.700 DEBUG (MainThread) [custom_components.neosmartblinds.neo_smart_blind] 131.146-05, aggregated to group command
2022-08-12 20:15:49.700 INFO (MainThread) [custom_components.neosmartblinds.cover] Bottom - Left closing to 0
2022-08-12 20:15:49.701 DEBUG (MainThread) [custom_components.neosmartblinds.neo_smart_blind] 131.146-03, aggregated to group command
2022-08-12 20:15:49.701 INFO (MainThread) [custom_components.neosmartblinds.cover] Top - Center closing to 0
2022-08-12 20:15:49.701 DEBUG (MainThread) [custom_components.neosmartblinds.neo_smart_blind] 131.146-04, aggregated to group command
2022-08-12 20:15:49.702 INFO (MainThread) [custom_components.neosmartblinds.cover] Bottom - Center closing to 0
2022-08-12 20:15:49.706 INFO (MainThread) [custom_components.neosmartblinds.cover] Bottom - Left sleeping for 0.0 to allow for close to 0, elapsed=0
2022-08-12 20:15:49.715 INFO (MainThread) [custom_components.neosmartblinds.cover] Top - Center sleeping for 0.0 to allow for close to 0, elapsed=0
2022-08-12 20:15:49.715 INFO (MainThread) [custom_components.neosmartblinds.cover] Bottom - Center sleeping for 0.0 to allow for close to 0, elapsed=0
2022-08-12 20:15:49.716 INFO (MainThread) [custom_components.neosmartblinds.cover] Bottom - Left move done 0
2022-08-12 20:15:49.716 INFO (MainThread) [custom_components.neosmartblinds.cover] Top - Center move done 0
2022-08-12 20:15:49.716 INFO (MainThread) [custom_components.neosmartblinds.cover] Bottom - Center move done 0
2022-08-12 20:15:49.790 DEBUG (MainThread) [custom_components.neosmartblinds.neo_smart_blind] 131.146-15, Tx: 131.146-15-dn!bf

2022-08-12 20:15:49.821 DEBUG (MainThread) [custom_components.neosmartblinds.neo_smart_blind] 131.146-15, Rx: 131.146-15-dn!bf

2022-08-12 20:15:49.823 INFO (MainThread) [custom_components.neosmartblinds.neo_smart_blind] 131.146-02, connected to hub
2022-08-12 20:15:49.823 INFO (MainThread) [custom_components.neosmartblinds.cover] Top - Left closing to 0
2022-08-12 20:15:49.823 INFO (MainThread) [custom_components.neosmartblinds.cover] Top - Left sleeping for 16.2 to allow for close to 0, elapsed=0
2022-08-12 20:16:06.025 INFO (MainThread) [custom_components.neosmartblinds.cover] Top - Left move done 0

@vexter0944
Copy link

I'm thinking I need to stopwatch these and get that setting in there? Looks like it's sleeping for 0.0 waiting on it to close..

@gee-jay-bee
Copy link
Collaborator

That log looks like it has correctly aggregated the request to close the covers into a single group command.
I see one line saying "issuing" group command and the other 3 then simply report that they were aggregated.

I agree the sleep durations look weird ... I'd guess that the starting positions of all the blinds were different? Ultimately, when you simply ask for the blinds to close (or open) with no target position then the sleeping is decorative -- it simply updates the state to reflect the position based on time. For a sleep of zero, you wouldn't see the intermediate "closing" state and it would jump to "closed".

If you see different numbers of blinds move each time the group command is sent then I do suspect it's a radio related problem. I previously faced a similar issue with my own grouped covers when using the app with the hub (no HA). One or two of the covers would not move reliably and would require a second command. I also had problems with the intermediate position, sometimes the cover would move all the way and some times it would stop at the intermediate position. In the end, I deleted the intermediate positions to solve that problem. The intermittent failure for the blind to move was trial and error, both fiddling with the antenna on the blind itself and moving the hub around the house for best coverage. It seems solid now.

@vexter0944
Copy link

quick update - 2 times I've tested after adding the timing settings in for each blind - all 4 have open and closed together. I'll continue to test - but so far so good. If it changes, I'll report back - otherwise, assume this was the fix.
Thanks so much for stepping in to help and diagnose!

@gee-jay-bee
Copy link
Collaborator

If you hadn't set a value previously then I think it gets a default of 20s. I guess that if you did testing that started and stopped the blinds mid motion then the integration would calculate the stop position wrongly and everything would be out of sync. At that point, the group commands may not include some of the covers. With the config change, the integration would reset and hopefully all would go back in sync.

I can't think of another reason why the close time could make a difference but happy if it's working ok!

@vexter0944
Copy link

I wanted to respond back and let everyone know at least, this was not the solution. I still have random blinds not going up/down. I've removed the parent group and tried that - no luck. I've sent an email to the smart hub manufacture to see if there are any logs I can get etc to help troubleshoot this more.

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

3 participants