ISY and Polyglot devices

I have a whole house fan (Airscape) that I can control from my ISY using the Airscape Polyglot nodesserver. While the device shows up in HA, it is only appearing as a sensor, not a switch or even better a fan device as I would expect. Do any of the ISY gurus have any idea how to make this appear as a fan and/or to write automation to send the proper commands to the ISY to control it? I have some existing automation that talks directly to the REST interface for the fan, but that’s rather kludgy when there is a nodeserver that can already do the work for me.

Here is how the fan appears in the node list from the ISY:

  <node flag="128" nodeDefId="controller">
    <address>n004_controller</address>
    <name>Airscape Controller</name>
    <family instance="4">10</family>
    <parent type="3">40263</parent>
    <type>0.0.0.0</type>
    <enabled>true</enabled>
    <deviceClass>0</deviceClass>
    <wattage>0</wattage>
    <dcPeriod>0</dcPeriod>
    <startDelay>0</startDelay>
    <endDelay>0</endDelay>
    <pnode>n004_controller</pnode>
  </node>
  <node flag="0" nodeDefId="airscape2_F">
    <address>n004_wholehousefan</address>
    <name>Airscape WholeHouseFan</name>
    <family instance="4">10</family>
    <parent type="3">40263</parent>
    <type>0.0.0.0</type>
    <enabled>true</enabled>
    <deviceClass>0</deviceClass>
    <wattage>0</wattage>
    <dcPeriod>0</dcPeriod>
    <startDelay>0</startDelay>
    <endDelay>0</endDelay>
    <pnode>n004_controller</pnode>
  </node>

(I’m assuming the issue is because it is reporting a type of 0.0.0.0)

And here is the information the ISY sees about the fan:


which does all show up in the sensor:

Entity State Attributes
sensor.airscape_controller 1 custom_control_1: debug
friendly_name: Airscape Controller
sensor.airscape_wholehousefan 0 temperature: 99°f
custom_control_7: 0
custom_control_6: 0
custom_control_5: -99°f
custom_control_4: -99°f
custom_control_3: 0 cfm
custom_control_2: false
custom_control_1: true
power: 78 watts
time_remaining: 0
friendly_name: Airscape WholeHouseFan

Just in case anyone has ideas for automation, here is the debug log of doing a “Speed Up” (which turns the fan on) and an “Off” from the ISY admin interface.

Sun 07/05/2020 18:26:08 : [D2D EVENT   ] Event [n004_wholehousefan] [GV2] [1] uom=2 prec=0
Sun 07/05/2020 18:26:08 : [n004_wholehousefan]      GV2   1 (uom=2 prec=0)
Sun 07/05/2020 18:26:18 : [D2D EVENT   ] Event [n004_wholehousefan] [ST] [1] uom=56 prec=0
Sun 07/05/2020 18:26:18 : [n004_wholehousefan]       ST   1 (uom=56 prec=0)
Sun 07/05/2020 18:26:18 : [D2D-CMP 005F] STS [n004_wholehousefan] ST op=6 Event(val=1 uom=56 prec=0) != Condition(val=0 uom=56 prec=0) --> true
Sun 07/05/2020 18:26:18 : [D2D-CMP 005F] STS [n004_wholehousefan] ST op=5 Event(val=1 uom=56 prec=0) >= Condition(val=1 uom=56 prec=0) --> true
Sun 07/05/2020 18:26:18 : [D2D EVENT   ] Event [n004_wholehousefan] [GV2] [0] uom=2 prec=0
Sun 07/05/2020 18:26:18 : [n004_wholehousefan]      GV2   0 (uom=2 prec=0)
Sun 07/05/2020 18:26:18 : [D2D EVENT   ] Event [n004_wholehousefan] [GV3] [1000] uom=7 prec=0
Sun 07/05/2020 18:26:18 : [n004_wholehousefan]      GV3 1000 (uom=7 prec=0)
Sun 07/05/2020 18:26:18 : [D2D EVENT   ] Event [n004_wholehousefan] [ST] [2] uom=56 prec=0
Sun 07/05/2020 18:26:18 : [n004_wholehousefan]       ST   2 (uom=56 prec=0)
Sun 07/05/2020 18:26:18 : [D2D-CMP 005F] STS [n004_wholehousefan] ST op=6 Event(val=2 uom=56 prec=0) != Condition(val=0 uom=56 prec=0) --> true
Sun 07/05/2020 18:26:18 : [D2D-CMP 005F] STS [n004_wholehousefan] ST op=5 Event(val=2 uom=56 prec=0) >= Condition(val=1 uom=56 prec=0) --> true
Sun 07/05/2020 18:26:18 : [D2D EVENT   ] Event [n004_wholehousefan] [CPW] [157] uom=73 prec=0
Sun 07/05/2020 18:26:18 : [n004_wholehousefan]      CPW 157 (uom=73 prec=0)
Sun 07/05/2020 18:26:18 : [D2D EVENT   ] Event [n004_wholehousefan] [GV3] [1712] uom=7 prec=0
Sun 07/05/2020 18:26:18 : [n004_wholehousefan]      GV3 1712 (uom=7 prec=0)
Sun 07/05/2020 18:26:19 : [D2D EVENT   ] Event [n004_wholehousefan] [ST] [0] uom=56 prec=0
Sun 07/05/2020 18:26:19 : [n004_wholehousefan]       ST   0 (uom=56 prec=0)
Sun 07/05/2020 18:26:19 : [D2D-CMP 005F] STS [n004_wholehousefan] ST op=6 Event(val=0 uom=56 prec=0) != Condition(val=0 uom=56 prec=0) --> false
Sun 07/05/2020 18:26:19 : [D2D-CMP 005F] STS [n004_wholehousefan] ST op=5 Event(val=0 uom=56 prec=0) >= Condition(val=1 uom=56 prec=0) --> false
Sun 07/05/2020 18:26:19 : [D2D EVENT   ] Event [n004_wholehousefan] [CPW] [0] uom=73 prec=0
Sun 07/05/2020 18:26:19 : [n004_wholehousefan]      CPW   0 (uom=73 prec=0)
Sun 07/05/2020 18:26:19 : [D2D EVENT   ] Event [n004_wholehousefan] [GV3] [0] uom=7 prec=0
Sun 07/05/2020 18:26:19 : [n004_wholehousefan]      GV3   0 (uom=7 prec=0)
Sun 07/05/2020 18:26:19 : [D2D EVENT   ] Event [n004_wholehousefan] [CPW] [78] uom=73 prec=0
Sun 07/05/2020 18:26:19 : [n004_wholehousefan]      CPW  78 (uom=73 prec=0)

