Page 1 of 1

Alarmpi - Speaking Alarm Clock

Posted: Sunday 15 January 2017 11:24
by matv
Hi there,

Alarmpi is a speaking alarm clock that greets you and reads out loud the weather for today.
https://github.com/skiwithpete/alarmpi

I just finished adapting it to my needs, with my weather location and some birds singing before and after the computer voice (to avoid freaking out :))
It works perfectly fine now via the commandline or a scheduled crontab every morning.

However, the next step would be to activate the alarm via Domoticz so I can easily schedule it and combine it with my lights.
I made a virtual device and a 'Push On Button' in the dashboard. The action behind the button is: script:///home/pi/alarmpi/sound_the_alarm.py .
This does not work but if I call the same script via the command line it does work.

My question is: is is possible to activate such an elaborate script, that inculudes other python scripts from the same directory, via an action in Domoticz?

Re: Alarmpi - Speaking Alarm Clock

Posted: Sunday 15 January 2017 19:43
by elmortero
Try moving the folder alarmpi to the scripts folder /home/pi/scripts and for the on action

Code: Select all

script://alarmpi/sound_the_alarm.py

Re: Alarmpi - Speaking Alarm Clock

Posted: Sunday 15 January 2017 23:22
by matv
Solved!

Learned about the log today trough another topic. In the log I found:

Code: Select all

2017-01-15 23:15:54.002 Error: Error executing script command (/home/pi/alarmpi/sound_the_alarm.py). returned: 32256
A simple Google search pointed me here:
viewtopic.php?t=4998

And a simple

Code: Select all

chmod 777 alarmpi/sound_the_alarm.pi
solved the problem!

@elmortero thanks for your reply!