Time Concition in Automations

Discussions about Z-Way software and Z-Wave technology in general
User avatar
marco
Posts: 88
Joined: 03 Dec 2015 19:50

Time Concition in Automations

Post by marco »

Good morning dears, I haven't written for a while.
On a system I manage, an anomaly suddenly began to appear for no apparent reason.

I have
zway v4.1.0
raspberry 4

A scene placed in and condition on the height of the sun and two-time comparisons to identify a specific operating time slot has always worked correctly since its creation.

Suddenly it stopped working

I verified that the comparison with the height of the sun triggered a second logic. No problems were encountered.
So I moved on to verifying the time conditions. I was surprised to realize that none of the conditions that can be set take effect.
For example, if I set a light to come on after 10:15, nothing happens even if 10:16 arrives.

I checked that the system time was the same as zway and that both were correctly synchronized; I checked that the system was up to date; that all services were properly started; that the logs were clean of anomalies. I also upgraded zway to v4.1.2.

There was no way to restore the functionality of the time conditions.

Do you have any suggestions?
Marco
User avatar
PoltoS
Posts: 7624
Joined: 26 Jan 2011 19:36

Re: Time Concition in Automations

Post by PoltoS »

Could you please show your app settings?
User avatar
marco
Posts: 88
Joined: 03 Dec 2015 19:50

Re: Time Concition in Automations

Post by marco »

Hi Poltos,
thanks for your support.
following I report the app configuration that has worked till a few days ago.
Cattura1.JPG
Cattura1.JPG (88.04 KiB) Viewed 24547 times
Cattura2.JPG
Cattura2.JPG (81.92 KiB) Viewed 24547 times
Cattura3.JPG
Cattura3.JPG (34.16 KiB) Viewed 24547 times
Now, to continue use it, I'm forced to remove time conditions.
I tested the app also using only time condition (one ore more) and it doesn't work anymore.
Marco
User avatar
marco
Posts: 88
Joined: 03 Dec 2015 19:50

Re: Time Concition in Automations

Post by marco »

Hi, no clues on how to investigate to fix this issue?
Marco
michap
Posts: 442
Joined: 26 Mar 2013 10:35
Contact:

Re: Time Concition in Automations

Post by michap »

Hi,
test_timer.jpg
test_timer.jpg (15.12 KiB) Viewed 24319 times
Just tested, this is working for me.

In log I see:

Code: Select all

[2023-11-16 17:35:18.959] [I] [core] [Astronomy] Calculate
[2023-11-16 17:35:18.967] [I] [core] HK: updated Astronomy_19_altitude
[2023-11-16 17:35:18.972] [I] [core] Notification: device-info (device-status): {"dev":"Solar altitude","l":"-12.41 °","location":0}
[2023-11-16 17:35:18.983] [I] [core] HK: updated Astronomy_19_azimuth
[2023-11-16 17:35:18.986] [I] [core] Notification: device-info (device-status): {"dev":"Solar azimuth","l":"255.42 °","location":0}
[2023-11-16 17:35:19.058] [I] [core] ---  DummyDevice_16 performCommand processing: {"0":"on"}
[2023-11-16 17:35:19.061] [I] [core] HK: updated DummyDevice_16
[2023-11-16 17:35:19.063] [I] [core] Notification: device-info (device-OnOff): {"dev":"dummy switch","l":"on","location":0}
What is important - that the time condition is only working together with a "device event" - because only the event itself will trigger the rule.
(That's why it was not fired at 17:35:00 - but after altitude device was updated...

Maybe you can check it in log?

Best regards
Michael
User avatar
marco
Posts: 88
Joined: 03 Dec 2015 19:50

Re: Time Concition in Automations

Post by marco »

Dear Michael thank you for your reply.
As I wrote before, the scene worked perfectly since it was created till few days ago.
Suddenly for no apparent reason stopped working. This is the reason I'm lost.
I tried to manage with different configurations and what I can say is that time conditions don't work any more.
The log seems ok.
I don't know what to check.
Marco
michap
Posts: 442
Joined: 26 Mar 2013 10:35
Contact:

Re: Time Concition in Automations

Post by michap »

Hi Marco,

there are different things I would check,... Maybe I do not know all of your tests ;)

1) if you remove only time conditions - the automation will work?

2) when the condition will appear (solar altitude <5) ?
(when rule will be triggered without the time conditions?)
Can you check it (time) in log?

3) for checking the time module - create a scheduler automation for testing - switch something on/off at any time and check it
(also check in log)

4) all automations stored in json file
z-way-server/automation/storage/configjson-xxxxxx.json
-> you could copy it and check the content with a json viewer.
you will see here something like that (in "instances"):
test_timer2.jpg
test_timer2.jpg (47.74 KiB) Viewed 24278 times
So you could be sure that all is stored right at system.

5) check the Z-Way log for any errors (grep file for "Error") and look for any "suspect" messages - but I think this you have already done....

Best regards
Michael
User avatar
marco
Posts: 88
Joined: 03 Dec 2015 19:50

Re: Time Concition in Automations

Post by marco »

As per my above written, most of the checks have been already done. Any way

1)Yes. With no time condition, it still working now.
2)Yes.
It turns on when the altitude becomes less than 5
[2023-11-15 16:06:43.354] [core] [Astronomy] Calculate
[2023-11-15 16:06:43.408] [core] --- ZWayVDev_zway_35-0-37 performCommand processing: {"0":"on"}
[2023-11-15 16:06:43.408] [zway] Adding job: SwitchBinary Set to node 35
[2023-11-15 16:06:43.408] [zway] Adding job: SwitchBinary Get to node 35
[2023-11-15 16:06:43.408] [core] [BaseModule-22] Set lastLevel to 4.85 for Astronomy_21_altitude (was 5.01)
[2023-11-15 16:06:43.410] [core] [BaseModule-22] Set lastLevel to 240.63 for Astronomy_21_azimuth (was 240.46)

and turn off when
[2023-11-15 07:17:34.463] [core] [Astronomy] Calculate
[2023-11-15 07:17:34.517] [core] --- ZWayVDev_zway_35-0-37 performCommand processing: {"0":"off"}
[2023-11-15 07:17:34.518] [zway] Adding job: SwitchBinary Set to node 35
[2023-11-15 07:17:34.518] [zway] Adding job: SwitchBinary Get to node 35
[2023-11-15 07:17:34.518] [I] [core] [BaseModule-22] Set lastLevel to 5.05 for Astronomy_21_altitude (was 4.88)
[2023-11-15 07:17:34.520] [I] [core] [BaseModule-22] Set lastLevel to 119.44 for Astronomy_21_azimuth (was 119.27)

3) Also checked: it doesn't work and nothing is reported in the log.

4)this is new to me
first, the one working
{
"id": 10,
"moduleId": "Rules",
"active": true,
"title": "LR - Controllo Faro Esterno",
"params": {
"simple": {
"triggerEvent": {
"deviceId": "Astronomy_21_altitude",
"deviceType": "sensorMultilevel",
"level": 5,
"operator": "<=",
"sendAction": false,
"reverseLevel": null
},
"triggerDelay": 0,
"targetElements": [],
"sendNotifications": [],
"reverseDelay": 0
},
"advanced": {
"active": true,
"triggerScenes": [],
"triggerDelay": 0,
"logicalOperator": "and",
"tests": [
{
"deviceId": "Astronomy_21_altitude",
"type": "sensorMultilevel",
"level": 5,
"operator": "<",
"sendAction": false
}
],
"targetElements": [
{
"deviceId": "ZWayVDev_zway_35-0-37",
"deviceType": "switchBinary",
"level": "on",
"sendAction": false,
"reverseLevel": "off"
}
],
"sendNotifications": [],
"reverseDelay": 0,
"triggerOnDevicesChange": true,
"expertSettings": true
},
"reverse": true
},
"creationTime": 1698205748,
"category": "system"
}


and then the other not working

{
"id": 14,
"moduleId": "Rules",
"active": true,
"title": "Rules",
"params": {
"simple": {
"triggerEvent": {},
"triggerDelay": 0,
"targetElements": [],
"sendNotifications": [],
"reverseDelay": 0
},
"advanced": {
"active": true,
"triggerScenes": [],
"triggerDelay": 0,
"logicalOperator": "and",
"tests": [
{
"type": "time",
"operator": ">=",
"level": "17:22"
}
],
"targetElements": [
{
"deviceId": "DummyDevice_12",
"deviceType": "switchBinary",
"level": "on",
"sendAction": false,
"reverseLevel": "off"
}
],
"sendNotifications": [],
"reverseDelay": 0,
"triggerOnDevicesChange": true
},
"reverse": true
},
"creationTime": 1698674452,
"category": "system"
},

I see something strange but please give me your feedback

5)following the only type of error reported:
[2023-11-15 00:03:40.961] [D] [zway] SETDATA controller.data.statistics.RFRxLRCErrors = 25 (0x00000019)
[2023-11-15 00:03:40.961] [D] [zway] SETDATA controller.data.statistics.RFRxCRC16Errors = 0 (0x00000000)

nothing related to the issue.

Let me know if you have any idea.
Thanks
Marco
michap
Posts: 442
Joined: 26 Mar 2013 10:35
Contact:

Re: Time Concition in Automations

Post by michap »

Hi,

the second rule (json) will not work as far as I understand, because there is no "trigger" inside.
Time only cannot be a trigger, only a condition. Here is missing the changing altitude event like "if altitude <5".

But if time scheduler is also not working - then it sounds strange for me....

I would try to restart the Pi and check then the Z-Way log again for any errors after start process...

Michael
michap
Posts: 442
Joined: 26 Mar 2013 10:35
Contact:

Re: Time Concition in Automations

Post by michap »

BTW: the App "System Clock (CRON)" is enabled in your Z-Way installation? ;)
Post Reply