Phantom rules/apps

Discussions about Z-Way software and Z-Wave technology in general
cdogg76
Posts: 49
Joined: 28 Sep 2014 23:13

Phantom rules/apps

Post by cdogg76 »

Hello,

I have a couple Schedule app configurations to turn lights on/off at specified times that have become phantoms. Basically, I reconfigured those apps to change the times, but they are still running at previous times (and also at the newly configured time).

Where is this data stored in the file system on a Razberry setup? Or, is there some way to rebuild the rules (hopefully without me having to reenter all of my configurations)?

Thanks!
fez
Posts: 147
Joined: 20 Jul 2015 23:03

Re: Phantom rules/apps

Post by fez »

It looks like the registered Cron events were not properly removed by the schedule app you were using.
Try report a bug by the app developer, whoever that night be.
piet66
Posts: 266
Joined: 04 Feb 2017 17:00

Re: Phantom rules/apps

Post by piet66 »

And do a restart of zway server to remove the old cron tasks.
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster, 32bit)
RaZberry by Z-Wave.Me ZW0700 7.20.00 07.38/1766938484 1025/257
Z-Way version v3.2.3 from 2022-04-06 04:56:23 +0300
cdogg76
Posts: 49
Joined: 28 Sep 2014 23:13

Re: Phantom rules/apps

Post by cdogg76 »

Thanks for the suggestions. It's the Schedule app that, I thought, came with the base install. I'm not sure how to submit a bug report to that.

Are these crons actually system crons i.e., via crontab, or are you referring to a proprietary scheduling system within the app? I don't see any actual crons from crontab for my scheduled items. Is there some way I can access those directly?

I'll try rebooting to see if that clears them. I can't remember if I've rebooted since I changed the schedules.

Thanks!
cdogg76
Posts: 49
Joined: 28 Sep 2014 23:13

Re: Phantom rules/apps

Post by cdogg76 »

Unfortunately, the reboot didn't help.
piet66
Posts: 266
Joined: 04 Feb 2017 17:00

Re: Phantom rules/apps

Post by piet66 »

cdogg76 wrote:
07 Feb 2019 03:25
Unfortunately, the reboot didn't help.
So it's caused by different reason than supposed.

zway cron jobs are different from Linux cron tasks. You can find them in storage/configjson.
Or via http://....ip...:8083/ZAutomation/api/v1/instances
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster, 32bit)
RaZberry by Z-Wave.Me ZW0700 7.20.00 07.38/1766938484 1025/257
Z-Way version v3.2.3 from 2022-04-06 04:56:23 +0300
cdogg76
Posts: 49
Joined: 28 Sep 2014 23:13

Re: Phantom rules/apps

Post by cdogg76 »

Hello,

Thanks for the pointers. The file is automation/storage/configjson-... appended with a long string of what appears to be hex numbers. I'm assuming that's it.

But given the hex numbers in the filename, it makes me think this is a generated file. Is that correct? Is this what the z-way UI actually writes to for storage of schedules, or does it write to a db elsewhere, and this file gets generated from that and is what z-way actually executes? That is, is it possible that this file (configjson) might get corrupted, and I can do something to get it regenerated from the actual configurations?

Thanks!
piet66
Posts: 266
Joined: 04 Feb 2017 17:00

Re: Phantom rules/apps

Post by piet66 »

Yes, that's the right file. config.json is an abbreviation for it. You can have a look in it to see if it's corrupted. It's not very likely.

You can do following:
1. http://<ip>:8083/ZAutomation/api/v1/instances/<your instance number> to get the stored configuration of your module instance.
Have a look in it to see whether it is what you have entered.
2. http://<ip>:8083/ZAutomation/api/v1/instances/2 to get the currently active cron jobs.
Search for the cron jobs your instance has created at runtime. Normally the cron task id has the instance number at end.
Look if the cron jobs are created correctly.

If both are correct it's not a cron problem. Perhaps other instance is running at that times? You can check all active cron jobs.

Another try: remove and recreate your instance.
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster, 32bit)
RaZberry by Z-Wave.Me ZW0700 7.20.00 07.38/1766938484 1025/257
Z-Way version v3.2.3 from 2022-04-06 04:56:23 +0300
cdogg76
Posts: 49
Joined: 28 Sep 2014 23:13

Re: Phantom rules/apps

Post by cdogg76 »

Ok, I finally got a chance to dig into this. I had to figure out how to use Postman with cookies as the APIs you listed require authentication.

Anyway, that allowed me to see JSON of schedules, but the only reference to what was being scheduled were strings like "scheduledScene.run.40". I'm assuming those are references to the actual jobs that are stored elsewhere.

What I did was disabled all of my jobs and noticed that there were still some jobs listed. I poked around the Smarthome UI a bit and discovered that there are TWO DIFFERENT locations for scheduled actions. One is the one that I've always used under Apps -> Scheduled. What I didn't realize is that, if I click on the Settings cog at the top, I get a page with panel buttons for Scenes, Rules, Schedules, and others. I clicked on Schedules and found a whole other set of scheduled actions that are basically duplicates of what I had in Apps -> Scheduled EXCEPT they were copies--I had modified some and the old ones were here. So, I was able to disable all of these and just use the ones I'm used to in Apps -> Scheduled.

The question is, then, why do we have two separate ways of creating schedules? I'm assuming the Settings -> Schedules one is newer and, when it was introduced, a copy of my other schedules was made to this...?

Thanks!
User avatar
PoltoS
Posts: 7565
Joined: 26 Jan 2011 19:36

Re: Phantom rules/apps

Post by PoltoS »

Yes, this new system was introduced in v2.3.8 and apparently it messed up few things. We will check it
Post Reply