Originally posted by: <email address deleted>
Hi,
I'm doing a notify to run a script if any FHT runs an empty battery:
define hzk.bat.n notify hzk.*:.*Bat.*empty.* "/home/fhz/bin/bat-
alarm.sh %"
Cuurently the "%" is substituted by "state: Bat: empty, Window:
closed, Fault: no", no device name. How would it be possible to pipe
the device name into the script?
Many thanks in advance.
Regards,
Juergen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "FHZ1000 users on Linux" group.
To post to this group, send email to FHZ1000-users-on-unix@googlegroups.com
To unsubscribe from this group, send email to FHZ1000-users-on-unix-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/FHZ1000-users-on-unix?hl=en
-~----------~----~----~----~------~----~------~--~-
Use @ for the device name (see also http://www.koeniglich.de/fhem/commandref.html#notify)
Note:
- "xx" commands are executed via the perl system("xx &") function
which calls /bin/sh -c "xx" as the string contains at least one
special shell character (&). So any shell oneliners should work.
- Don't forget to escape ; with ;;
- "Bat: empty" changed in version 4.2 to "Battery low".
Rudi
On Mar 28, 10:16 pm, "Juergen L." wrote:
> Hi,
>
> I'm doing a notify to run a script if any FHT runs an empty battery:
>
> define hzk.bat.n notify hzk.*:.*Bat.*empty.* "/home/fhz/bin/bat-
> alarm.sh %"
>
> Cuurently the "%" is substituted by "state: Bat: empty, Window:
> closed, Fault: no", no device name. How would it be possible to pipe
> the device name into the script?
>
> Many thanks in advance.
>
> Regards,
> Juergen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "FHZ1000 users on Linux" group.
To post to this group, send email to FHZ1000-users-on-unix@googlegroups.com
To unsubscribe from this group, send email to FHZ1000-users-on-unix-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/FHZ1000-users-on-unix?hl=en
-~----------~----~----~----~------~----~------~--~-