Popp Z-Rain 700168

I start a new thread about the Popp Z-Rain 700168 since it doesn?t seem to be mentioned anywhere at the forum yet.

I bought a Popp Z-Rain by mistake. I got a 50% discount, couldn’t resist and forgot to check the compatibility chart (https://www.z-wave.se/comp/?search=POPE700168) for the Vera. It’s not compatible. Instead of returning it I decided it was a challenge to get it to work anyway.

The Popp Z-Rain was easy to install on my Vera Edge. But it was not defined as a rain gauge. Two extra “_GET_LANG(generic_sensor,sensor)” devices was also created. I tried to remove them but that also removed the device with the rain level. So I made a reinstallation and kept the extra devices.

I have built some logic in PLEG to first of all filter the rain level value. I found that sometimes the rain device will have a value 1000 times higher than normal and sometimes the rain level value will be 0.
When I had a reliable rain level I added triggers to save the rain level values every 5, 20 minutes, every hour, day, week and every month. By comparing the last rain level with the current rain level I got statistics for rain the last 5, 20 minutes, last hour, day, week and month. This works fine now.
Please let me know if you are interested in the code.

However two problems are remaining.

The Vera show the error message “Can’t Detect Device”. Even if I reset CommFailure the error message is displayed again. No big problem but it would be nice to have the Vera happy face.

The second problem is worse. Every time it’s raining the device gets tripped! So if we are not at home the alarm goes on. Not good.

I would be happy if i got some help with these problems.

Does any body else have experience the Popp Z-Rain device?
Does Mi Casa Verde have any plans to add support for the Popp Z-Rain device?

Best regards
M?rten

I own the same rain sensor, but without concrete description, it’s very confusing for me (not implemented yet by Vera).

@Vera-Support
Any chance to implement this Z-Wave sensor to the comp. list?

@sorliden
Can you tell me, which id’s do you used to get the results see attached pic?

I have this rain gauge too and it is the same problem. It does not work properly as @sorliden wrote. I would like to use it with Vera and fully integrate it. Is possible to ask support team for it or?

In order to get the value, you need to change some parameters.

  • Set device_json to D_GenericSensor1.json
  • Set device_file to D_GenericSensor1.xml

Since this device implements Sensor Multilevel Command Class, this should be the only thing necessary to show its value. As @sorliden wrote, you need to write some code to filter it values (it seems that this device send spikes from time to time) and/or write some logic to show accumulation over a certain period (ie: mm in the last 24 hours, 20 minutes, etc).

Hi!

I’m sorry I haven’t answered here earlier.
I haven’t used my Popp Z-Rain 700168 for two years now since I couldn’t solve the problem that the device get tripped when it’s raining. But I still have the code in my Vera.

I use PLEG to manage logic, dataMine for statistics over time and MultiString for storing values.

Devices:

MultiString:
Rain Levels - 187
Rain Statistics - 188
Rain Strings - 192

Popp Z-Rain - 189 (now uninstalled)

PLEG:

Properties

pRainLast5Minutes - Rain Statistics[188], Variable1
pRainLast20Minutes - Rain Strings[192], Variable3

Schedules

sEveryMinute - Interval 01:00
sEvery5Minutes - Interval 5:00
sEvery20Minutes - Interval 20:00
sEveryHour - Interval 01:00:00
sMidnight - Day of Week 00:00:00, On Days 1,2,3,4,5,6,7 - Day of Week 00:02:00, On Days 1,2,3,4,5,6,7
sFirstOfWeek - Day of Week 00:00:00, On Days 1
sFirstOfMonth - Day of Month, On Days 1

Conditions

cRainCopy - sEveryMinute
cRain5MinutesLevel - Repeats, sEvery5Minutes
cRain20MinutesLevel - sEvery20Minutes
cRainHourLevel - Repeats, sEveryHour
cRainDayLevel - sMidnight
cRainWeekLevel - sFirstOfWeek
cRainMonthLevel - sFirstOfMonth
cRaining - pRainLast20Minutes > 0

Action: cRainCopy
LUA:
local lastLevel = luup.variable_get(“urn:upnp-org:serviceId:VContainer1”, “Variable1”, 192)
lastLevel = tonumber(lastLevel)
local level = luup.variable_get(“urn:micasaverde-com:serviceId:GenericSensor1”, “CurrentLevel”, 189)
level = tonumber(level)
if lastLevel < level / 1000 then
– Fix power of 1000 problem
level = level / 1000
end
if lastLevel < level and lastLevel > level / 2 then
– Update pRainLevel
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “VariableName1”, “RainLevel”, 192)
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “Variable1”, level, 192)
end

Action: cRain5MinutesLevel
LUA:
– Calculate rain of last 5 minutes
local lastLevel = luup.variable_get(“urn:upnp-org:serviceId:VContainer1”, “Variable1”, 187)
local level = luup.variable_get(“urn:upnp-org:serviceId:VContainer1”, “Variable1”, 192)
– Update pRain5MinutesLevel
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “VariableName1”, “5MinutesLevel”, 187)
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “Variable1”, level, 187)
– Update pRainLast5Minutes
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “VariableName1”, “Last5Minutes”, 188)
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “Variable1”, level - lastLevel, 188)

Action: cRain20MinutesLevel
LUA:
– Calculate rain of last 20 minutes
local lastLevel = luup.variable_get(“urn:upnp-org:serviceId:VContainer1”, “Variable2”, 192)
local level = luup.variable_get(“urn:upnp-org:serviceId:VContainer1”, “Variable1”, 192)
– Update pRain20MinutesLevel
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “VariableName2”, “20MinutesLevel”, 192)
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “Variable2”, level, 192)
– Update pRainLast20Minutes
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “VariableName3”, “Last20Minutes”, 192)
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “Variable3”, level - lastLevel, 192)

Action: cRainHourLevel
LUA:
– Calculate rain of last hour
local lastLevel = luup.variable_get(“urn:upnp-org:serviceId:VContainer1”, “Variable2”, 187)
local level = luup.variable_get(“urn:upnp-org:serviceId:VContainer1”, “Variable1”, 192)
– Update pRainHourLevel
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “VariableName2”, “HourLevel”, 187)
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “Variable2”, level, 187)
– Update pRainLastHour
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “VariableName2”, “LastHour”, 188)
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “Variable2”, level - lastLevel, 188)

– Reset Can’t Detect Device
local commfailure = luup.variable_get(“urn:micasaverde-com:serviceId:HaDevice1”, “CommFailure”, 189)
if (commfailure == “1”) then
luup.call_delay( ‘reset_ComFail’, 120)
function reset_ComFail()
luup.variable_set(“urn:micasaverde-com:serviceId:HaDevice1”, “CommFailure”, “0”, 189)
luup.call_action(“urn:micasaverde-com:serviceId:HomeAutomationGateway1”, “Reload”, {}, 0)
end
end

Action: cRainWeekLevel
LUA:
– Calculate rain of last week
local lastLevel = luup.variable_get(“urn:upnp-org:serviceId:VContainer1”, “Variable4”, 187)
local level = luup.variable_get(“urn:upnp-org:serviceId:VContainer1”, “Variable1”, 192)
– Update pRainWeekLevel
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “VariableName4”, “WeekLevel”, 187)
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “Variable4”, level, 187)
– Update pRainLastWeek
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “VariableName4”, “LastWeek”, 188)
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “Variable4”, level - lastLevel, 188)

Action: cRainMonthLevel
LUA:
– Calculate rain of last month
local lastLevel = luup.variable_get(“urn:upnp-org:serviceId:VContainer1”, “Variable5”, 187)
local level = luup.variable_get(“urn:upnp-org:serviceId:VContainer1”, “Variable1”, 192)
– Update pRainMonthLevel
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “VariableName5”, “MonthLevel”, 187)
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “Variable5”, level, 187)
– Update pRainLastMonth
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “VariableName5”, “LastMonth”, 188)
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “Variable5”, level - lastLevel, 188)

Action: cRainDayLevel
LUA:
– Calculate rain of last day
local lastLevel = luup.variable_get(“urn:upnp-org:serviceId:VContainer1”, “Variable3”, 187)
local level = luup.variable_get(“urn:upnp-org:serviceId:VContainer1”, “Variable1”, 192)
– Update pRainDayLevel
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “VariableName3”, “DayLevel”, 187)
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “Variable3”, level, 187)
– Update pRainLastDay
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “VariableName3”, “LastDay”, 188)
luup.variable_set(“urn:upnp-org:serviceId:VContainer1”, “Variable3”, level - lastLevel, 188)

Please let me know if you solve ”the tripped problem”.

Best regards
Mårten

1 Like

Hi @sorliden,
sorry not to let you know earlier. I did not have a time for it, but now with covid-19 quarantine I have time to work on my smart home things :slight_smile: I will try to do it, but can you tell me what PLEG is? I do not know where I can set all these parametres for POPP Z-RAIN.
By the way, do you have Z-Weater station too or not? It will be next step after Z-RAIN…
Thank you in advance!
Eva

Hi!

No problem. I also work with my Vera boxes just once in a while.
Program Logic Event Generator (PLEG) is a Vera app. It also requires the Program Logic Core (PLC) app. It enable you pick properties from devices, define schedules, write complex conditions and execute actions both as LUA code and as immediate actions. Here is the homepage: http://rts-services.com/Vera/Plugin/PLEG/
You can use PLEG for all your logic.
No, I haven’t bought the Z-Weather. But it also seems to have some problems with the Vera: https://www.z-wave.se/comp/?search=POPE005206
The comment says that wind isn’t displayed.

Good luck!

Best regards
Mårten

Best Home Automation shopping experience. Shop at getvera!

© 2020 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules