Configuring Home Assistant and iblinds – Home Assistant – Community Forum

Configuring Home As...
 
Notifications
Clear all

[Solved] Configuring Home Assistant and iblinds  

  RSS
Admin
(@eric)
Member Admin

Most of the open-source controllers, including Home Assistant poll (send Z-Wave GET) immediately following a Z-Wave position command (Z-Wave SET) (see Z-Wave packet sniffer image below).   While this is fine for most devices such as dimmable light bulbs issuing a poll command immediately following the position command can cause iblinds to experience undesired behavior.  

We worked with a few the great Home Assistant owners and have come up with a solution to get iblinds up and running. 

Home Assistant (hass.io at least) has a z-wave device file in the core config directory called zwcfg_[*******].xml.  (I think the [****] part is different per installation)

  1. Include the iblinds device in the Z-Wave network using the standard methods (Add Node Press In/Ex button on iblinds device)
  2. This will create a node entry in the zwcfg_[*******].xml file and add it to Home Assistant

  3. Shut down Home Assistant (this is very important – HA will write the zwcfg_[*******].xml file from memory when it shuts down.  Any changes made while HA is running will get overwritten when it shuts down).
  4. Edit zwcfg_[*******].xml to modify the entry created for the iblinds device. The zwcfg_[*******].xml file has a <Manufacturer> element within each <Node> element. 
    • Update the HAB Home Intelligence manufacturer to match below:
      <Manufacturer id="287" name="HAB Home Intelligence LLC">
      <Product type="3" id="d" name="iblinds" />
      </Manufacturer>

        

    • Disable Get support by adding the getsupported="false" to the Command_Class_Switch_Multilevel Node Element
    • Then change min="1", max="255"  and value="2"

      Note: The displayed position will always be 2, but having it set to this random value will keep it from interfering with the close command.  We discovered that sometimes when trying to send the HA cover close command the blinds would not respond because it thought they were already at the closed position (value="0")

  5. Restart Home Assistant and hopefully, things should work as expected.     
    • It's also a good idea to manually initiate an iblinds autocalibration by holding down the charger adapter button for 10 seconds before trying to position the blinds.

Note:  Restarting Home Assistant was the challenging part for me.  Each time I rebooted I found that my changes to the zwcfg_[*******].xml had been overwritten.  I believe I was able to get my changes to save by stopping the Z-Wave Network and then Restarting it and then rebooting the host system. 

 

I'm hoping that after this solution has been tested an HA user can get this update pushed to the HA Z-Wave database so future users will not be required to make these updates. 

This topic was modified 5 years ago 4 times by Admin
This topic was modified 4 years ago 2 times by Admin
Posted : 03/11/2019 11:54 pm
stephanie liked
j
(@manonstreet)
Active Member

This solution is a bit of a hack.  By disabling Get support, there is no way to determine the state of the blinds.  While ON/OFF switch can be used to open or close the blinds - and that retains status, any other position is not reflected in HA.  As noted in my other post in this forum section, the switches have their own set of problems as well.

I'd really like to be able to use these blinds as intended and slide the tilt to the desired position and have visual (and programatic) indication in Home Assistant of the state.

Is there any other solution on the horizon, such as updated firmware?

Posted : 03/01/2020 4:14 pm
j
(@manonstreet)
Active Member

After much tinkering, I'm happy to report that I've found a suitable workaround working quite well for my needs.

The solution involves creating a cover template wrapper around the iblind.  By using optimistic mode, Home Assistant will track the tilt position internally overcoming the lack of visibility when disabling get support.  Of course this has the possibility of getting out of sync if for whatever reason the zwave message fails to deliver or take action.  But I can deal with that...  For reference here is one of my blinds:

cover:
  - platform: template
      office_blind_left:
        friendly_name: Left Office Blind
        device_class: shutter
        optimistic: true
        open_cover:
          service: light.turn_on
          data:
            entity_id: light.office_iblinds_left_tilt
            brightness: 160
        close_cover:
          service: light.turn_off
          entity_id: light.office_iblinds_left_tilt
        set_cover_position:
          service: light.turn_on
          data_template:
            entity_id: light.office_iblinds_left_tilt
            brightness: "{{ (position | float * 1.6 | round(1)) | int }}"

Note:  I use this instead of the switch provided to open and close the blind.  This code will allow you to calibrate the 'open' position on a scale from 1-255.  This is particularly useful if you have multiple blinds side-by-side and each have auto-calibrated to a slightly different position.  In the above example, 160 is the ideal open position.  When mapping that to a position number for the cover from 0-100, that is a scaling factor of 1.6 (fully open: 1.6 * 100 = 160).  This setup will not allow you to open your blinds past that position (so the slats are inverted) - but that's no big deal for me.

Hope this helps all the Home Assistant users out there.

Posted : 05/01/2020 6:41 pm
Admin liked
mindblender
(@mindblender)
New Member

I am having an issue where I have HA adjust the blinds to a percentage and the blinds go from one end to the other, as if there is no in between stage.  For example, the blinds are in a closed state, and I have HA open the blinds to 30%.  The blinds then proceed to go thru a full range of motion to the other "closed" state instead of stopping at 30% as intended.  Any idea if this hack would fix that issue, or do I need to dig into it deeper?

Thanks!

Posted : 06/01/2020 7:22 pm
j
(@manonstreet)
Active Member

@mindblender

I posted a workaround that gets the blinds fully working in Home Assistant  - but it's waiting moderation before it posts.  Maybe because I included a link.  Some kind of spam prevention. 

You will need to implement the openzwave xml modifications noted above, plus create a cover template.  Full details will be hopefully be shown soon.

@eric

Ping?

Posted : 06/01/2020 11:08 pm
Admin liked
mindblender
(@mindblender)
New Member

@manonstreet

Excellent!  I will keep my eye out for yor post with the fix.

 

Posted : 06/01/2020 11:27 pm
Admin
(@eric)
Member Admin
Posted by: @manonstreet

@mindblender

I posted a workaround that gets the blinds fully working in Home Assistant  - but it's waiting moderation before it posts.  Maybe because I included a link.  Some kind of spam prevention. 

You will need to implement the openzwave xml modifications noted above, plus create a cover template.  Full details will be hopefully be shown soon.

@eric

Ping?

Thanks for the Ping!   Missed the moderation notice...   Nice work 🙂 

Posted : 07/01/2020 2:03 am
edge9421
(@edge9421)
New Member

@eric, can you explain the situations corrected by your initial post? Specifically, what is the "undesirable behavior" you refer to, and what is fixed by setting the min level to 1 instead of 0? I found your post before I really tried using my blinds because I was trying to figure out a different issue and didn't experience the behavior you refer to first-hand (I did solve my other issue; see next paragraph). 

Incidentally, I was boggled by the fact the iBlinds device added switch and light entities to my Home Assistant instead of a cover entity. I got a tip from someone on the Home Assistant forum to change `specific=0` to `specific=6` on the Node element in zwcfg*.xml and restart, which solved that weirdness. 

Do you know who/what is responsible for the source XML that drops into zwcfg*.xml when an iBlinds device is added to the z-wave network? With all the bugs in the xml it makes me wonder what else is wrong in the XML and where/who can fix it for everyone. 

Posted : 21/01/2020 3:19 am
c
(@contactcr)
New Member

I did a combination of things to make mine work.  It's a lot of trouble but I guess Home Assistant users are glutton for punishment.  Ultimately I got what I wanted with some work..

I'm using a combination ZigBee/Zwave stick (GoControl/Nortek HUSBZB-1).  The trick (for mine) to save the XML file and not have it overwritten is this:

  • Stop Z Wave Network
  • Make changes to XML file
  • Start Z Wave Network
  • Hit Save Configuration in the same area you Start/Stop your network
  • Now after you reboot your XML file will not be overwritten

Using specific=6 makes HA recognize it as a cover already so no changes needed to your config YAML then I use 3 scripts I made to change my set of 3 blinds to the most used combination (open/partial tilt/closed).  Scripts examples at very bottom!

 


 

The changes to the relevant section of zwcfg_*.xml:

	<Node id="24" name="" location="" basic="4" generic="17" specific="6" roletype="7" devicetype="6400" nodetype="0" type="Multilevel Switch" listening="false" frequentListening="true" beaming="true" routing="true" max_baud_rate="40000" version="4" query_stage="Complete">
