Add support for Hubspace by Afero

The integration does not support controlling hubspace groups natively.

You can group them in home assistant: https://www.home-assistant.io/integrations/group/

Thanks. I have things working well with below with the preset schemes. However, what should data section be like instead if I want to set lights to be White Light, 3000K and also if I want to set it to certain RGB color at certain brightness, etc…? Thanks.

service: hubspace.send_command
target:
entity_id:
- light.outdoor1
- light.outdoor2
- light.outdoor3
- light.outdoor4
data:
value: Christmas
functionClass: color-sequence
functionInstance: custom

You only need to use the special Hubspace service for functions not already supported by the normal light service. Directions are here: https://www.home-assistant.io/docs/scripts/service-calls/

You should be able set all the things you requested (rgb, brightness, colortemp) with the standard service.

You will need the special hubspace service to set modes like rainbow, for things not supported by the normal service.

If you must use the hubspace service, you need to do each step with a separate call, you cannot stack different requests.

Look at the output of TestHubspace.py to figure out each step. I do not know what light you have but:

Thank you. I am able to set lights to white with following YAML, but I get the error below if I include the color temperature with Kelvin. If I leave the Kelvin color temperature out, the script works fine (but uses the last white light temperature set in the mobile app). My lights are the Hubspace Par38 Color CCT Lights - https://www.homedepot.com/p/EcoSmart-120-Watt-Equivalent-Smart-PAR38-Color-Changing-CEC-LED-Light-Bulb-with-Voice-Control-1-Bulb-Powered-by-Hubspace-11PR38120RGBWH1/318411934

service: light.turn_on
data:
brightness_pct: 100
white: true
kelvin: 3000
target:
entity_id:
- light.outdoor1
- light.outdoor2
- light.outdoor3
- light.outdoor4

Error :

two or more values in the same group of exclusion ‘Color descriptors’ @ data[]. Got None

I am not sure. You may not be able to specify both kelvin and white as one implies the other. Just try setting kelvin and brightness. The lights were written with mired, but hopefully will support kelvin. I never tried because my light does not support it. The docs say to use color_temp_kelvin instead of kelvin now, but kelvin should still work.

Thanks. Setting brightness and Kelvin worked as you mentioned as Kelvin is used for setting temperature for white light.

service: light.turn_on
data:
brightness_pct: 100
kelvin: 3000
target:
entity_id:
- light.outdoor1
- light.outdoor2
- light.outdoor3
- light.outdoor4

First, thanks to everybody that has worked on this.
I have the HB-10521-HS string lights and just wanted to point something out that is a little different for them.
In the readme it gives the example:

service: hubspace.send_command
data:
  value: "rainbow"
  functionClass: color-sequence
  functionInstance: custom
target:
  entity_id: light.yourlightname 

This will work for the “mood” presets.

For the “holidays” and “fun patterns” there is a slight difference.

service: hubspace.send_command
data:
  value: "christmas"
  functionClass: color-sequence
  functionInstance: preset
target:
  entity_id: light.yourlightname 

Is it just me, or is Hubspace absolutely terrible at updating it’s state info? I have a ceiling fan and I’m trying to setup an automation for a simple zigbee button to toggle the light on and off. I can’t seem to use toggle though, because it will turn the light off, but the state never updates so HAOS thinks the light is still on, and just sends an off command again. Hubspace sucks… I wish I would have researched more before buying this dumb fan.

As the readme says, this integration only provides limited functionality. Hubspace is not the best platform for use by Home Assistant. However, it can get better: please contribute to the integration code to improve it. There is a long standing issue that it is unresponsive. This is due to the fact that all status is polled from the cloud and the calls are currently not async, PRs are welcome.

I’ve reviewed and followed the directions but nothing is showing up for me. My question is about the YAML that is added to the configuration file. My password has an @ in it and unless I put the password in with quotes around it, Visual Studio doesn’t like it. Could this be my problem? Should I avoid this or other characters in my password?

I do not think “@” is an issue as it is allowed in the username (email address) and does not need to be quoted. Check the logs, not sure if it will throw an error on a bad password.

The problem was the password. More specifically, the @ was the first character in the password and having it that way the yaml file couldn’t be saved without quotes around it. Just moving the @ somewhere inside the password allowed the yaml file to be saved without issue. As a result I changed my password in Hubspace and everything worked as it should. Thanks!

1 Like

Is there any chance of outlets being listed as a switch instead of a light? I had to convert all my other switches to lights for the group to work for my garage as all the lights are plugged into smart switches. Thanks for this integration, BTW.

There is no way in the integration because everything is done as a light, even locks, fans, etc. It would require a major refactor which I do not plan to do. There are some other forks out there where people have tried, but I do not think they are up to date. It would be nice if a real developer took over this integration.

However, in Home Assistant if you click on a light, click on the gear icon, you change the “Show as” field to “outlet”

Using the HACS version, still works great, thank you.

Would really love an official integration, especially now that Home Depot has gone all-in.

Glad you like it. Someone will have to take the integration over to make it official. It will never be accepted without making separate entities for locks, lights, switches. Also all the API functionality must be made into standalone python library and likely async calls. Probably want a smarter functionality detection method so each new device does not need to be manually added into the code. All of this is way over my head. Be prepared since they are doing “security systems” in the article you posted, they will actively try to deny this integration! The integration was meant as an option for basic connectivity, but I do not recommend devices that rely on the cloud.