EDIT: I should add, I can also make this work using ISY programs, but that only lets me turn the fan on at low speed and off, not control the speed. I can have a program like:
HA.fan / WHF / action

If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
Then
        Set 'Fans / Airscape Controller / Airscape WholeHouseFan' Off
Else
        Set 'Fans / Airscape Controller / Airscape WholeHouseFan' Speed Up

Well, it’s ugly (imho), but I have a working solution. It involved some automation (via. node red), an input selector, and a fan template. Here’s what I ended up with just in case anyone else runs into this. If anyone has suggestions for improvements, I would love to hear them.

# Whole House Fan
fan:
  - platform: template
    fans:
      whole_house_fan:
       friendly_name: "Whole House Fan"
       #value_template: "{{ ( states.sensor.airscape_wholehousefan | int ) >= 1 | ^}}"
       value_template: "{% if is_state('sensor.airscape_wholehousefan','0') %}off{% else %}on{% endif %}"
       #speed_template: "{{ states.sensor.airscape_wholehousefan.attributes.custom_control_3 }}"
       speed_template: "{% if is_state('sensor.airscape_wholehousefan','0') %}off{% elif is_state('sensor.airscape_wholehousefan','1') %}low{% elif is_state('sensor.airscape_wholehousefan','2') %}high{% else %}unknown{% endif %}"
       availability_template: "{{ states.sensor.airscape_wholehousefan.attributes.custom_control_1 }}"
       turn_on:
         service: input_select.select_option
         data_template:
           entity_id: input_select.whf_speed
           option: "low"
       turn_off:
         service: input_select.select_option
         data_template:
           entity_id: input_select.whf_speed
           option: "off"
       set_speed:
         service: input_select.select_option
         data_template:
           entity_id: input_select.whf_speed
           option: "{{ speed }}"
       speeds:
       - 'off'
       - low
       - high

input_select:
  whf_speed:
    name: Whole House Fan Speed
    options:
    - high
    - low
    - 'off'
    initial: 'off'
    icon: mdi:fan

Some notes on the flow… Since I can’t use the Polyglot device to control the fan, I’m using the Airscape REST API. The biggest quirk of their API is that you can’t set the speed you can only raise it up and down. So there has to be logic in the flow to act based on the current state of the fan, and that comes from the Polyglot sensor. That means to go from off to high speed, I have to send it two “speed up” commands, and I put a delay between them to give the doors time to open.

I still need to figure out a way to have a button in Lovelace to add time to the timer, but that’s low priority. I don’t use the timer all that often. Most likely I will just tie a button to an input_boolean that resets to false whenever it is pressed.

Would love to be able to implement this as well. I have 2 airscape fans which i have automated and am currently using smartthings and WebCore. Would love to move into Home Assistant.

Agree that you don’t want to ramp up the fan speed till the doors open, but once open you should have the freedom to speed up/down quite quickly.

I’d also love to find a way if the doors can stay open when the fan is “off”, but if fan is off for X minutes to then close the door. My current program ramps up and down based on temp, humidity, open windows, if we are home - but sometimes at night depending on the conditions, the door will open and close more often than I like, which produces a noise that can wake you up…