Zwave rollershutter value is not set after reboot

Hi all,
I have 6 rollershutters (Fibaro FGR-222) in my openhab setup (V2.3 stable).
I noticed that after a reboot of Openhab, the value of the Rollershutter is set to 0, disregarding the actual status of the shutters.
In other words, the power went away today when my shutters were all open (state=100) but when I checked the shutter status, all of them were at state = 0.

How can I force a state update after a power outage?

Request URL

http://192.168.88.5:8080/rest/items/zr6

Response Body

{
“link”: “http://192.168.88.5:8080/rest/items/zr6”,
“state”: “0”,
“stateDescription”: {
“pattern”: “%d %%”,
“readOnly”: false,
“options”: []
},
“editable”: false,
“type”: “Rollershutter”,
“name”: “zr6”,
“label”: “Finestra Pranzo”,
“tags”: [],
“groupNames”: [
“gZwave”
]
}

thing:
Bridge zwave:serial_zstick:controller "ZWave Controller" [ port="/dev/ttyACM0"] 

item:
Rollershutter zr6 "Finestra Pranzo [%d %%]" (gZwave) {channel="zwave:device:controller:node6:blinds_control"}

node.xlm:

<node>
  <deviceClass>
    <basicDeviceClass>ROUTING_SLAVE</basicDeviceClass>
    <genericDeviceClass>MULTILEVEL_SWITCH</genericDeviceClass>
    <specificDeviceClass>MOTOR_CONTROL_CLASS_B</specificDeviceClass>
  </deviceClass>
  <homeId>0xfae647c4</homeId>
  <nodeId>6</nodeId>
  <version>4</version>
  <manufacturer>0x10f</manufacturer>
  <deviceId>0x1000</deviceId>
  <deviceType>0x302</deviceType>
  <listening>true</listening>
  <frequentlyListening>false</frequentlyListening>
  <routing>true</routing>
  <security>false</security>
  <beaming>true</beaming>
  <maxBaudRate>40000</maxBaudRate>
  <nodeInformationFrame>
    <commandClass>MULTI_INSTANCE_ASSOCIATION</commandClass>
    <commandClass>MANUFACTURER_SPECIFIC</commandClass>
    <commandClass>VERSION</commandClass>
    <commandClass>CONFIGURATION</commandClass>
    <commandClass>ASSOCIATION</commandClass>
    <commandClass>POWERLEVEL</commandClass>
    <commandClass>METER</commandClass>
    <commandClass>SWITCH_MULTILEVEL</commandClass>
    <commandClass>SENSOR_MULTILEVEL</commandClass>
    <commandClass>SWITCH_BINARY</commandClass>
    <commandClass>MANUFACTURER_PROPRIETARY</commandClass>
    <commandClass>PROTECTION</commandClass>
  </nodeInformationFrame>
  <supportedCommandClasses>
    <entry>
      <commandClass>PROTECTION</commandClass>
      <protectionCommandClass>
        <version>2</version>
        <instances>1</instances>
        <versionSupported>2</versionSupported>
        <localModes>
          <localProtection>UNPROTECTED</localProtection>
          <localProtection>PROTECTED</localProtection>
        </localModes>
        <rfModes>
          <rfProtection>UNPROTECTED</rfProtection>
          <rfProtection>NORFCONTROL</rfProtection>
        </rfModes>
      </protectionCommandClass>
    </entry>
    <entry>
      <commandClass>BASIC</commandClass>
      <basicCommandClass>
        <version>1</version>
        <instances>1</instances>
        <versionSupported>1</versionSupported>
        <isGetSupported>true</isGetSupported>
      </basicCommandClass>
    </entry>
    <entry>
      <commandClass>ASSOCIATION</commandClass>
      <associationCommandClass>
        <version>2</version>
        <instances>1</instances>
        <versionSupported>2</versionSupported>
        <maxGroups>3</maxGroups>
      </associationCommandClass>
    </entry>
    <entry>
      <commandClass>MANUFACTURER_SPECIFIC</commandClass>
      <manufacturerSpecificCommandClass>
        <version>1</version>
        <instances>1</instances>
        <versionSupported>1</versionSupported>
        <initSerialNumber>false</initSerialNumber>
        <deviceManufacturer>271</deviceManufacturer>
        <deviceType>770</deviceType>
        <deviceId>4096</deviceId>
      </manufacturerSpecificCommandClass>
    </entry>
    <entry>
      <commandClass>POWERLEVEL</commandClass>
      <powerLevelCommandClass>
        <version>1</version>
        <instances>1</instances>
        <versionSupported>1</versionSupported>
        <powerLevel>0</powerLevel>
        <powerTimeout>0</powerTimeout>
      </powerLevelCommandClass>
    </entry>
    <entry>
      <commandClass>VERSION</commandClass>
      <versionCommandClass>
        <version>1</version>
        <instances>1</instances>
        <versionSupported>1</versionSupported>
        <libraryType>LIB_SLAVE_ENHANCED</libraryType>
        <protocolVersion>3.52</protocolVersion>
        <applicationVersion>25.25</applicationVersion>
      </versionCommandClass>
    </entry>
    <entry>
      <commandClass>CONFIGURATION</commandClass>
      <configurationCommandClass>
        <version>1</version>
        <instances>1</instances>
        <versionSupported>1</versionSupported>
        <configParameters>
          <entry>
            <int>32</int>
            <configurationParameter>
              <index>32</index>
              <size>1</size>
              <value>1</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>33</int>
            <configurationParameter>
              <index>33</index>
              <size>1</size>
              <value>1</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>3</int>
            <configurationParameter>
              <index>3</index>
              <size>1</size>
              <value>0</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>35</int>
            <configurationParameter>
              <index>35</index>
              <size>1</size>
              <value>1</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>40</int>
            <configurationParameter>
              <index>40</index>
              <size>1</size>
              <value>10</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>10</int>
            <configurationParameter>
              <index>10</index>
              <size>1</size>
              <value>1</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>42</int>
            <configurationParameter>
              <index>42</index>
              <size>2</size>
              <value>3600</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>43</int>
            <configurationParameter>
              <index>43</index>
              <size>1</size>
              <value>10</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>12</int>
            <configurationParameter>
              <index>12</index>
              <size>2</size>
              <value>150</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>44</int>
            <configurationParameter>
              <index>44</index>
              <size>1</size>
              <value>0</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>13</int>
            <configurationParameter>
              <index>13</index>
              <size>1</size>
              <value>1</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>14</int>
            <configurationParameter>
              <index>14</index>
              <size>1</size>
              <value>0</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>17</int>
            <configurationParameter>
              <index>17</index>
              <size>1</size>
              <value>10</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>18</int>
            <configurationParameter>
              <index>18</index>
              <size>1</size>
              <value>10</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>50</int>
            <configurationParameter>
              <index>50</index>
              <size>1</size>
              <value>0</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>22</int>
            <configurationParameter>
              <index>22</index>
              <size>2</size>
              <value>240</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>29</int>
            <configurationParameter>
              <index>29</index>
              <size>1</size>
              <value>0</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>30</int>
            <configurationParameter>
              <index>30</index>
              <size>1</size>
              <value>2</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
          <entry>
            <int>31</int>
            <configurationParameter>
              <index>31</index>
              <size>1</size>
              <value>0</value>
              <readOnly>false</readOnly>
              <writeOnly>false</writeOnly>
            </configurationParameter>
          </entry>
        </configParameters>
      </configurationCommandClass>
    </entry>
    <entry>
      <commandClass>SENSOR_MULTILEVEL</commandClass>
      <multiLevelSensorCommandClass>
        <version>2</version>
        <instances>1</instances>
        <versionSupported>2</versionSupported>
        <sensors>
          <entry>
            <multilevelSensorType>POWER</multilevelSensorType>
            <multilevelSensor>
              <sensorType>POWER</sensorType>
              <initialised>true</initialised>
            </multilevelSensor>
          </entry>
        </sensors>
        <isGetSupported>true</isGetSupported>
      </multiLevelSensorCommandClass>
    </entry>
    <entry>
      <commandClass>METER</commandClass>
      <meterCommandClass>
        <version>2</version>
        <instances>1</instances>
        <versionSupported>2</versionSupported>
        <meterType>ELECTRIC</meterType>
        <meterScales>
          <meterScale>E_KWh</meterScale>
          <meterScale>E_W</meterScale>
        </meterScales>
        <canReset>true</canReset>
        <isGetSupported>true</isGetSupported>
        <isSupportRequestSupported>true</isSupportRequestSupported>
      </meterCommandClass>
    </entry>
    <entry>
      <commandClass>MULTI_INSTANCE_ASSOCIATION</commandClass>
      <multiAssociationCommandClass>
        <version>2</version>
        <instances>1</instances>
        <versionSupported>2</versionSupported>
        <maxGroups>2</maxGroups>
      </multiAssociationCommandClass>
    </entry>
    <entry>
      <commandClass>SWITCH_MULTILEVEL</commandClass>
      <multiLevelSwitchCommandClass>
        <version>3</version>
        <instances>1</instances>
        <versionSupported>3</versionSupported>
        <switchTypePrimary>CLOSE_OPEN</switchTypePrimary>
        <switchTypeSecondary>CLOSE_OPEN</switchTypeSecondary>
        <isGetSupported>true</isGetSupported>
      </multiLevelSwitchCommandClass>
    </entry>
    <entry>
      <commandClass>NO_OPERATION</commandClass>
      <noOperationCommandClass>
        <version>1</version>
        <instances>1</instances>
        <versionSupported>1</versionSupported>
      </noOperationCommandClass>
    </entry>
    <entry>
      <commandClass>SWITCH_BINARY</commandClass>
      <binarySwitchCommandClass>
        <version>1</version>
        <instances>1</instances>
        <versionSupported>1</versionSupported>
        <isGetSupported>true</isGetSupported>
      </binarySwitchCommandClass>
    </entry>
  </supportedCommandClasses>
  <securedCommandClasses/>
  <associationGroups>
    <entry>
      <int>1</int>
      <associationGroup>
        <index>1</index>
        <associations/>
      </associationGroup>
    </entry>
    <entry>
      <int>2</int>
      <associationGroup>
        <index>2</index>
        <associations/>
      </associationGroup>
    </entry>
    <entry>
      <int>3</int>
      <associationGroup>
        <index>3</index>
        <associations/>
      </associationGroup>
    </entry>
  </associationGroups>
  <nodeNeighbors>
    <int>1</int>
    <int>4</int>
    <int>5</int>
    <int>7</int>
    <int>8</int>
    <int>9</int>
  </nodeNeighbors>
  <lastSent>2018-10-28 10:53:11.995 UTC</lastSent>
  <lastReceived>2018-10-28 10:53:12.36 UTC</lastReceived>
</node>

You can use persistence and restoreOnStartup to restore item values after a restart.
It is recommended to usemapdb for that purpose.

I know the use of Persistence.
But that is not what I meant.

What is the way to read from the zwave device its current state?

The state will be automatically read during the initialisation of the binding. Otherwise you can use the refresh command if you want to read it again.

Hi @chris,
that is what I thought. But in my case, the state has not been read.
And remained = 0 despite the shutters were all up (value=100).

There are some discussions in different forums if “up” is “100” or “0”. :grinning:
In my case “up” is “0”.
Luckily with the FGR222 you can easily invert the channels percentage or control:

Hi,
no the problem is not the inversion.
Infact when setting value=100 the shutter goes fully up.
The problem is that after reboot the actual value is not updated.
It could be in any position i.e. 1,2,10,30,50,99, but after reboot it is set at 0.

Anyone can help?

You need to use a persistence service for that.
Also make sure your association group is set correctly.
If I need to see the actual value instantly after a reboot I just click the “Stop” button which also refreshes the actual state.

Hi @sihui,
persistence service could not be correct as during reboot the shutter could have moved.
Pressing the stop button it not very “smart”.
I need a way that works without any human interaction.

Back to square one: how can I get the roller shutter value just after reboot?

On my system it takes 5 to 10 seconds after a reboot and a fully started openHAB to get the actual state … without human interaction.
As I said, make sure you have your associations set correctly.

