How to trigger a script on pi 3?


#62

you can also use trigger now, they are working.


#63

I tried with triggers, but they did not run, so I deleted all triggers and made them all new, but with no luck. I can see in the dasboard that motion is changing from 0 till 1 and back to 0, but the trigger did not run.


#64

there is a bug in trigger engine right now.


#65

Thank you for innføring is. I will just wait untill i gear it is working again.

-------- Opprinnelig melding --------


#66

Sorry, I sent the last message from my cell phone without having my glasses on, and the speller has tried to translate part of it into Norwegian. It should have been:
Thank you for informing us. I will just wait untill I hear it is working again.


#67

@svein.utne sir, the trigger engine is up and running, you can use them now.


#68

Thank you for your notification. I deleted the old trigger and made it new, but no email or sms when motion is detected.
But it could be me doing something wrong.


#69

can you share the screenshot of the triggers.


#71

i just tested trigger and everything is working fine.


#72

When I look at my trigger is say run 0 times.
So the trigger never run?


#73

has your two state widget gone from 0 to 1?


#74

Yes, and back to 0 after some seconds


#75

hi sir, can you give it another try now.


#76

Yes, I will. I also made som changes.Now I start the py file from crontab.
sudo crontab -e
@reboot sudo python3 /home/pi/mqtt/examples/Ex-06-CayenneClient.py > /home/pi/Desktop/Cayenne.log

So now it starts every time I boot or reboot the pi, but the triggers do not run.
The widges changes from 0 till 1, and back to 0 butt triggers run 0 times.


#77

can you do some demo trigger test to see what is wrong. add a new button widget to your dashboard. next add a trigger to this button. if button is 1 then turn send email notification (dont add a sms notification). test this trigger out and let me know the outcome.


#78

I will


#79

When I push the button to trigger an email, the system goes offline?


#80

Connecting to mqtt.mydevices.com:1883
making two state zero
Connected with result code 0
SUB v1/a7fc5bb0-e16c-11e6-a446-0d180dc59d42/things/2d4d4ad0-4fc2-11e8-9794-1f5f0ee2f68d/cmd/+

PUB v1/a7fc5bb0-e16c-11e6-a446-0d180dc59d42/things/2d4d4ad0-4fc2-11e8-9794-1f5f0ee2f68d/sys/model
Python

PUB v1/a7fc5bb0-e16c-11e6-a446-0d180dc59d42/things/2d4d4ad0-4fc2-11e8-9794-1f5f0ee2f68d/sys/version
1.1.0

making two state zero
PUB v1/a7fc5bb0-e16c-11e6-a446-0d180dc59d42/things/2d4d4ad0-4fc2-11e8-9794-1f5f0ee2f68d/data/2
digital_sensor,d=0

Motion Detected…
PUB v1/a7fc5bb0-e16c-11e6-a446-0d180dc59d42/things/2d4d4ad0-4fc2-11e8-9794-1f5f0ee2f68d/data/2
digital_sensor,d=1

Motion Detected…
PUB v1/a7fc5bb0-e16c-11e6-a446-0d180dc59d42/things/2d4d4ad0-4fc2-11e8-9794-1f5f0ee2f68d/data/2
digital_sensor,d=1

v1/a7fc5bb0-e16c-11e6-a446-0d180dc59d42/things/2d4d4ad0-4fc2-11e8-9794-1f5f0ee2f68d/cmd/5 b’z99uMrIqFJFt061,1’
message received: {‘msg_id’: ‘z99uMrIqFJFt061’, ‘client_id’: ‘2d4d4ad0-4fc2-11e8-9794-1f5f0ee2f68d’, ‘topic’: ‘cmd’, ‘value’: ‘1’, ‘channel’: 5}
quit button is pressed


#81

can you share the code.


#82

Yes, but it will be very messy with cut and paste from pi. Is there an easy way to send the py file to you?
I did cut and past here.
http://community.mydevices.com/t/your-pi-camera-trigger/9871/6