Custom Component: Neo Smart Blinds Cover - modified and updated

There currently is no way to choose the modes for selecting a rail. I think I’ll have to contact NEO Smart Blinds to see if they have any documentation on how to do that.

I do not have any top-down / bottom-up blinds currently, I might be able to sniff out what they are doing if I did.

I’ll let you know what I find out.

1 Like

For anyone following this thread with top down bottom up motorized blinds integrated with the neoSmart Hub, mtgeekman’s implementation can be modified to replace the tilt commands with bottom rail commands instead. Replace the micro up and micro down commands with u2 and d2, then HA’s tilt control will control the bottom rail. You can then use a service call (which I’ve mapped to a button using the “multiple entity row” custom integration).

2 Likes

@mtgeekman
Hi

Wow this is a late reply… hah… hope all is well in these strange times

You’ve done great work from the foundation built !

As the original author I’m just happy to see it expand as required… that what open source is about!

Thanks @4n0nD3v3l0p3r, I’m glad you approve. Its been an adventure figuring it all out.

Thank you @4n0nD3v3l0p3r and @mtgeekman for the addon. This has been very helpful in getting my blinds integrated with home assistant.

I am having an issue and was hoping if someone here can give me direction. I have my blinds working in Home Assistant and this works well with web interface and the iOS app, but with HomeKit bridge, I am getting an error:

The configuration.yaml file contacts the following definition for the blinds:

cover:
  - platform: neosmartblinds
    name: Study Blind
    host: 192.000.000.000 <redacted>
    hub_id: 000000000000000000000000 <redacted>
    protocol: http
    port: 8838
    blind_code: 000.000-00 <redacted>
    close_time: 26

The blinds can be managed from Home Assistant, this is just an error message I am getting while enabling the cover entity in the HomeKit Bridge config.

Below is the output of the Blind status from the developer page.

State is ‘Unknown’ and always remain unknown.

current_position: 50
current_tilt_position: 50
friendly_name: Study Blind
supported_features: 63
device_class: blind

(apologies, I could not attach the screenshot of the dev page as new users cannot post more than 1 image)

Also doubling down on the props to @4n0nD3v3l0p3r for the orig and @mtgeekman for the fork. I was able to work with @mtgeekman to modify his integration to gain scrappy control over the bottom rail for a set of top down bottom up blinds I purchased from BlindsGalore.

Re: @nerdyoda, with my particular blinds, I found that the position would never provide HA with a state -though it functioned correctly, the state was always unknown.

Though quite silly, I ended up adding an additional integration on top of this my modified integration from mtgeekman. I used the fork from Robi on this page: Custom Component: Cover Time Based and used the time to open and close, then integrated service calls into the front end and used Lovelace: Multiple entity row to put it all together again for Lovelace.

After doing all of this, HA now shows open and closed states, as well as pretty accurate position states (solely calculated by time).

This allows me to have a single button to control the top rail, and the bottom rail for the 4 most common positions I use (represented with battery icons): all the way open (both rails up), all the way closed (top rail up, bottom rail down), sitting privacy, and standing privacy (bottom rails down and top rail at 52%, and 30%. Lastly, I used a helper toggle to track if the bottom rail is down all the way or not, which lets me change the delay before moving the other rail before the stop command stops both rails.

All in all a very round about convoluted way to get full functionality. I suspect doing something similar will give HomeKit the extra position info it seems to be asking for in the error -but not positive, since I haven’t done it myself.

1 Like

Sorry, I’m having difficulties getting the component to work.
My configuration.yaml contains

cover:
  - platform: neosmartblinds
    name: Kitchen Blind Left
    host: 192.168.0.xxx
    hub_id: 44xxxxxxxxxxxxxxxxxxxx38
    protocol: http
    port: 8838
    blind_code: 045.xxx-xx
    close_time: 37

I’m getting the error:

2020-10-08 21:30:28 ERROR (MainThread) [homeassistant.components.cover] Error while setting up neosmartblinds platform for cover
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 193, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/neosmartblinds/cover.py", line 67, in setup_platform
    cover = NeoSmartBlindsCover(
  File "/config/custom_components/neosmartblinds/cover.py", line 98, in __init__
    self.hass.data[DATA_NEOSMARTBLINDS].append(self._client)
AttributeError: 'NoneType' object has no attribute 'data'

What stupid error have I made?

Just to be certain, you did download the 1.1 release right? not the 1.2 beta files. (1.2 is not functional just yet.)

Yes, neosmartblinds_v11.zip

Home Assistant 0.115.6
HassOS 4.13

Can I convince you to redownload and reinstall the component files?

I’m running out of ideas to have you try, your config looks ok and from the error in the log everything is where it should be.

Of course. Me too, doesn’t make sense. I’ll try now.
pprint(locals()) gives

{'close_time': 37,
 'device': '045.xxx-01',
 'home_assistant': <homeassistant.core.HomeAssistant object at 0x74811130>,
 'host': '192.168.0.xxx',
 'name': 'Kitchen Blind Left',
 'port': 8838,
 'protocol': 'http',
 'self': <Entity Kitchen Blind Left: None>,
 'the_id': '44xxxxxxxxxxxxxxx38'}

I’m really sorry, that fixed it. I’ve no idea what went wrong first time - I’ll try to work it out for my peace of mind. I can’t get positioning to work but that’s not a big deal, and I’ll investigate.
Thank you so much for developing this - it’s great. I’d received a copy of the API a while back but never progressed it.
B

Glad to hear that fixed it, wish we could track down what happened.

The positioning is a little weird because the blinds do not report a position, so its all based on the “close_time” variable. its a hacky work around that kinda works.

Hi,

First of all, thanks to the original dev work, and also for this further development. I was able to set everything up, but I have a minor issue: How, within the lovelace, can I trigger the favorite position ? It seems I do not have a control for that. I only get the up, stop and down control.

Thanks,

1 Like

I just got this set up on my end – you have to move the position slider to exactly 50 in order to trigger it to go to your predefined saved favorite.

That was a bit hard to do so what I ended up doing is hard coding a set of buttons. One having a tap_action to call-service with the service being ‘cover.set_cover_position’. And then in the service data, setting the position to exactly ‘50’. This button also doubles a stop button if any blinds are currently in motion it seems as well.

type: button
tap_action:
  action: call-service
  service: cover.set_cover_position
  service_data:
    position: 50
    entity_id: cover.back_kitchen_blind
icon: 'mdi:heart'

@marshes that looks awesome, any chance you could/would share the code at all please?

I just got a couple of blinds installed and this is exactly what I am looking at doing.

just saw this. I’ll send you a message directly to walk through what I did and better understand your usecase.

Just upgraded to 2021.1.3 and trying to setup Neo Smart Blinds integration but it’s not working. I can telnet to 8838 and 8839 to my controller and control the blinds with the app so I know it’s online and functional. Below is my setup in the configuration.yaml. Is there a log somewhere I could look at to see if I can figure out what’s failing?

#Neo Smart Blinds Integration
cover:
  - platform: neosmartblinds
    name: TestBlind
    host: redacted
    hub_id: redacted
    protocol: http
    port: 8838
    blind_code: redacted
    close_time: 27

Hi all, firstly thank you for all those contributed to this, and glad there an option for the neo blinds

I have downloaded all the latest stuff on ha 2021.1.4
And 1.1 of the custom component.

The no blinds are appearing on my overview, I haven’t seen an specific errors, config checker has said config is valid, do I need to activate the blinds in the overview