Page 1 of 1

Fibaro FGS-223 roller shutter level

Posted: Saturday 25 April 2020 14:53
by wervisser
So I recently posted a question about the roller shutter level, but decided to withdraw the question.

@michalux implemented a solution to provide the correct level for the Fibaro FGS-223 roller shutter to Domoticz by modifying the domoticz system file.
He has written about the adjustment in https://www.domoticz.com/forum/viewtopi ... 24&t=30382.

He described the issue as follows:
a) Domoticz does not correctly send the 'Open' command to FGR-223. It sends value 255, which means set last position, not 'Open'. For 'Open', FGR-223 expects value 99 (that is actually quite clearly described in Z-Wave SWITCH_MULTILEVEL command specification). So if You only open/close a blind, that will work, but only due to the fact, that previous position would be 0 (closed) or 99 (opened). But if You try to position the blind i.e on 50% level and then try to open it fully, the blind wont position correctly :(
b) From my experience device.level value does not provide currently set level upon device script execution.
His implemented solution was:
1. Alter the following section in dev-domoticz/hardware/OpenZWave.cpp (this will force domoticz to send value 99 instead of 255 for the "Open" command:

Code: Select all

//dimmable/color light  device
                        if ((svalue > 99) && (svalue != 255))
                                svalue = 99;
                        if (GetValueByCommandClassIndex(pDevice->nodeID, (uint8_t)instanceID, COMMAND_CLASS_SWITCH_MULTILEVEL, ValueID_Index_SwitchMultiLevel::Level, vID) == true)
                        {
                                std::string vLabel = m_pManager->GetValueLabel(vID);

                                // Special case for Fibaro FGR-223 (Roller Shutter 3)
                                if ( (pDevice->Manufacturer_id == 0x010F) && (pDevice->Product_id == 0x1000) && (pDevice->Product_type == 0x0303) ) {
                                        if ( svalue == 255 ) {
                                                pDevice->intvalue = 255;
                                                svalue = 99;
                                        }
                                }
                                 else {
                                        pDevice->intvalue = svalue;
                                 }
To let the devices refresh he implemented the followin dzVents code:

Code: Select all

return {
	on = {
		devices = {
			'BLIND1',
			'BLIND2',
			'BLIND3',
		}
	},
	execute = function(domoticz, device)
	    if device.name == 'BLIND1' then NODEID=2
	      elseif device.name == 'BLIND2' then NODEID=3
	       elseif device.name == 'BLIND3' then NODEID=4
	    end
	    domoticz.openURL({
               url = 'http://127.0.0.1:8080/ozwcp/refreshpost.html',
               method = 'POST',
               postData = { 'fun=racp&node='..NODEID }
            }).afterSec(30)
	end
}
There was a minor issues that OpenZWave control panel or ZWave Controller hardware page has to be opened to load the required 'refreshpost', but that may be resolved in some way.

Would it be possible to implement this feature in a upcoming version?

Re: Fibaro FGS-223 roller shutter level

Posted: Monday 11 May 2020 16:03
by dizzeenl
+1

Re: Fibaro FGS-223 roller shutter level

Posted: Friday 07 August 2020 21:55
by michah
+1

Re: Fibaro FGS-223 roller shutter level

Posted: Monday 22 February 2021 13:50
by Marcjeok
+1 please