enesbcs / rpieasy

Easy MultiSensor device based on Raspberry PI
GNU General Public License v3.0
162 stars 33 forks source link

Update to RPIEasy 2.1.327 rules not working #248

Closed AtyKv closed 2 years ago

AtyKv commented 3 years ago

Hi , After update my rules not working . The test email its ok..

some example

On System#Boot=1 do notify 1, RPI Easy Boot endon

On Door#switch=1 do notify 1, Opendoor endon

On Bell#switch=1 do notify 1, BingBang endon

enesbcs commented 3 years ago

Can you try previous commands.py? https://raw.githubusercontent.com/enesbcs/rpieasy/7c16098b4e6a044a5364b5f326553eb7207d35a3/commands.py

AtyKv commented 2 years ago

How to do that ? Some help in Rpieasy pls .

AtyKv commented 2 years ago

How to install the previous commands.py ? thx :)

AtyKv commented 2 years ago

Menege to replace the commands.py file . The rules stil not working .

AtyKv commented 2 years ago

found this in logs 10:56:08 Event can not be added, register backup timer You must setup() the GPIO channel as an input first 10:56:08 Event can not be added, register backup timer You must setup() the GPIO channel as an input first

enesbcs commented 2 years ago

Then it is not rules related problem, i guess you are using two P001 Switch input plugins. From which RPIEasy version do you upgraded, as P001 did not updated at latest commit? Could you double check that in Hardware->Pinout the two GPIO used in the two P001 plugins are Input types?

AtyKv commented 2 years ago

I dont now what version i have . This pi is installed in my electrical board for almoust a year. Works fine until 14 nov .when i mayde the 3 updates from update menu . Now only the test message arrive to my email. The simple On System#Boot=1 do notify 1, RPI Easy Boot endon command not work. Untitled1

enesbcs commented 2 years ago

10:56:08 Event can not be added, register backup timer You must setup() the GPIO channel as an input first 10:56:08 Event can not be added, register backup timer You must setup() the GPIO channel as an input first

According the screenshots, this came from Relay1 and Relay2 as they are not input types. Output types has a dedicated Output helper plugin FYI. But this is not related to the problem.

Did you see any change in Door or Bell Values on the Device page when pin status changes? If not, then it is not Rule related, instead P001 related. P001 has changed a few times in the last year, please enter plugin settings using "Edit" button, make sure, that Long press disabled, use "BOTH" as trigger mode, press submit and retest.

AtyKv commented 2 years ago

Yes it change .I can command the switches from distance . The status is ok . Only the notifications not working .All other functions and timers are ok .

On Sat, Dec 4, 2021 at 8:43 PM Alexander Nagy @.***> wrote:

10:56:08 Event can not be added, register backup timer You must setup() the GPIO channel as an input first 10:56:08 Event can not be added, register backup timer You must setup() the GPIO channel as an input first

According the screenshots, this came from Relay1 and Relay2 as they are not input types. Output types has a dedicated Output helper plugin FYI. But this is not related to the problem.

Did you see any change in Door or Bell Values on the Device page when pin status changes? If not, then it is not Rule related, instead P001 related. P001 has changed a few times in the last year, please enter plugin settings using "Edit" button, make sure, that Long press disabled, use "BOTH" as trigger mode, press submit and retest.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/enesbcs/rpieasy/issues/248#issuecomment-986074445, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWXXC2L6D7KUX5FZIS7O5LLUPJONLANCNFSM5JFQLBOQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

AtyKv commented 2 years ago

On System#Boot=1 do notify 1, RPI Easy Boot endon

This simple command is not working at all . In command window if i type notify 1 the email is working fine .

On Sun, Dec 5, 2021 at 12:33 AM Albert Atilla @.***> wrote:

Yes it change .I can command the switches from distance . The status is ok . Only the notifications not working .All other functions and timers are ok .

On Sat, Dec 4, 2021 at 8:43 PM Alexander Nagy @.***> wrote:

10:56:08 Event can not be added, register backup timer You must setup() the GPIO channel as an input first 10:56:08 Event can not be added, register backup timer You must setup() the GPIO channel as an input first

According the screenshots, this came from Relay1 and Relay2 as they are not input types. Output types has a dedicated Output helper plugin FYI. But this is not related to the problem.

Did you see any change in Door or Bell Values on the Device page when pin status changes? If not, then it is not Rule related, instead P001 related. P001 has changed a few times in the last year, please enter plugin settings using "Edit" button, make sure, that Long press disabled, use "BOTH" as trigger mode, press submit and retest.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/enesbcs/rpieasy/issues/248#issuecomment-986074445, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWXXC2L6D7KUX5FZIS7O5LLUPJONLANCNFSM5JFQLBOQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

tonhuisman commented 2 years ago

System#boot may be too early to send anything, as WiFi is not fully functional yet.

on WiFi#Connected do would probably a beter event to send out anything via... WiFi.

AtyKv commented 2 years ago

On System#Boot=1 do notify 1, RPI Easy Boot endon

On WiFi#Connected=1 do notify 1 , wifi connected endon

On Door#switch=1 do notify 1, Opendoor endon

The wifi command ..... not working no notification

tonhuisman commented 2 years ago

I'm not sure if the WiFi#Connected uses a 1 as the first argument, so you might need to leave the =1 part out.

AtyKv commented 2 years ago

On System#Boot=1 do notify 1, RPI Easy Boot endon

On WiFi#Connected do notify 1 , wifi connected endon

Nope .. :(

tonhuisman commented 2 years ago

so you might need to leave the =1 part out.

And the same is probably true for the System#Boot event. At least on ESPEasy it doesn't have any arguments.

AtyKv commented 2 years ago

Before the update of the rpieasy (14nov) all the rules works fine . I receve all the notifications .

AtyKv commented 2 years ago

If the problem cant be solved is any way to downgrade to a previous version ?

tonhuisman commented 2 years ago

Not sure about the script parsing in RPIEasy, but ESPEasy is somewhat strict on use of commas and spaces as separators, so you might need a little cleanup, and I also added quotes around the arguments that have spaces:

On System#Boot do
notify 1,"RPI Easy Boot"
endon

On WiFi#Connected do
notify 1,"wifi connected"
endon

NB: I haven't tested this on my RPIEasy, that one ended up in semi-longterm storage, so it takes some time to get that running.

Before the update of the rpieasy (14nov) all the rules works fine

Hm, that's quite easy to investigate for @enesbcs I guess, (my Python skills are very limited)

I don't know how to downgrade the RPIEasy installation, sorry.

enesbcs commented 2 years ago

If the problem cant be solved is any way to downgrade to a previous version ?

Yes, github has all versions. But you have to know which version do you want to use...

enesbcs commented 2 years ago

The wifi command ..... not working no notification

Yes, as wifi managed by the Linux Operating System and it 99% of the cases it was on, before RPIEasy starts up...

enesbcs commented 2 years ago

Did you use inverted type on P001 Switch input plugin? As i see the GPIO type is input-pullup, but its value is 0.. If possible please send me your json file for debugging.

tonhuisman commented 2 years ago

as wifi managed by the Linux Operating System and it 99% of the cases it was on, before RPIEasy starts up...

In that case I'd have expected at least 1 time trigger of that event, if only for some backward-compatibility with ESPEasy, that will send that event once WiFi is connected. A lot of (ESPEasy-converted) rules-scripts may expect that.

From reading the last couple of commits I've not detected anything that could break this, but some parts are somewhat hard to understand.

AtyKv commented 2 years ago

Can you help me with the command line syntax ? sudo apt get install ??** from github to install some version befor 13nov . I don't now how to identify .

enesbcs commented 2 years ago

github has a zip archive for every commit... easiest to download and uncompress it manually https://github.com/enesbcs/rpieasy/archive/04023e5d3155c8a9a65000d9b1f56cbf78ca4bb7.zip

enesbcs commented 2 years ago

For first sight "On System#Boot=1 do" has no sense, "On System#Boot do" on the other hand works. I have to do some workaround here i guess.

enesbcs commented 2 years ago

It may solved by commit https://github.com/enesbcs/rpieasy/commit/6d1af9b40f8f0d956dc4bbd150ac9f86a381d5ac

AtyKv commented 2 years ago

Yesss Thank you all :) . Replacing this two files solve the problem .. Have notifications again .

enesbcs commented 2 years ago

as wifi managed by the Linux Operating System and it 99% of the cases it was on, before RPIEasy starts up...

In that case I'd have expected at least 1 time trigger of that event, if only for some backward-compatibility with ESPEasy, that will send that event once WiFi is connected. A lot of (ESPEasy-converted) rules-scripts may expect that.

But its not ESPEasy. And there are even no guarantee, that a wifi device exists under RPIEasy, as it also works with wired LAN alone on an RPI3 or on a pure x86 Linux PC with wires only. :)

From reading the last couple of commits I've not detected anything that could break this, but some parts are somewhat hard to understand.

I guess that this bug is related with a fix at 2021 March which deals with similar Event names. (event, event1, event111...) Ifthere were no equal sign or at least there were on space before equal sign, this error wont popped out.