Custom Component: Neo Smart Blinds Cover - modified and updated

good to hear!

So I just got my new Neosmartblinds controller all setup and working and now I am trying to get this home assistant integration working, I can add the blind but when I go to send a command I get a connection refused error.

[140063208069632] HTTPConnectionPool(host='192.168.1.28', port=8838): Max retries exceeded with url: /neo/v1/transmit?id=3f002f0008473930353####&command=062.208-15-up&hash=.610115 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f62fdb53610>: Failed to establish a new connection: [Errno 111] Connection refused'))

Any idea what I could have done wrong to cause this?

  - platform: neosmartblinds
    name: ComputerRoom
    host: 192.168.1.28
    hub_id: 3f002f00084739303####
    protocol: http
    port: 8838
    blind_code: 062.20###
    close_time: 19

Has anyone been able to get these to showup in home kit. From the logs I have a feeling it is related to no known state. Can someone confirm this?
Logger: homeassistant.components.homekit
Source: components/homekit/type_covers.py:259
Integration: HomeKit (documentation, issues)
First occurred: 9:42:30 PM (3 occurrences)
Last logged: 9:42:30 PM

  • Failed to create a HomeKit accessory for cover.living_room
  • Failed to create a HomeKit accessory for cover.dining_room
  • Failed to create a HomeKit accessory for cover.kitchen

Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/components/homekit/init.py”, line 524, in add_bridge_accessory acc = get_accessory(self.hass, self.driver, state, aid, conf) File “/usr/src/homeassistant/homeassistant/components/homekit/accessories.py”, line 233, in get_accessory return TYPES[a_type](hass, driver, name, state.entity_id, aid, config) File “/usr/src/homeassistant/homeassistant/components/homekit/type_covers.py”, line 333, in init super().init( File “/usr/src/homeassistant/homeassistant/components/homekit/type_covers.py”, line 285, in init self.async_update_state(state) File “/usr/src/homeassistant/homeassistant/components/homekit/type_covers.py”, line 309, in async_update_state super().async_update_state(new_state) File “/usr/src/homeassistant/homeassistant/components/homekit/type_covers.py”, line 259, in async_update_state if self.char_current_tilt.value != current_tilt: AttributeError: ‘WindowCovering’ object has no attribute ‘char_current_tilt’

Full Log
2021-03-05 21:42:30 ERROR (SyncWorker_2) [homeassistant.components.homekit] Failed to create a HomeKit accessory for cover.living_room

Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/components/homekit/init.py”, line 524, in add_bridge_accessory

acc = get_accessory(self.hass, self.driver, state, aid, conf)

File “/usr/src/homeassistant/homeassistant/components/homekit/accessories.py”, line 233, in get_accessory

return TYPES[a_type](hass, driver, name, state.entity_id, aid, config)

File “/usr/src/homeassistant/homeassistant/components/homekit/type_covers.py”, line 333, in init

super().init(

File “/usr/src/homeassistant/homeassistant/components/homekit/type_covers.py”, line 285, in init

self.async_update_state(state)

File “/usr/src/homeassistant/homeassistant/components/homekit/type_covers.py”, line 309, in async_update_state

super().async_update_state(new_state)

File “/usr/src/homeassistant/homeassistant/components/homekit/type_covers.py”, line 259, in async_update_state

if self.char_current_tilt.value != current_tilt:

AttributeError: ‘WindowCovering’ object has no attribute ‘char_current_tilt’

2021-03-05 21:42:30 ERROR (SyncWorker_2) [homeassistant.components.homekit] Failed to create a HomeKit accessory for cover.dining_room

Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/components/homekit/init.py”, line 524, in add_bridge_accessory

acc = get_accessory(self.hass, self.driver, state, aid, conf)

File “/usr/src/homeassistant/homeassistant/components/homekit/accessories.py”, line 233, in get_accessory

return TYPES[a_type](hass, driver, name, state.entity_id, aid, config)

File “/usr/src/homeassistant/homeassistant/components/homekit/type_covers.py”, line 333, in init

super().init(

File “/usr/src/homeassistant/homeassistant/components/homekit/type_covers.py”, line 285, in init

self.async_update_state(state)

File “/usr/src/homeassistant/homeassistant/components/homekit/type_covers.py”, line 309, in async_update_state

super().async_update_state(new_state)

File “/usr/src/homeassistant/homeassistant/components/homekit/type_covers.py”, line 259, in async_update_state

if self.char_current_tilt.value != current_tilt:

AttributeError: ‘WindowCovering’ object has no attribute ‘char_current_tilt’

2021-03-05 21:42:30 ERROR (SyncWorker_2) [homeassistant.components.homekit] Failed to create a HomeKit accessory for cover.kitchen

Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/components/homekit/init.py”, line 524, in add_bridge_accessory

acc = get_accessory(self.hass, self.driver, state, aid, conf)

File “/usr/src/homeassistant/homeassistant/components/homekit/accessories.py”, line 233, in get_accessory

return TYPES[a_type](hass, driver, name, state.entity_id, aid, config)

File “/usr/src/homeassistant/homeassistant/components/homekit/type_covers.py”, line 333, in init

super().init(

File “/usr/src/homeassistant/homeassistant/components/homekit/type_covers.py”, line 285, in init

self.async_update_state(state)

File “/usr/src/homeassistant/homeassistant/components/homekit/type_covers.py”, line 309, in async_update_state

super().async_update_state(new_state)

File “/usr/src/homeassistant/homeassistant/components/homekit/type_covers.py”, line 259, in async_update_state

if self.char_current_tilt.value != current_tilt:

AttributeError: ‘WindowCovering’ object has no attribute ‘char_current_tilt’

Hi,

I’m new to Home Assistant having recently installed HASIO 2021.3.4 on a dedicated machine. We just purchased a Neo Smart Blind and I’ve been trying to get this working for a couple days now. This is my first attempt at a custom component install and I would appreciate any thoughts on where I might be going wrong with this.

I downloaded neosmartblinds_v11 and put it in the config folder, as directed. I’m pretty sure I have this part correct as I see the controls on the dashboard. My configuration.yaml includes this:

cover:
  - platform: neosmartblinds
    name: Dining Room Shade
    host: 192.168.#.150
    hub_id: <hub id>
    protocol: http
    port: 8838
    blind_code: 155.070-01
    close_time: 27

I had already setup the Neo Hub without any issues and can successfully ping the hub at the listed IP address without issues.

However, when attempting to use any of the control buttons, I get an error like this (specific to the service call for each button):

Failed to call service cover/open_cover. ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Here’s the full error log entry:

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/neosmartblinds/neo_smart_blind.py:102
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 11:07:54 AM (1 occurrences)
Last logged: 11:07:54 AM

[139700835405984] ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 445, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 440, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/local/lib/python3.8/http/client.py", line 1347, in getresponse
    response.begin()
  File "/usr/local/lib/python3.8/http/client.py", line 307, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.8/http/client.py", line 276, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 531, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/local/lib/python3.8/site-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 445, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 440, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/local/lib/python3.8/http/client.py", line 1347, in getresponse
    response.begin()
  File "/usr/local/lib/python3.8/http/client.py", line 307, in begin
    version, status, reason = self._read_status()
  File "/usr/local/lib/python3.8/http/client.py", line 276, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 141, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1488, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1523, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 642, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 681, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 679, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/cover/__init__.py", line 251, in async_open_cover
    await self.hass.async_add_executor_job(ft.partial(self.open_cover, **kwargs))
  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 146, in open_cover
    self._client.send_command(CMD_UP)
  File "/config/custom_components/neosmartblinds/neo_smart_blind.py", line 74, in send_command
    self.send_command_http(command)
  File "/config/custom_components/neosmartblinds/neo_smart_blind.py", line 102, in send_command_http
    r = requests.get(url=url, params=params)
  File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Thanks, in advance, for any guidance.

Hi, for anyone interested in this component. I just created a fork and pull request to enable both favourites if your controller supports it.

I have tested it on my controller and everything sees to be working. It is setup with 51 as favourite 2, and 50 is still favourite 1.

I had to use cover.py from the latest release as the current master code doesn’t work for me. You only need the updated const.py and neo_smart_blind.py files.

1 Like

I have merged your changes into my master.

I also went through and finally got the top-down/bottom-up sorted into a version that should be testable.

If anyone is interested. please give the 1.3 release a shot. you’ll add each rail as its own cover device, then set a rail number in the config so it can move the correct one.

This is untested for the second rail as I do not have any td/bu blinds.

I was able to get HomeKit working by enabling the tilt position selection. Seems like that is required for this cover type with HomeKit. I have pushed the changes to my branch, but will push it to the main repo once I have tested it. But if you want to try it out you can from there.

Not sure how to automate…

Hi folks, I’m so grateful that there’s a Neo Smart Blinds integration! I’ve got it installed and am able to tap up/down from the overview page, so that works great.

I’m not sure how to perform automations with it, though. As an example, I’d like to open the blinds at midnight, but when I create an automation, the neo integration does not show a Device to control. I can create a Scene, but when I choose the neo cover entity, there’s no option to control it (e.g. up/down)

Hey Grant:
Create an automation
Set the trigger to time
Actions: call service → open cover (blinds are a type of cover to home assistant), select your blinds.

DM me if you need more guidance.

2 Likes

Perfect, works great, thank you!

Hi all

first time trying to get stuff working had success with one add on but not with this, i have copied the files into the correct folder “i assume” same as other custom file i installed but i dont seem to be able to add the feature through the integrations

i have followed the installation but no luck :frowning:

Hey.
I’ve had a situation where the blinds didn’t stop going up at the set limit/time which caused the blinds to ‘stretch’ and motor to fail. Biggest issue was these blinds are 19’ up and needed scaffold ($700 to rent) to replace the motor.

Does this integration override the set limits created with the neo remote/app?

No. It is my understanding that the motor electronics part holds the set limits which are updated via remote when the blinds are installed. The Neo integration only transmits up/down/stop and has nothing to do with limits.

No, the integration does not override any of the built-in limits. that might be a warranty claim for your blind.

Thanks - yes it was replaced under warranty. Good to know I can’t screw it up.

@mtgeekman been using this for months and been absolutely brilliant, however after the latest upgrade to HA I get the following error

Platform error cover.neosmartblinds - Integration ‘neosmartblinds’ not found.

not sure why as was working super sweet until 2 days ago, I have tried updating the neosmartblinds custom controller, I have the neo smartblinds as a !includes in configuration.yaml,

adjusted configuration.yaml to just include one blind as a test

cover:
  - platform: neosmartblinds
    name: Kitchen
    host: 192.168.16.31
    hub_id: 00000000000000000000000000
    protocol: http
    port: 8838
    blind_code: 169.253-00
    close_time: 30

#cover: !include includes/neo.yaml

Am I missing something? :frowning:

Mine has stopped working as well in the last week. Did you resolve this?

Hi,

As with the previous two posters, I cannot get the custom component to register in HA - error is “Platform error cover.neosmartblind - Integration ‘neosmartblind’ not found”.

Has anybody any ideas why this might be?

I removed the folder neosmartblinds from custom_components

and then (using the Studio Code Server AddOn) I re-downloaded the forked project below, adding the config as shown in the GitHub project:

My blinds are up and running now.