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

Dimmer Switch #120

Closed
wspencer24 opened this issue Jan 1, 2025 · 21 comments
Closed

Dimmer Switch #120

wspencer24 opened this issue Jan 1, 2025 · 21 comments
Assignees
Labels
bug Something isn't working

Comments

@wspencer24
Copy link

Adds dimmer switch as regular switch, and on off does not work

@Expl0dingBanana
Copy link
Collaborator

Expl0dingBanana commented Jan 1, 2025

Thanks for the issue @wspencer24 ! Can you provide the version + data dump to help troubleshoot this issue?

Supporting new models: https://github.com/jdeath/Hubspace-Homeassistant?tab=readme-ov-file#support-for-a-new-model

I forgot I had previously addressed one of these, model HPDA311CWB. I wonder if I should update it so it looks at the states, and if brightness is available, to treat it as a light instead of a switch.

@tpural
Copy link

tpural commented Jan 2, 2025

I also have this problem with dimmer switch model HPDA110NWBP... I notice that they show up as "TBD" in the dumps for some reason.

Versions:
Hubspace-Homeassistant- v3.3.0
Home Assistant- 2024.12.5

_dump_hs_devices.json
_dump_hs_raw.json

@Expl0dingBanana
Copy link
Collaborator

Expl0dingBanana commented Jan 3, 2025

Can yall try the pre-release, dev-aiohubspace, and see if it solves the issue? As for TBD, thats what Hubspace returns in their API. The pre-release should fix it and show HPDA110NWBP for the model now.

@Expl0dingBanana Expl0dingBanana self-assigned this Jan 3, 2025
@Expl0dingBanana Expl0dingBanana added the bug Something isn't working label Jan 3, 2025
@tpural
Copy link

tpural commented Jan 4, 2025

Thanks for working on this!

I got the pre-release installed and now my dimmer switches work! (on/off and dimming)

However, my non-dimmers are no longer working as expected. If I physically turn the switch on, I can turn them off using Home Assistant but their status doesn't update. If I physically turn the switch off, I am unable to get the lights to turn on using Home Assistant.

Switches No Longer Working
Basement Furnace: HPSA11CWB (Showing as TBD)
Basement Stairs: HPSA21CWB (Showing correctly)

Dump:
_dump_hs_devices.json
_dump_raw.json

Thanks again!

@tpural
Copy link

tpural commented Jan 4, 2025

Did some more testing with my non-dimmer switches... The switch state seems to be stuck on in Home Assistant...

If the switch is on and I want to turn it off, the toggle on my dashboard works as expected but the state flips back to on after a few seconds...

If the switch is off and I want to turn in on, I can't because the state shows as on in my dashboard. However, I noticed that if I quickly double tap the toggle off->on, I can get the lights to turn on.

@Expl0dingBanana
Copy link
Collaborator

Expl0dingBanana commented Jan 4, 2025

Let me take a look into that. I think I messed up the update code in the connector

@Expl0dingBanana
Copy link
Collaborator

Expl0dingBanana commented Jan 4, 2025

Yup I did something funny with the update code. However waiting 30s for it to update felt like an eternity so I will update the configuration to allow a user to specify the polling interval. Ill let you know when its ready!

@Expl0dingBanana
Copy link
Collaborator

Expl0dingBanana commented Jan 4, 2025

Should be good to try it out now. It now supports modifying Hubspace polling time

@tpural
Copy link

tpural commented Jan 5, 2025

I reinstalled the integration and was able to see the "polling time" configuration.

Unfortunately none of my switches work on this version. All my switches are currently off (lights off) but they show up as on in my home assistant dashboard. Toggling them to off in my dashboard does nothing(lights remains off). After a few seconds the dashboard reverts the toggles back to on (lights remain off).

Here is a screen recording of this behavior:
https://github.com/user-attachments/assets/7e121aca-ccf4-4207-894d-41524a6c0a61

If I rapidly click the toggle on my dashboard twice (off->on) then the lights will actually turn on.

The switches show the correct status in the Hubspace app.

Apologies if I'm not explaining this well... I can try to get you a video of my Home Assistant dashboard and what is actually happening with the switches/lights if that would help?

@Expl0dingBanana
Copy link
Collaborator

Expl0dingBanana commented Jan 5, 2025

You did a fine job describing it. It sounds like the correct states are being sent as it turns on, but maybe we are processing them incorrectly for states to always show as On in HA. Let me try to reproduce this with a test.

Update: Test found an issue with pub / sub so going to work on that.

@Expl0dingBanana
Copy link
Collaborator

I managed to break 100% of my tests and I think its because pub / sub is working properly now. With that said, its deployed onto my dev instance and it continues to control my lights + fan. Can you download the latest and see if the switches now update for you?

@tpural
Copy link

tpural commented Jan 5, 2025

I'm still seeing the same behavior. Here is another recording showing my Hubspace switches(left) and some Hue bulbs(right) for comparison.
https://github.com/user-attachments/assets/799da9b7-0f8d-4c28-b90c-72c86eb74cfa

To make sure this wasn't just an issue with my network or my HA deployment, I reverted back to v3.3.0. I confirmed this put me back to where I was at before I started working with you on this issue on your pre-release.... My non-dimmer switches work perfectly, but my switches with dimmers do not:
https://github.com/user-attachments/assets/8f2c9081-bd2c-49f7-946a-a065937a80fa

The polling also works fine on v3.3.0 for ALL of my switches... If I hit my wall switches and wait the 30 second polling interval, the state is updated correctly.

@Expl0dingBanana
Copy link
Collaborator

Expl0dingBanana commented Jan 6, 2025

Ill look into this a bit more throughout the week. I will see what else I notice between the two sending and receiving states

@tpural
Copy link

tpural commented Jan 7, 2025

Sounds good. Thanks again!

I pulled down your aiohubspace repo and I should also have some time to do some tinkering this week. I'll let you know if I find anything interesting!

@iclayTM3
Copy link

iclayTM3 commented Jan 9, 2025

I'm having the same issue with my dimmer switch. I see the same things your seeing. Let me know if I can help test anything out for you.

@Expl0dingBanana
Copy link
Collaborator

@iclayTM3 Can you pull the latest version of dev-aiohubspace and try again? I believe this issue has been resolved.

@iclayTM3
Copy link

Just pulled it now. It seems to be better than it was before, but it's acting really slow. I wonder if Hubspace is having some issues today. It seems to be slow in their app as well. Maybe I'll try again over the next few days and see what I see. Thanks for all your work on this!

@iclayTM3
Copy link

Working really well today. Thanks again for your effort in fixing this!

@Expl0dingBanana
Copy link
Collaborator

@iclayTM3 Awesome, thanks for the feedback! I believe I have finalized the dev tag if you can pull it once more and validate that everything is still working. Thanks for your help with the testing!

@iclayTM3
Copy link

Just did. It's all working great! Thank you again!

@Expl0dingBanana
Copy link
Collaborator

Fixed with #121

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

4 participants