Hi,
Today I had the same problem again (and yes I checked the association and it’s correct).
So after a power outage of 5 minutes, when PI3 came online again, it reported the status of the rollershutter = 0 (down), while they were 100 (up).
The problem is reproducible,

  1. open the rollershutters (value=100)
  2. power off the OpenHAB
  3. power off the FGR222 (even better switchoff main power)
  4. after 5 minutes give power to OpenHAB and to the FGR222
  5. After power comes up and OpenHAB has rebooted, the state of the rollershutter will be 0 instead of 100.

Unfortunately, not by me as I don’t have these devices - a debug log is always useful…

Hi @chris,
here they are.
The zwave rollewrshutter items that were affected by the power outage were:
node4,5,6,7 and 8.

events.log (873.2 KB)
openhab.log (302.8 KB)

I have found a workaround. With this workaround the value read after startup is correct:

    rule "shutters read status"
    when
    	System started
    then
    	//USED TO FORCE READ STATUS ON STARTUP
    	sendCommand(zr4,"STOP")
    	sendCommand(zr5,"STOP")
    	sendCommand(zr6,"STOP")
    	sendCommand(zr7,"STOP")
    	sendCommand(zr8,"STOP")
    end

Thanks, but what does the log show? It doesn’t seem to have any ZWave activity in it.

You can view the log here -:
https://www.cd-jackson.com/index.php/openhab/zwave-log-viewer