• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pilight 7.0
Can you share those scripts?
I upgraded from the nightly 6 to stable 7

I changed my nic about a month ago and now it regenerate the UUID
this was simple solved by a find and replace on the config.

but now one of the relay boards (or the whole pi since this is his/her only function) isn't working again.

When i switch the relay on/off:
[May 29 21:27:58:110581] pilight-daemon: DEBUG: socket recv: {"action":"control","code":{"state":"off","device":"RelayP02B01C06"}}
[May 29 21:27:58:111963] pilight-daemon: ERROR: the device "RelayP02B01C06" does not exist

however when i stop the pi01(master) and start the pi02 standalone (default empty config) and type
pilight-send -p relay -g 10 -f
then the relay wil go on (for some reason all my relay's need default state off)

strange enough are the relay's working on pi01

There was a problem with the same relay's some time ago.

My config.json

.txt   config.txt (Size: 16.4 KB / Downloads: 9)
The first script sending the message is the following:


if [ -d "/var/www/hausautomation/lock_door" ]; then

sudo /root/tg/send_script t "Terrassentuer geoeffnet!"

sudo python /var/www/hausautomation/anwesenheit.py


sudo /var/www/hausautomation/check-pilight.sh

First it checks the state of the door lock, if it is locked, it sends a telegram message via a send script (see below) telling me that the door has been opened. The python script then pings the familys phone IP adresses. If no known IP adress is present, it sends an alarm message via telegram. Finally it checks if pilight is running and restarts the service if it is down (like a watchdog). However this doesn't help since the daemon is still running.

The telegram send script is the following:


#/root/tg/bin/telegram-cli -k /root/tg/tg-server.pub -W -e "msg $1 $2"
#/root/tg/bin/telegram-cli -k /root/tg/tg-server.pub -W -e "msg $1 $2, ok_cb, false"

if [ "$1" = 'v' ]; then #prueft, ob ein video gesendet werden soll $1 = v
   cd '/root/tg/' && (echo "contact_list"; sleep 5; echo "send_video !_Contact1 $2") | ./bin/telegram-cli -k tg-server.pub -W #Sendet ein Video mit dem per Variable uebergebenen Pfad ($2)
elif [ "$1" = 'p' ]; then #prueft, ob ein Bild gesendet werden soll $1 = p
   cd '/root/tg/' && (echo "contact_list"; sleep 5; echo "send_photo !_Contact1 $2") | ./bin/telegram-cli -k tg-server.pub -W #Sendet ein Bilde mit dem per Variable uebergebenen Pfad ($2)
elif [ "$1" = 't' ]; then #prueft, ob ein Text gesendet werden soll $1 = t
   cd '/root/tg/' && (echo "contact_list"; sleep 5; echo "msg !_Contact1 $2") | ./bin/telegram-cli -k tg-server.pub -W #Sendet eine Textnachricht mit dem per Variable uebergebenen Inhalt ($2)
elif [ "$1" = 'j' ]; then #prueft, ob ein Text an Contact2 gesendet werden soll $1 = j
   cd '/root/tg/' && (echo "contact_list"; sleep 5; echo "msg Contact2 $2") | ./bin/telegram-cli -k tg-server.pub -W #Sendet eine Textnachricht mit dem per Variable uebergebenen Inhalt ($2)

screen -ls | grep Detached | cut -d. -f1 | awk '{print $1}' | xargs kill #loescht die blockierte telegram session
screen -dmS TelegramCLI ~/tg/bin/telegram-cli -s ~/tg/test.lua -k ~/tg/tg-server.pub  #schaltet den service wieder ein
@Koos147, did you upgrade both pi's?
@teddy, when pilight "hangs", do you still see the scripts in the 'ps aux' output?
(05-30-2015, 01:01 AM)curlymo Wrote: @Koos147, did you upgrade both pi's?

Yes i only make that mistake once Wink
I upgraded by apt by the stable repository at the same time
Hi, already updated to v7 and everything is running smoothly. While installing new contact sensors, I've come across an idea. It would be very beneficial to filter the output of pilight-receive for a certain protocol. Reason is, because of datetime and lots of other (possible) stuff it is kind of hard to find the ones that are desired. I currently use a workaround to dump the output to a file and then look through it, but if this is something that can be quickly and easily implemented...
(Actually, the most useful would be automatically adding unknown devices to a separate log file ...)
Yes, this would be very helpful. Not sure how it would be implemented, i.e. the users would choose the protocol that they want to find.
I wrote a python script for filtering out data from certain protocols using the API a while ago, but it would be easier to do this in pilight.
This should be in the feature request area.
(05-30-2015, 01:50 PM)curlymo Wrote: This should be in the feature request area.

I will move it there - written here just to make the idea public Smile

EDIT: http://forum.pilight.org/Thread-Logging-...wn-devices
@koos147, I just tested this locally between a Raspberry Pi 2 and a Hummingboard and found no issues.

Possibly Related Threads...
Thread Author Replies Views Last Post
  pilight-control TML 13 320 05-27-2020, 07:51 AM
Last Post: curlymo
  API Requests by HTTP from other devices fore use in pilight scootermacro 2 155 05-10-2020, 08:19 AM
Last Post: scootermacro
  pilight-send seems successful but doesn't actually send RF signal ayeyebrazov 37 2,009 03-31-2020, 01:02 PM
Last Post: curlymo
  pilight 8.1.5 not working on Raspberry pi after reboot beejayf 4 505 03-08-2020, 12:14 AM
Last Post: beejayf
  pilight cpu usage possibly associated with noticeable sluggishness? hepcat72 4 521 01-28-2020, 08:02 PM
Last Post: hepcat72
  apt.pilight.org stable Release' is not signed. thomasol 2 645 01-23-2020, 11:34 PM
Last Post: thomasol
  pilight and SIGNALduino cc1101 Caleus 0 438 01-19-2020, 09:13 AM
Last Post: Caleus
  filter stopped working after update to pilight 8.1.5 zlin50 19 1,346 01-03-2020, 02:15 PM
Last Post: curlymo
Question [Solved] Openweathermap with pilight 7.0-40 doesn't work Seebueb 2 530 01-01-2020, 06:45 PM
Last Post: Seebueb
  [Solved] Strange receive problem with 433Mhz Receiver and pilight 8.1.5 vanillaice30 15 1,413 12-18-2019, 11:09 AM
Last Post: vanillaice30

Forum Jump:

Browsing: 1 Guest(s)