Fibaro FGS-223 roller shutter level

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
wervisser
Posts: 29
Joined: Monday 28 November 2016 18:38
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Contact:

Fibaro FGS-223 roller shutter level

Post 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?
dizzeenl
Posts: 31
Joined: Wednesday 14 November 2018 23:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Dordrecht
Contact:

Re: Fibaro FGS-223 roller shutter level

Post by dizzeenl »

+1
michah
Posts: 4
Joined: Saturday 02 May 2020 15:54
Target OS: Raspberry Pi / ODroid
Domoticz version: dev-fork
Location: The Netherlands
Contact:

Re: Fibaro FGS-223 roller shutter level

Post by michah »

+1
Marcjeok
Posts: 37
Joined: Wednesday 01 November 2017 19:12
Target OS: -
Domoticz version:
Location: Netherlands
Contact:

Re: Fibaro FGS-223 roller shutter level

Post by Marcjeok »

+1 please
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest