• 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
  Real 433Mhz Remote is disturbed by pilight service henne111 2 147 10-06-2019, 06:18 PM
Last Post: wo_rasp
Tongue (solved) pilight 8.1.5-1-gc0a175e0 Chrashes fleisch 5 568 10-03-2019, 01:15 PM
Last Post: fleisch
  Starting pilight on boot: "cannot bind to the SSDP multicast network" pilino1234 4 336 09-29-2019, 02:08 PM
Last Post: tomk
  pilight for Raspbian Buster (raspberry pi 4) ? starob 29 2,419 07-15-2019, 08:45 PM
Last Post: curlymo
  pilight-receive Filteroption not working Alex 2 562 07-14-2019, 08:35 AM
Last Post: Alex
  pilight usb nano format conversion ettman8 2 449 07-14-2019, 08:32 AM
Last Post: curlymo
  pilight 8.1.4 crashes after some hours Ulrich.Arnold 47 2,671 06-29-2019, 08:58 PM
Last Post: curlymo
  Raspberry PI, gpio-ir-tx and pilight not starting lordslash 5 853 06-11-2019, 05:19 PM
Last Post: curlymo
  pilight fails starting on boot Alex 5 747 06-09-2019, 06:02 PM
Last Post: curlymo
  Google Assistant coupled to pilight hansrijn2 4 1,235 05-29-2019, 06:54 PM
Last Post: curlymo

Forum Jump:

Browsing: 1 Guest(s)