Alarmpi - Speaking Alarm Clock

Moderator: leecollings

Post Reply
matv
Posts: 8
Joined: Sunday 08 January 2017 18:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: EU
Contact:

Alarmpi - Speaking Alarm Clock

Post 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?
elmortero
Posts: 247
Joined: Sunday 29 November 2015 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.9639
Location: Spain
Contact:

Re: Alarmpi - Speaking Alarm Clock

Post 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
matv
Posts: 8
Joined: Sunday 08 January 2017 18:26
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5877
Location: EU
Contact:

Re: Alarmpi - Speaking Alarm Clock

Post 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!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest