문제

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.

도움이 되었습니까?

해결책

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")
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top