more G-Labs products

Author Topic: Fibaro FGS-221  (Read 13400 times)

July 31, 2014, 12:04:25 AM
Read 13400 times

nunofx

  • *
  • Information
  • Newbie
  • Posts: 18
Hi,

I'm new on the forum and HG and started to use it to automate home shutters and everything is working perfectly. Thanks Gene for this nice piece of software.

Now, I installed a FGS-221 double relay to control WC light and fan and noticed the following issues:
- Device specification is not retrieved from Pepper-One DB as you can see on the attached image.
- Virtual module widgets are not updated with the status notification coming from the device, though the physical module widget is (as you can see on the attached image).

Thanks + BRegards,
Nuno

July 31, 2014, 08:54:13 AM
Reply #1

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Hi Nuno,

I'am using Fibaro F221.
Why did you said : Device specification is not retrieved from Pepper-One DB. The image shows the supported classes, so for me that' works.
And for the widgets : Why do you need to put lthe two switchs individually and mixed switch in the same group ?
For me I put only the inindividual ones and it works perfectly.sa you can see in the screenshot following

Cheers
Dani

August 03, 2014, 05:14:37 PM
Reply #2

nunofx

  • *
  • Information
  • Newbie
  • Posts: 18
Hi Dani,

In fact, the info is not read from DB. Look at the attached image from Fibaro shutter controller where you can see the parameter description.

I put the two switches individually and mixed switch in the same group because their change are not being updated. As soon as it works, I'll remove the mixed.

If I control the devices from HG using the widgets, the status is updated. However, If you control the device manually on the wall switch, its status is not reflected on the widget. Even the poll automation is not working for virtual devices (at least on mine).

Thanks + BRegards,
Nuno

August 18, 2014, 03:15:55 PM
Reply #3

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Hi Nuno,

I agree with you when I control the device manually on the wall switch, its status is not reflected on the widget.

Hi Gene,
I join you following Z Wave trace of that problem.
I can help for any test or any trace.
 
Cheers

August 31, 2014, 07:20:36 PM
Reply #4

nunofx

  • *
  • Information
  • Newbie
  • Posts: 18
Hi Nuno,

I agree with you when I control the device manually on the wall switch, its status is not reflected on the widget.

Hi Gene,
I join you following Z Wave trace of that problem.
I can help for any test or any trace.
 
Cheers

Hi Gene. I'm also available for testing. I'm a noobie on HG but with some hints how to use debug mode, I can help ;)

September 01, 2014, 01:22:30 AM
Reply #5

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Hi there,

the issue is due to the fact there's missing code in the MultiInstance/Channel automation program.
To help completing the code follow these steps:

- associate the fgs-221 to node 1 (the controller)
- see fgs-221 documentation and enable level change reporting
- run homegenie in a terminal window to see debug messages from zwavelib
- press the buttons for activating the two channels and report back here the log

by looking at the log I will be able to add the missing piece of code.

Cheers,
g.

September 01, 2014, 12:43:09 PM
Reply #6

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Hi Gene,

You can see my test report some topics upstairs. So I join you again the logs.

Cheers
Dani

September 01, 2014, 01:37:20 PM
Reply #7

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
All right Dani,

found the problem. Actually ZWaveLib do not implement code for multiinstance encapsulated v2 switch binary/multilevel:

https://github.com/genielabs/HomeGenie/blob/master/MIG/Support%20Libraries/ZWaveLib/Devices/ProductHandlers/Generic/Sensor.cs#L151

there was also a todo note about this. I'll be adding the code for the next update.
Can you file a issue to github?

Thanks!
g.

September 01, 2014, 03:20:26 PM
Reply #8

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Hi Gene,

The source code that you give the link is sensor.cs but FGS-221  is not a multisensor but a multiswitch binanry equipement.
I don't understand what you ask me to do "Can you file a issue to github?"

Cheers
Dani

September 01, 2014, 04:25:24 PM
Reply #9

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
oops... =) then the file is:

https://github.com/genielabs/HomeGenie/blob/master/MIG/Support%20Libraries/ZWaveLib/Devices/ProductHandlers/Generic/Switch.cs#L91

where multiinstance incapsulated (60 0D --> COMMAND_MULTIINSTANCEV2_ENCAP = 0x0D) is not handled at all.

Cheers,
g.

September 02, 2014, 11:21:34 AM
Reply #10

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Hi Gene,

Yes I saw the source code. But when I look at it, It seems to me that the parameters are in the good place. Or do I make a mistake ?

Cheers
Dani

September 02, 2014, 02:49:31 PM
Reply #11

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Hi Dani,

I'll try to be more detailed. These commands should already work (at least for the master node status):

Code: [Select]
* Manual Switch ON/OFF Node 3 : Light 1
[17:55:06.698996] SPI > 01 09 00 04 00 03 03 25 03 FF 2B
[17:55:14.804490] SPI > 01 09 00 04 00 03 03 25 03 00 D4

can you confirm?

What I thought was not working is the multilevel binary switch:

Code: [Select]
* Manual Switch ON/OFF Node 3 : Light 2
[17:55:11.281813] SPI > 01 0D 00 04 00 03 07 60 0D 02 02 25 03 FF 46
[17:55:18.072644] SPI > 01 0D 00 04 00 03 07 60 0D 02 02 25 03 00 B9

because I don't see the event log in your file of the parameter ZWaveLib.MultiLevel.SwitchBinary or whatever it is called =)
Looking at the code it seems that it should work because the bytes offset to read the values is already correct (for multilevel sensors when a multiinstance encapsulation v2 is detected the value is read from a different offset).

So, was your log complete? Or did you cut-off some lines?

If the parameter change events are already working, then, as I thought in the beginning only the multilevel program have to be completed (that's good because we can test the program right away without need of updating hg itself).

Cheers,
g.


September 02, 2014, 03:20:08 PM
Reply #12

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
Hi Gene,

You are right, as I write before, the master node is updated.

My logs were complete. I don't remove any line, only add some comments.
So yes, for the instance 1 we receive only a basic line. and for instance 2 a multiinstance line.
I join a screenshot where the master in ON, but not the Node 3.1.

One question : I used Monodevelop but since the version of HomeGenie_linux.sln is in version 12 I can't load the project. under Debian Jessie. Have you an idea to correct that ?
 
Cheers
Dani

September 02, 2014, 03:29:48 PM
Reply #13

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
So it's odd that the event is not showing.. it shoud be.
I am using Monodevelop 5 so perhaps the solution won't work with earlier versions. =/
You can try to search for some backport. Pheraps editing the .sln file and manually changing the version number, could also fix the problem.

g.

September 02, 2014, 03:41:15 PM
Reply #14

dani

  • *****
  • Information
  • Global Moderator
  • Posts: 535
The logs don't show any data other than I have in the file I joined.
I think for the instance 1, the FGS-221 only send a basic line. So We need a specific to map a message for The node 3.1.
Only I don't know why the Node 3.2 doesn't work properely. The message is correct and the source code takes the different parameters in the good place.

For Monodevelop, under Jessie I have installed Monodevelop 4.0.12. And now I can load the project HomeGenie_Linux. Thank's

Dani