Hi there, gonna thread highjack here this issue is driving me crazy, ahaha

Trying to configure Hubspace integration via HACS (v1.99) on my Home Assistant VM. I’ve added the following snippet to my “configuration.yaml” file, I’m not getting any recent errors/warnings in my log file since my last test on the latest HA Core/HAOS Update.

“configuration.yaml”

light:
  - platform: hubspace
    username: !secret hubspace_username
    password: !secret hubspace_password
    debug: true

“secrets.yaml”

hubspace_username: myemail
hubspace_password: mypassword

I’m following the suggested method of keeping passwords and token in the encrypted “secrets.yaml” file - “Storing secrets - Home Assistant” I have tried placing the password directly into the “configuration.yaml” file instead, this unfortunately did not alter the outcome.

I’ve reloaded the configuration file, and tried rebooting the Home Assistant OS.

I’ve checked the states tap in developer tools for the entities, I’m trying to add a supported hubspace deadbolt from Homedepot via the Hubspace integration as a light entity so I can check it’s battery levels and toggle the lock from my HA Dashboard. I would also like to add the WAN/LAN Bluetooth Extension smart plug if possible.

the expected result is for the hubspace integration to automatically detect the entity’s as lights and add them to Home Assistant once account credentials are authenticated via the Hubspace API.

Initially I thought this was a bug but the developer over on github closed my issue and mentioned based on previous error logs it might be a password or configuration issue on my end, I’m 101% certain the credentials are indeed correct, so this must be a configuration issue on my side?

Hubspace integration failing to discover "entities" in my Account · Issue #67 · jdeath/Hubspace-Homeassistant · GitHub

Just tried updating to (v2.00) same issue.

Any help is greatly appreciated, thanks.

Temporarily change your password to something simple like: hyperlink1234
Ensure your username is in the format [email protected]
Put them directly in the configuration.yaml until everything is working.

You can also add this to configuration.yaml. It will output some extra info. You may already have a logger: line near the top of your config (not in the light: section), so just edit it as below:

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

You can also try the TestHubspace.py file in the repo. It will run in a homeassistant terminal. You may need to do a “pip install” a few things. It uses the same login code, so it is easier to edit the file to look for clues. But 99% sure your password/username is wrong.

1 Like

I’ve triple checked my credentials, 100% certain they were correct, even double checked before changing them as suggested, and prior I’ve tried putting the credentials directly into the configuration.yaml file, I just change the password to something simple without special characters such as & and thanks to that debug line you gave me I can confirm it’s connecting to the Hubspace API and receiving a token, according to the logs it’s finding my two devices but from visual inspection of the entity tab on developer tools, I don’t see either of these devices as a light.

it didn’t work the first couple tries, no logs either, I ended up adding double quotations with the password and email between. is that syntax required?

light:
  - platform: hubspace
    username: "[email protected]"
    password: "madeuppass1234"
    debug: true

I also tried it without double quotes and with single quotes, neither worked, and I’ve rebooted HA.

any further suggestions?

Found these mentions in my log, still no entities.

2024-01-18 01:26:01.510 DEBUG (SyncWorker_7) [custom_components.hubspace.light] Switch on Model TBD

2024-01-18 01:26:01.510 DEBUG (SyncWorker_7) [custom_components.hubspace.light] deviceId: IDNumber (not sure if I need to hide this)

2024-01-18 01:26:01.510 DEBUG (SyncWorker_7) [custom_components.hubspace.light] deviceClass: door-lock

2024-01-18 01:26:01.510 DEBUG (SyncWorker_7) [custom_components.hubspace.light] friendlyName: Front Door Lock

2024-01-18 01:26:01.509 DEBUG (SyncWorker_7) [custom_components.hubspace.light] Switch on Model HPPA11CWB
2024-01-18 01:26:01.510 DEBUG (SyncWorker_7) [custom_components.hubspace.light] deviceId: IDNumber
2024-01-18 01:26:01.510 DEBUG (SyncWorker_7) [custom_components.hubspace.light] deviceClass: power-outlet
2024-01-18 01:26:01.510 DEBUG (SyncWorker_7) [custom_components.hubspace.light] friendlyName: Lock extension & WAN Switch

You are right, your password is right now, since it is hitting the API.

HPPA11CWB is supported, not sure if your particular lock is. Did you go to: Home Assistant Settings->Device & Services → Entities and type hubspace in the search box? You should see them there.

You should have light.front_door_lock and light.lock_extension_&_wan_switch.

The & in the friendlyname could be causing issues. Rename the item in the app to just lockplug or something short, no spaces too. Then restart homeassistant

edit: The door lock and the plug that came with it MUST be added specifically with the friendlyname. The automatic search does not work for them. The documentation specifically indicates this for the lock, I will add the warning for the plug. The friendlyname is now called “Product Name” in the app. Rename each thing to something simple, so it is easy to add both of them in your configuration.yaml

If that does not work, PM me your homeassistant log as your specific lock may not be supported as they now have a couple models. The plug will definitely work.

1 Like