Question

I make a SiriProxy using The Three Little Piggies, I played around with it, now I can control my room and my garage door with Siri. I decided to let my pi send a tweet to me every time the garage door opens or close, I am using this command in the Plugin file

system("sudo twidge update \"@idoodler The garage door was just opened the XXX time\"")` 

instead of the XXX I like to have the number of openings. I need this because twitter don't allow duplicates. I don't need the opening number, I just need a method to make every tweet unique.

Was it helpful?

Solution

Why don't you just add a timestamp or something to differentiate:

tweet = Time.now.strftime("@idoodler The door was opened at %Y-%m-%d %H:%M:%S")
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top