Ability to trigger Python code

I dont want to have the program running all the time and would like for Cayenne to be able to trigger the event to run the program. Then I would like for Cayenne to get the data from the program to adjust the scheduled event to run at the adjusted time.

Being able to trigger scripts is coming, but not implemented yet.

Adjusting variables in the triggers though is more complex, and I suggest you detail out a use case to be considered by the developers.

Cheers,

Craig

I think that Cayenne provides a great simple interface so to keep things ‘Clean’ on the Cayenne side.
However… I feel the best thing that could happen is a teleporter or similar in the back of Cayenne that allows variables and bits to be transported TO and FROM the back room of the Pi, especially the python garden. I have suggested before via some pretty standard generic variables and bits using the exact same 'Add > Device Process that exists now. But you simply select from existing drop down menus a Generic Output Python Device that is just a links magically into the Pi into python play pen.

Once teleported into the python via say a function people can pick them up and invent (and share) code. This is where all the, clever weird wired or just fun tricky concepts can be created to create cool clever stuff.

The results of this cool stuff can then be passed back from the dot.py environment into Cayenne the same way as but as Virtual Generic Input Device variables. For want of a better name…

This would really open things up for a host of projects I am working on at present but am just itching to get shown off on Cayenne…
Yesterday for e.g… Students learn about electronics, making sensors and pull together Hi Res temperature and Ird light levels to monitor the movement, nesting and egg laying patterns of Little Blue penguins.


(Penguin Telemetry)

This stuff is struggling to find it’s way out to the www via hacked Open Mesh wireless routers talking to MySQL router in one part of NZ and php server struggling along in another place in the country. This now is looking like a 10 year old IoT idea, seriously in need of an upgrade. The result at present is ‘High Resolution’ temperature and a 1 pixel video stream (plot ) that can show all sorts of cool activity like what time they come and go out at night, roll their eggs etc all in real time from a <$20 per instrument.

Would be great to let students just point and click it into a Cayenne account. Anyway… prob this is the wrong place for this level of detail (sorry, shift it mods as needed) but hope it gets some ideas moving. Cain’t wait myself :slight_smile:

~ Andrew

1 Like

I really like the Penguin monitor idea, What I am doing is automation of our Chicken Coop. We have issues with nocturnal predators and need to lock the girls up at night. The coop is far from the house, but I have configured a Solar Power system with battery backup for night time. it opens the coop door at a certain time in the morning and then again in the evening. I have a Python program that checks the sunrise and sunset times for my location on each specific day. As the winter sundown time and summer sundown times differ over 4 hours. same for sun up.
Now you haven’t got the camera mod running but I have a bash script that takes a picture of the door to verify that it did close, and verify that it did open as it should.

Door open
https://www.dropbox.com/s/o9q8dzohl27ufut/coop3.jpg?dl=0

Door Closed
https://www.dropbox.com/s/4zwo68x8aindwt3/coop1.jpg?dl=0

Sweet project dude!

Now you just need the drone with an airsoft gun to chase off the predators when you detect them with your OpenCV enabled camera.

Cheers,

Craig

1 Like

I’m currently building a chicken coop! My hope is to someday have time to throw in some automation like you’ve described. Perhaps my future chickens and I can live vicariously through you :slight_smile: Please keep us updated on this project, definitely will be following progress, thanks for sharing.

Love it

If you want just plain clean simple FUN then place a temperature sensor IN the nesting boxes :slight_smile:

I have just restarted the Penguin Telemetry system up again for the new season and last night spotted this…

~ Andrew

Above plots are a ‘One Pixel’ video feed at 1 frame per 5 minutes :slight_smile:
Ird Photo Transistor + Thermistor, one chip, battery and a radio transmitter running off 3xAA batteires for a year.

~ Andrew