<Manufacturer id="287" name="HAB Home Intelligence LLC">
<Product type="3" id="d" name="iblinds" />
</Manufacturer>
<CommandClasses>
<CommandClass id="32" name="COMMAND_CLASS_BASIC" version="1" request_flags="4" mapping="38">
<Instance index="1" />
</CommandClass>
<CommandClass id="37" name="COMMAND_CLASS_SWITCH_BINARY" version="1" request_flags="4" getsupported="false" innif="true">
<Instance index="1" />
<Value type="bool" genre="user" instance="1" index="0" label="Switch" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="0" max="0" value="False" />
</CommandClass>
<CommandClass id="38" name="COMMAND_CLASS_SWITCH_MULTILEVEL" version="4" getsupported="false" innif="true">
<Instance index="1" />
<Value type="byte" genre="user" instance="1" index="0" label="Level" units="" read_only="false" write_only="false" verify_changes="false" poll_intensity="0" min="1" max="255" value="2" />



 

Script example, I also have "open" (level ~40) and "closed" (level ~99) - yes my entity names are hideous:

'1234567890988':
alias: LR Blinds Tilt
sequence:
- data:
entity_id: cover.center_blind_level_3
position: 78
entity_id: cover.center_blind_level_3
service: cover.set_cover_position
- data:
entity_id: cover.hab_home_intelligence_llc_iblinds_level
position: 76
entity_id: cover.hab_home_intelligence_llc_iblinds_level
service: cover.set_cover_position
- data:
entity_id: cover.right_blind_level_2
position: 77
entity_id: cover.right_blind_level_2
service: cover.set_cover_position


And finally here is my front end UI, the top two are my motorized bali roller shades and bottom three are my iblinds retrofit "faux wood blinds":

And the code for this:

      - cards:
- entity: script.1230000000
icon: 'mdi:view-headline'
icon_height: 30px
name: Blinds Open
tap_action:
action: call-service
service: script.1230000000
type: entity-button
- entity: script.1240000000
icon: 'mdi:texture'
icon_height: 30px
name: Blinds Tilt
tap_action:
action: call-service
service: script.1240000000
type: entity-button
- entity: script.1250000000
icon: 'mdi:view-list'
icon_height: 30px
name: Blinds Close
tap_action:
action: call-service
service: script.1250000000
type: entity-button
type: horizontal-stack
This post was modified 4 years ago 2 times by contactcr
Posted : 08/04/2020 4:16 pm
c
(@contactcr)
New Member

@eric allow my above post!  need more activity in this subforum, don't want HA to be forgotten.

Posted : 24/04/2020 3:36 pm
Mattie liked
m
(@homeasssitantrocks)
New Member
Posted by: @contactcr

@eric allow my above post!  need more activity in this subforum, don't want HA to be forgotten.

what is the current status of Iblinds and HA in 2020?  Has the zwave database been upgraded as admin said was needed in the OP?  

is it possible for Iblinds to release a firmware update to fix the issue? 

a lot of people are going to be switching to home assistant now that wink is dead so hopefully this is or will be resolved properly soon without hacks.

Posted : 07/05/2020 9:12 pm
Mattie liked
Mattie
(@mattie)
New Member
Posted by: @eric

issuing a poll command immediately following the position command can cause iblinds to experience undesired behavior

How soon can we expect a firmware update or similar to fix this? Clearly there needs to be something better here than what we have-- this would surely impact other usage of thise on OpenZWave, which is very popular.

The workarounds here work (thank you guys!) but are clearly hacks. I want to be able to have conditions based on the current setting for the blinds that is accurate. For a Z-Wave device, I expect to be able to work with it properly. 

Note, I own 4 of these devices now and have struggled to get the first two working somewhat with HA with scenes. I now delete most of the other scene settings for them and just use current_position to set them. Unfortunately it needs "state" yet I had some blinds handling that as open when I meant close and similar... so I just always set it to open and just change the level current-position. (See code below)

I'd buy at least 6 more of these if you can get the HA behavior right. I don't think you understand how much the HA audience is your target audience. 🙂

from scenes.yaml:

nameBlinds Night
  entities:
    cover.entryway_blinds_level:
      stateopen
      current_position0
    cover.side_office_blinds_1_level:
      stateopen
      current_position0
  id89511ba0008a45b1b5c9dba4ea11311
nameBlinds Day
  entities:
    cover.entryway_blinds_level:
      stateopen
      current_position60
    cover.side_office_blinds_1_level:
      stateopen
      current_position55
  id7d9165bc4b00430aa26886972a142766
 
This post was modified 4 years ago 2 times by Mattie
Posted : 04/07/2020 3:12 pm
c
(@chance)
Member Admin

Topic solved, closing topic and moving to most recent post: http://communityarchive.myiblinds.com/community/postid/179/

Posted : 13/10/2020 11:45 pm
Share: