Fibaro FGMS-001 Set Parameter/Attribute via DzVents  [Solved]

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
User avatar
elzorrovega
Posts: 65
Joined: Friday 08 May 2020 19:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.2
Location: Bordeaux, France
Contact:

Fibaro FGMS-001 Set Parameter/Attribute via DzVents

Post by elzorrovega »

Hello,

Thanks to posts from Waaren and DDuck, I have solved my GLIBC issues with my Raspberry PI (RPI) which now runs the Buster Distribution.

https://www.domoticz.com/forum/viewtopi ... PI#p228784

Domoricz is now running in RPI
Version: 2020.2
Build Hash: b63341bc0
Compile Date: 2020-04-26 13:47:55
dzVents Version: 3.0.2

Domoticz is used as an alarm system with the following hardware:

#Z WAVE HARDWARE#
• MOTION SENSOR FGMS-001 Fibaro System Fibar Group sp. z.o.o Poznan,Poland
• DOOR/WINDOW SENSOR 2 FGDW-002 Fibaro System Fibar Group sp. z.o.o Poznan,Poland
• WALL PLUG – TYPE E/F FGWPE/F-101 Fibaro System Fibar Group sp. z.o.o Poznan,Poland
• SIREN Siren Gen 5 Aeotec by Aeon Labs Santa Clara,CA,USA
• ZROOM RFID KEYPAD Wintop Shanghai,China (Radio Frequency Identifier)
• Z-STICK GEN5 CONTROLLER ZZW090-C(868.42 MHz) Aeotec by Aeon Labs Santa Clara,CA,USA

COVID-19 situation has, at least in France, confined most of us at home for over two months and it was not until a few days ago that I noticed that Domoticz was down. Thus, the need to upgrade to Debian Buster release. When I had Domoticz up and running I noticed that all motion and door opening devices batteries levels were flat-out. I have been tweaking the devices parameters to stop sending report and minimize all no-essential tasks to prolong battery life. Yesterday, bill was € 45 for six batteries and I would like make this a yearly event rather than quarterly.

Domoticz's Setup tab allows one to change device attributes/parameters and the FIBARO Motion Device Parameter 8 has three states: PIR Sensor Always Active; PIR Sensor Active during the day only; PIR Sensor Active during the night only. While Parameter 9 defines the difference between day and night. Setting the PIR Active at night only and adjusting the day/night setting one effectively enables PIR during the night. I used the method domoticz.devices('Hall Motion Sensor').dump() but I do not see any variable that resembles the PIR Sensor Active parameter.

I have looked in the forum for examples of how to set parameters/attributes via DzVents and I see that most likely the settings of devices must be set with JSON commands.

Is this the correct path?

Regards,

El ZorroVega
The solution to the problem changes the problem!

Rasberry Pi 4 Model B; Bookworm 64 bit OS 6.12.47+rpt-rpi-v8
Domoticz Version: 2025.2
zwave-js-ui: 10.4.2.d3a89a7
zwave-js: 15.3.1
home id: 3714679688
home hex: 0xdd698388
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Fibaro FGMS-001 Set Parameter/Attribute via DzVents

Post by waaren »

elzorrovega wrote: Friday 08 May 2020 20:39 Domoticz's Setup tab allows one to change device attributes/parameters and the FIBARO Motion Device Parameter 8 has three states: PIR Sensor Always Active; PIR Sensor Active during the day only; PIR Sensor Active during the night only. While Parameter 9 defines the difference between day and night. Setting the PIR Active at night only and adjusting the day/night setting one effectively enables PIR during the night.

I see that most likely the settings of devices must be set with JSON commands.
Maybe correct but do you really want to send this type of JSON ? Below you see the JSON that is send to one of my zwave devices to update one parm from 200 to 201

Code: Select all

http://dz:8084/json.htm?type=command&param=applyzwavenodeconfig&idx=8&valuelist=1_MTA%3D_2_MTU%3D_6_MzA%3D_9_MjAw_14_MjU1_16_MA%3D%3D_20_MTU%3D_22_MzA%3D_40_MjAw_42_MA%3D%3D_60_MTA%3D_62_OTAw_64_MA%3D%3D_66_MA%3D%3D_81_NTE%3D_82_MTAw_83_MTAwMA%3D%3D_86_MTg%3D_87_Mjg%3D_2000_NzIwMA%3D%3D_3_MiBwdWxzZXM%3D_4_MTIgc2Vjb25kcw%3D%3D_8_UElSIHNlbnNvciBhbHdheXMgYWN0aXZl_12_QkFTSUMgT04gYW5kIEJBU0lDIE9GRiBjb21tYW5kIGZyYW1lcyBzZW50IGluIEJhc2ljIENvbW1hbmQgQ2xhc3Mu_24_VGFtcGVy_26_VGFtcGVyIGFsYXJtIGlzIG5vdCBzZW50IGluIGJyb2FkY2FzdCBtb2RlLg%3D%3D_80_TG9uZyBibGluaywgdGhlbiBzaG9ydCBibGluaywgTEVEIGNvbG91ciBkZXBlbmRzIG9uIHRoZSB0ZW1wZXJhdHVyZS4gU2V0IGJ5IHBhcmFtZXRlcnMgODYgYW5kIDg3Lg%3D%3D_89_TEVEIGluZGljYXRlcyB0YW1wZXIgYWxhcm0u_

Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
elzorrovega
Posts: 65
Joined: Friday 08 May 2020 19:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.2
Location: Bordeaux, France
Contact:

Re: Fibaro FGMS-001 Set Parameter/Attribute via DzVents

Post by elzorrovega »

Hello Waaren,

Thanks for your reply.

I am a firm believer in simple is beautiful; thus, I agree that the long JSON command to change one parameter is somewhat excessive . I would like to write a DzVents script which will "blind" the FIBARO Motion sensors when someone is at home to save battery life. For the moment, motion sensors only trigger Sirens when there is an intruder.

FIBARO FGMS001 Motion Sensor have the configuration pages as below and by changing these attributes they do not trigger when someone crosses the sensor's detection area.

Image

The device dump() below does not give anything obvious where I could change the PIR Sensor Operating Mode. I see in the documentation that we have the device method rawData[!!].

Is this another way of reading/writing to the device? If this is the case, so then I guess it would be too easy to say write to the eighth element in the device table and set to 0, 1 or 2.

Your feedback is greatly appreciated. :D

Code: Select all

Living Motion Sensor Device Dump 
2020-05-16 15:40:00.357 Status: dzVents: > urlEncode()
2020-05-16 15:40:00.357 Status: dzVents: > toBase64()
2020-05-16 15:40:00.357 Status: dzVents: > stringToSeconds()
2020-05-16 15:40:00.357 Status: dzVents: > inTable()
2020-05-16 15:40:00.357 Status: dzVents: > centerPad()
2020-05-16 15:40:00.357 Status: dzVents: > LOG_FORCE: 0.5
2020-05-16 15:40:00.357 Status: dzVents: > variableExists()
2020-05-16 15:40:00.357 Status: dzVents: > toXML()
2020-05-16 15:40:00.357 Status: dzVents: > fromBase64()
2020-05-16 15:40:00.357 Status: dzVents: > cameraExists()
2020-05-16 15:40:00.357 Status: dzVents: > print()
2020-05-16 15:40:00.357 Status: dzVents: > DZVERSION: 3.0.2
2020-05-16 15:40:00.357 Status: dzVents: > fromXML()
2020-05-16 15:40:00.357 Status: dzVents: > LOG_ERROR: 1
2020-05-16 15:40:00.357 Status: dzVents: > osExecute()
2020-05-16 15:40:00.357 Status: dzVents: > rgbToHSB()
2020-05-16 15:40:00.357 Status: dzVents: > rightPad()
2020-05-16 15:40:00.357 Status: dzVents: > deviceExists()
2020-05-16 15:40:00.357 Status: dzVents: > fromJSON()
2020-05-16 15:40:00.357 Status: dzVents: > stringSplit()
2020-05-16 15:40:00.357 Status: dzVents: > dumpTable()
2020-05-16 15:40:00.357 Status: dzVents: > round()
2020-05-16 15:40:00.357 Status: dzVents: > groupExists()
2020-05-16 15:40:00.357 Status: dzVents: > fileExists()
2020-05-16 15:40:00.357 Status: dzVents: > urlDecode()
2020-05-16 15:40:00.357 Status: dzVents: > toCelsius()
2020-05-16 15:40:00.357 Status: dzVents: > numDecimals()
2020-05-16 15:40:00.357 Status: dzVents: > hsbToRGB()
2020-05-16 15:40:00.357 Status: dzVents: > LOG_INFO: 3
2020-05-16 15:40:00.358 Status: dzVents: > LOG_MODULE_EXEC_INFO: 2
2020-05-16 15:40:00.358 Status: dzVents: > leftPad()
2020-05-16 15:40:00.358 Status: dzVents: > log()
2020-05-16 15:40:00.358 Status: dzVents: > LOG_DEBUG: 4
2020-05-16 15:40:00.358 Status: dzVents: > setLogMarker()
2020-05-16 15:40:00.358 Status: dzVents: > sceneExists()
2020-05-16 15:40:00.358 Status: dzVents: > toJSON()
2020-05-16 15:40:00.358 Status: dzVents: > current:
2020-05-16 15:40:00.358 Status: dzVents: > yday: 137
2020-05-16 15:40:00.358 Status: dzVents: > sec: 0
2020-05-16 15:40:00.358 Status: dzVents: > min: 40
2020-05-16 15:40:00.358 Status: dzVents: > isdst: true
2020-05-16 15:40:00.358 Status: dzVents: > hour: 15
2020-05-16 15:40:00.358 Status: dzVents: > wday: 7
2020-05-16 15:40:00.358 Status: dzVents: > year: 2020
2020-05-16 15:40:00.358 Status: dzVents: > month: 5
2020-05-16 15:40:00.358 Status: dzVents: > day: 16
2020-05-16 15:40:00.358 Status: dzVents: > ruleIsAtNight()
2020-05-16 15:40:00.358 Status: dzVents: > ruleIsAfterSunrise()
2020-05-16 15:40:00.358 Status: dzVents: > dayName: Saturday
2020-05-16 15:40:00.358 Status: dzVents: > makeTime()
2020-05-16 15:40:00.358 Status: dzVents: > ruleIsAfterCivilTwilightStart()
2020-05-16 15:40:00.358 Status: dzVents: > ruleIsOnDay()
2020-05-16 15:40:00.358 Status: dzVents: > addDays()
2020-05-16 15:40:00.358 Status: dzVents: > millisecondsAgo: 442206
2020-05-16 15:40:00.358 Status: dzVents: > compare()
2020-05-16 15:40:00.358 Status: dzVents: > ruleIsAtCivilTwilightStart()
2020-05-16 15:40:00.358 Status: dzVents: > ruleIsOnDate()
2020-05-16 15:40:00.358 Status: dzVents: > addSeconds()
2020-05-16 15:40:00.359 Status: dzVents: > day: 16
2020-05-16 15:40:00.359 Status: dzVents: > seconds: 38
2020-05-16 15:40:00.359 Status: dzVents: > milliSeconds: 0
2020-05-16 15:40:00.359 Status: dzVents: > hoursAgo: 0
2020-05-16 15:40:00.359 Status: dzVents: > yday: 137
2020-05-16 15:40:00.359 Status: dzVents: > daysAgo: 0
2020-05-16 15:40:00.359 Status: dzVents: > week: 20
2020-05-16 15:40:00.359 Status: dzVents: > isdst: true
2020-05-16 15:40:00.359 Status: dzVents: > month: 5
2020-05-16 15:40:00.359 Status: dzVents: > raw: 2020-05-16 15:32:38
2020-05-16 15:40:00.359 Status: dzVents: > ruleIsAtCivilDayTime()
2020-05-16 15:40:00.359 Status: dzVents: > isToday: true
2020-05-16 15:40:00.359 Status: dzVents: > rawTime: 15:32:38
2020-05-16 15:40:00.359 Status: dzVents: > ruleMatchesBetweenRange()
2020-05-16 15:40:00.359 Status: dzVents: > ruleIsBeforeCivilTwilightEnd()
2020-05-16 15:40:00.359 Status: dzVents: > ruleIsAtDayTime()
2020-05-16 15:40:00.359 Status: dzVents: > ruleMatchesTime()
2020-05-16 15:40:00.359 Status: dzVents: > ruleIsAtCivilTwilightEnd()
2020-05-16 15:40:00.359 Status: dzVents: > ruleIsAfterSunset()
2020-05-16 15:40:00.359 Status: dzVents: > ruleMatchesHourSpecification()
2020-05-16 15:40:00.359 Status: dzVents: > ruleMatchesTimeRange()
2020-05-16 15:40:00.359 Status: dzVents: > min: 32
2020-05-16 15:40:00.359 Status: dzVents: > ruleMatchesMinuteSpecification()
2020-05-16 15:40:00.359 Status: dzVents: > minutesSinceMidnight: 932
2020-05-16 15:40:00.359 Status: dzVents: > wday: 7
2020-05-16 15:40:00.359 Status: dzVents: > monthAbbrName: may
2020-05-16 15:40:00.359 Status: dzVents: > msAgo: 442206
2020-05-16 15:40:00.359 Status: dzVents: > rawDateTime: 2020-05-16 15:32:38
2020-05-16 15:40:00.360 Status: dzVents: > hour: 15
2020-05-16 15:40:00.360 Status: dzVents: > dDate: 1589635958
2020-05-16 15:40:00.360 Status: dzVents: > ruleIsAtCivilNightTime()
2020-05-16 15:40:00.360 Status: dzVents: > time: 15:32
2020-05-16 15:40:00.360 Status: dzVents: > ruleIsBeforeSunset()
2020-05-16 15:40:00.360 Status: dzVents: > rawDate: 2020-05-16
2020-05-16 15:40:00.360 Status: dzVents: > ruleIsAtSunrise()
2020-05-16 15:40:00.360 Status: dzVents: > ruleIsBeforeCivilTwilightStart()
2020-05-16 15:40:00.360 Status: dzVents: > secondsAgo: 442
2020-05-16 15:40:00.360 Status: dzVents: > isUTC: false
2020-05-16 15:40:00.360 Status: dzVents: > getISO()
2020-05-16 15:40:00.360 Status: dzVents: > dayAbbrOfWeek: sat
2020-05-16 15:40:00.360 Status: dzVents: > year: 2020
2020-05-16 15:40:00.360 Status: dzVents: Info: ------ Finished Raw
Attachments
fibaro_par.png
fibaro_par.png (32.68 KiB) Viewed 1978 times
The solution to the problem changes the problem!

Rasberry Pi 4 Model B; Bookworm 64 bit OS 6.12.47+rpt-rpi-v8
Domoticz Version: 2025.2
zwave-js-ui: 10.4.2.d3a89a7
zwave-js: 15.3.1
home id: 3714679688
home hex: 0xdd698388
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Fibaro FGMS-001 Set Parameter/Attribute via DzVents

Post by waaren »

elzorrovega wrote: Saturday 16 May 2020 17:42 I see in the documentation that we have the device method rawData[!!].
rawData is not a method but the sValue field split into separate entries.

for example if sValue is 732.616;2297.2;164.007;101.857;1080.0;0.0 then

rawData[1] = 732.616
rawData[2] = 2297.2
rawData[3] = 164.007
rawData[4] = 101.857
rawData[5] = 1080.0
rawData[6] = 0.0
Is this another way of reading/writing to the device? If this is the case, so then I guess it would be too easy to say write to the eighth element in the device table and set to 0, 1 or 2.
Not with a native dzVents command. So it is either manual or by the long JSON.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
ksacca
Posts: 80
Joined: Thursday 31 May 2018 21:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Fibaro FGMS-001 Set Parameter/Attribute via DzVents

Post by ksacca »

Don’t forget the motion sensor is battery powered, so it goes to sleep. Those settings will only be applied if the device wakes up, so it might not work as expected (unless you set the wake up interval to a very short value, but that might affect battery life).
User avatar
elzorrovega
Posts: 65
Joined: Friday 08 May 2020 19:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.2
Location: Bordeaux, France
Contact:

Re: Fibaro FGMS-001 Set Parameter/Attribute via DzVents  [Solved]

Post by elzorrovega »

Hello,

The current Wake-up interval for the motion sensor is 900 seconds.

I was under the impression that commands were stored in a cue and the concerned device would read it's command after "waking-up".

Please find below the JSON messages.
  • Can these be simplified so that only the concerned parameter (_8_) appears in the message or must we keep the rest of the device attributes as per examples below?
  • Can this JSON call be made from within dzVents using the domoticz.openURL method or must one use a BASH command to execute it?
Thanks for you help. :D

P.S I checked on the site https://www.base64decode.org/ to be sure that the settings for _8_ are as in the GUI.

PIR sensor always active

Code: Select all

http://192.168.1.30:8080/json.htm?type=command&param=applyzwavenodeconfig&idx=5&valuelist=1_MTA%3D_2_MTU%3D_6_MzA%3D_9_Ng%3D%3D_14_MjU1_16_MA%3D%3D_20_MTU%3D_22_MzA%3D_40_MjAw_42_MA%3D%3D_60_MTA%3D_62_OTAw_64_MA%3D%3D_66_MA%3D%3D_81_NTA%3D_82_MTAw_83_MTAwMA%3D%3D_86_MTg%3D_87_Mjg%3D_2000_OTAw_3_MiBwdWxzZXM%3D_4_MTIgc2Vjb25kcw%3D%3D_8_UElSIHNlbnNvciBhbHdheXMgYWN0aXZl_12_QkFTSUMgT04gYW5kIEJBU0lDIE9GRiBjb21tYW5kIGZyYW1lcyBzZW50IGluIEJhc2ljIENvbW1hbmQgQ2xhc3Mu_24_VGFtcGVy_26_VGFtcGVyIGFsYXJtIGlzIG5vdCBzZW50IGluIGJyb2FkY2FzdCBtb2RlLg%3D%3D_80_TG9uZyBibGluaywgdGhlbiBzaG9ydCBibGluaywgTEVEIGNvbG91ciBkZXBlbmRzIG9uIHRoZSB0ZW1wZXJhdHVyZS4gU2V0IGJ5IHBhcmFtZXRlcnMgODYgYW5kIDg3Lg%3D%3D_89_TEVEIGluZGljYXRlcyB0YW1wZXIgYWxhcm0u_
PIR sensor active during the day only

Code: Select all

http://192.168.1.30:8080/json.htm?type=command&param=applyzwavenodeconfig&idx=5&valuelist=1_MTA%3D_2_MTU%3D_6_MzA%3D_9_Ng%3D%3D_14_MjU1_16_MA%3D%3D_20_MTU%3D_22_MzA%3D_40_MjAw_42_MA%3D%3D_60_MTA%3D_62_OTAw_64_MA%3D%3D_66_MA%3D%3D_81_NTA%3D_82_MTAw_83_MTAwMA%3D%3D_86_MTg%3D_87_Mjg%3D_2000_OTAw_3_MiBwdWxzZXM%3D_4_MTIgc2Vjb25kcw%3D%3D_8_UElSIHNlbnNvciBhY3RpdmUgZHVyaW5nIHRoZSBkYXkgb25seQ%3D%3D_12_QkFTSUMgT04gYW5kIEJBU0lDIE9GRiBjb21tYW5kIGZyYW1lcyBzZW50IGluIEJhc2ljIENvbW1hbmQgQ2xhc3Mu_24_VGFtcGVy_26_VGFtcGVyIGFsYXJtIGlzIG5vdCBzZW50IGluIGJyb2FkY2FzdCBtb2RlLg%3D%3D_80_TG9uZyBibGluaywgdGhlbiBzaG9ydCBibGluaywgTEVEIGNvbG91ciBkZXBlbmRzIG9uIHRoZSB0ZW1wZXJhdHVyZS4gU2V0IGJ5IHBhcmFtZXRlcnMgODYgYW5kIDg3Lg%3D%3D_89_TEVEIGluZGljYXRlcyB0YW1wZXIgYWxhcm0u_
PIR sensor active during the night only

Code: Select all

http://192.168.1.30:8080/json.htm?type=command&param=applyzwavenodeconfig&idx=5&valuelist=1_MTA%3D_2_MTU%3D_6_MzA%3D_9_Ng%3D%3D_14_MjU1_16_MA%3D%3D_20_MTU%3D_22_MzA%3D_40_MjAw_42_MA%3D%3D_60_MTA%3D_62_OTAw_64_MA%3D%3D_66_MA%3D%3D_81_NTA%3D_82_MTAw_83_MTAwMA%3D%3D_86_MTg%3D_87_Mjg%3D_2000_OTAw_3_MiBwdWxzZXM%3D_4_MTIgc2Vjb25kcw%3D%3D_8_UElSIHNlbnNvciBhY3RpdmUgZHVyaW5nIHRoZSBuaWdodCBvbmx5_12_QkFTSUMgT04gYW5kIEJBU0lDIE9GRiBjb21tYW5kIGZyYW1lcyBzZW50IGluIEJhc2ljIENvbW1hbmQgQ2xhc3Mu_24_VGFtcGVy_26_VGFtcGVyIGFsYXJtIGlzIG5vdCBzZW50IGluIGJyb2FkY2FzdCBtb2RlLg%3D%3D_80_TG9uZyBibGluaywgdGhlbiBzaG9ydCBibGluaywgTEVEIGNvbG91ciBkZXBlbmRzIG9uIHRoZSB0ZW1wZXJhdHVyZS4gU2V0IGJ5IHBhcmFtZXRlcnMgODYgYW5kIDg3Lg%3D%3D_89_TEVEIGluZGljYXRlcyB0YW1wZXIgYWxhcm0u_
The solution to the problem changes the problem!

Rasberry Pi 4 Model B; Bookworm 64 bit OS 6.12.47+rpt-rpi-v8
Domoticz Version: 2025.2
zwave-js-ui: 10.4.2.d3a89a7
zwave-js: 15.3.1
home id: 3714679688
home hex: 0xdd698388
User avatar
elzorrovega
Posts: 65
Joined: Friday 08 May 2020 19:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.2
Location: Bordeaux, France
Contact:

Re: Fibaro FGMS-001 Set Parameter/Attribute via DzVents

Post by elzorrovega »

Hello,

If a solution is of interest to you. Please follow link below.

https://www.domoticz.com/forum/viewtopi ... 09#p248538

ElZorroVega :D
The solution to the problem changes the problem!

Rasberry Pi 4 Model B; Bookworm 64 bit OS 6.12.47+rpt-rpi-v8
Domoticz Version: 2025.2
zwave-js-ui: 10.4.2.d3a89a7
zwave-js: 15.3.1
home id: 3714679688
home hex: 0xdd698388
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest