piBeacon: presence monitoring plugin discussions
Re: piBeacon: presence monitoring plugin discussions
You have likely the pibeacon-2.plugin name problem
When downloading and you have the same file in download directory it names it -2.
Then you get the wrong name in indigo
Stop the plugin either delete and rename the download file or rename the plugin in plugin disabled.
Then enable the plugin.
Sent from my iPhone using Tapatalk
When downloading and you have the same file in download directory it names it -2.
Then you get the wrong name in indigo
Stop the plugin either delete and rename the download file or rename the plugin in plugin disabled.
Then enable the plugin.
Sent from my iPhone using Tapatalk
Re: piBeacon: presence monitoring plugin discussions
back home ..
it seems the -2 name has been resolved and in the second log it looks as if userid/password/ip is wrong for the RPI
===> piBeacon return code from fix ("spawn sftp -o ConnectTimeout=15 [email protected]\r\[email protected]'s password: \r\nPermission denied, please try again.\r\r\[email protected]'s password: \r\nPermission denied, please try again.\r\r\[email protected]'s password: \r\nAuthentication failed.\r\r\nConnection closed\r\r\n", 'expect: spawn id exp9 not open\n while executing\n"expect "sftp" { send "quit\\r" }"\n (file "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/piBeacon.indigoPlugin/Contents/Server Plugin/updateParamsFTP.exp" line 50)\r\n') trying again to configure PI
could you
1. check the uid/password...
2. do
ssh [email protected]
and
ps -ef | grep .py
and post
and
tail -F temp/messageSend (cap F)
also you need to
1. change "accept new beacons" in config to eg -60 and put the new beacons on one of the RPI
2. start the iPhone app for the beacon and enable it . then STOP the iPhone app. only THEN will the beacons show up
Karl
[edit]
and in the log it shows a different ip number than in the indigo screen dump for the RPI... and do you have 2 ip numbers for the 2. rpi wifi and ethernet?
thats likely not a good idea.
it seems the -2 name has been resolved and in the second log it looks as if userid/password/ip is wrong for the RPI
===> piBeacon return code from fix ("spawn sftp -o ConnectTimeout=15 [email protected]\r\[email protected]'s password: \r\nPermission denied, please try again.\r\r\[email protected]'s password: \r\nPermission denied, please try again.\r\r\[email protected]'s password: \r\nAuthentication failed.\r\r\nConnection closed\r\r\n", 'expect: spawn id exp9 not open\n while executing\n"expect "sftp" { send "quit\\r" }"\n (file "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/piBeacon.indigoPlugin/Contents/Server Plugin/updateParamsFTP.exp" line 50)\r\n') trying again to configure PI
could you
1. check the uid/password...
2. do
ssh [email protected]
and
ps -ef | grep .py
and post
and
tail -F temp/messageSend (cap F)
also you need to
1. change "accept new beacons" in config to eg -60 and put the new beacons on one of the RPI
2. start the iPhone app for the beacon and enable it . then STOP the iPhone app. only THEN will the beacons show up
Karl
[edit]
and in the log it shows a different ip number than in the indigo screen dump for the RPI... and do you have 2 ip numbers for the 2. rpi wifi and ethernet?
thats likely not a good idea.
Re: piBeacon: presence monitoring plugin discussions
Yes, I corrected the password in the PiServer config.....I had inadvertantly overwrote it when trying to diagnose.
I do have wifi and ethernet on on rPi. I also have it configured to accept all beacons...so you are saying change that to > -60?
Event Log is clean:
But nothing is showing active in devices:

Code: Select all
pi@raspberrypi:~ $ ps -ef | grep .py
nobody 518 1 0 16:49 ? 00:00:00 /usr/sbin/thd --daemon --triggers /etc/triggerhappy/triggers.d/ --socket /var/run/thd.socket --pidfile /var/run/thd.pid --user nobody /dev/input/event*
root 811 1 0 16:49 ? 00:00:44 /usr/bin/python /home/pi/pibeacon/master.py
root 1108 1 0 16:49 ? 00:00:01 /usr/bin/python /home/pi/pibeacon/receiveGPIOcommands.py 9999
root 1159 1 1 16:49 ? 00:01:41 /usr/bin/python /home/pi/pibeacon/beaconloop.py
pi 2339 2191 0 18:39 pts/0 00:00:00 grep --color=auto .py
Code: Select all
pi@raspberrypi:~ $ tail -F temp/messageSend (cap F)
-bash: syntax error near unexpected token `('
pi@raspberrypi:~ $ tail -F temp/messageSend
tail: cannot open ‘temp/messageSend’ for reading: No such file or directory
tail: cannot watch parent directory of ‘temp/messageSend’: No such file or directory
tail: inotify cannot be used, reverting to polling
Event Log is clean:
Code: Select all
Jan 27, 2019 at 6:59:35 PM
Disabling plugin "piBeacon 7.100.269"
Stopping plugin "piBeacon 7.100.269" (pid 80728)
piBeacon stop requested from indigo
piBeacon quitNow:
Stopped plugin "piBeacon 7.100.269"
Jan 27, 2019 at 7:00:15 PM
Enabling plugin "piBeacon 7.100.269"
Starting plugin "piBeacon 7.100.269" (pid 81251)
Started plugin "piBeacon 7.100.269"
piBeacon initializing ...
piBeacon path To files: =================
piBeacon indigo /Library/Application Support/Perceptive Automation/
piBeacon installFolder /Library/Application Support/Perceptive Automation/Indigo 7/
piBeacon plugin.py /Library/Application Support/Perceptive Automation/Indigo 7/Plugins/piBeacon.indigoPlugin/Contents/Server Plugin/
piBeacon Plugin params /Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Plugins/com.karlwachs.piBeacon/
piBeacon PluginLogFile /Library/Application Support/Perceptive Automation/Indigo 7/Logs/com.karlwachs.piBeacon/plugin.log
piBeacon Plugin short Name piBeacon
piBeacon my PID 81251
piBeacon myLogSet setting parameters -- logFileActive= standard; logFile= ; debugLevel= []
piBeacon testing if variable enableTimeTracking_piBeacon is == on/off/print-option to enable/end/print time tracking of all functions and methods (option:'',calls,cumtime,pcalls,time)
piBeacon --V 7.100.269 initializing --
piBeacon starting UpdateRPIqueues
piBeacon .. config read from files
piBeacon .. def startup(self): setting variables, debug .. finished
piBeacon .. starting tcpip stack
piBeacon .. tcpip stack started
piBeacon .. checking sensors
piBeacon .. checking devices tables
piBeacon .. checking BLEconnect
piBeacon .. checking beacons
Z-Wave received "New Garage Door Controller" status update is closed
piBeacon .. initalized, starting loop 
Re: piBeacon: presence monitoring plugin discussions
Everything is running no more password ip # errors...
the -60 is a little more stringent than everything.. It is the signal strength . If you do everything then it will also get the junk beacons from the cars driving by, but you could just do that as you don't see ANY ibeacons
===> beaconloop does not produce output.
please do:
ssh to rpi
.... post from pi
cat parameters (remove uid/passwd )
....then type
sudo python master.py
...need the screen printout of the first 2 minutes
what kind of rpi are you using 3+? and which SSD? the NOV/DEC 2018 does not work on the 3+. it needs an external BLE dongle
Karl
ps or if you like we can do an online teamviewer session (send me an email if you like)
the -60 is a little more stringent than everything.. It is the signal strength . If you do everything then it will also get the junk beacons from the cars driving by, but you could just do that as you don't see ANY ibeacons
===> beaconloop does not produce output.
please do:
ssh to rpi
.... post from pi
cat parameters (remove uid/passwd )
....then type
sudo python master.py
...need the screen printout of the first 2 minutes
what kind of rpi are you using 3+? and which SSD? the NOV/DEC 2018 does not work on the 3+. it needs an external BLE dongle
Karl
ps or if you like we can do an online teamviewer session (send me an email if you like)
Re: piBeacon: presence monitoring plugin discussions
I don't know linux, so unsure if I am typing the right thing:
I have a Raspberry Pi 3 (bought 2017). It's worked since I got it up and running back in July of 2017. I have two rPis....it seems odd neither of them work all of the sudden.
I'm using the image that was available back in July of last year.
I can do teamviewer if that helps. Never used it before, but I use Cisco Webex all the time. I think you are in Dallas (I am in Atlanta), so tomorrow during the day or eve works for me. I sent you an email.
Code: Select all
pi@raspberrypi:~ $ cat parameters
cat: parameters: No such file or directoryCode: Select all
pi@raspberrypi:~ $ sudo python master.py
python: can't open file 'master.py': [Errno 2] No such file or directoryI'm using the image that was available back in July of last year.
I can do teamviewer if that helps. Never used it before, but I use Cisco Webex all the time. I think you are in Dallas (I am in Atlanta), so tomorrow during the day or eve works for me. I sent you an email.
piBeacon: presence monitoring plugin discussions
Forgot
ssh pi@...
cd pibeacon <=====
Then all the rest Also the previous
And teamviewer is really good , free and you can use it to login back home.
Sent from my iPhone using Tapatalk
ssh pi@...
cd pibeacon <=====
Then all the rest Also the previous
And teamviewer is really good , free and you can use it to login back home.
Sent from my iPhone using Tapatalk
Re: piBeacon: presence monitoring plugin discussions
pi@raspberrypi:~/pibeacon $ cat parameters
{
"BLEserial": "sequential",
"GPIONumberAfterBoot1": "-1",
"GPIONumberAfterBoot2": "-1",
"GPIOTypeAfterBoot1": "off",
"GPIOTypeAfterBoot2": "off",
"GPIOpwm": "1",
"IPnumberOfRPI": "192.168.2.124",
"IndigoOrSocket": "socket",
"acceptJunkBeacons": "1",
"acceptNewiBeacons": -999,
"authentication": "digest",
"batteryCapacitySeconds": 5,
"chargeTimeForMaxCapacity": 7200,
"debugRPI": {
"debugRPIBEACON": 0,
"debugRPIBLE": 0,
"debugRPICALL": 0,
"debugRPIOUTPUT": 0,
"debugRPISENSOR": 0,
"debugRPImystuff": 0
},
"deleteHistoryAfterSeconds": 86400,
"deltaChangedSensor": 5,
"distanceUnits": "0.348",
"enableRebootCheck": "restartLoop,-",
"enableiBeacons": "1",
"indigoInputPORT": 12087,
"ipOfServer": "192.168.2.105",
"minPinActiveTimeForShutdown": 99999999999,
"myPiNumber": "1",
"networkType": "fullIndigo",
"output": {},
"passwordOfServer": "xxxxxxxx",
"portOfServer": "8176",
"pressureUnits": "Pascal",
"rPiCommandPORT": 9999,
"rPiRestartCommand": "",
"rebootHour": 1,
"rebootWatchDogTime": "-1",
"restartBLEifNoConnect": true,
"sendAfterSeconds": "60",
"sendFullUUID": "0",
"sendToIndigoSecs": 90,
"sensorList": "",
"sensorRefreshSecs": 20.0,
"sensors": {},
"shutDownPinOutput": -1,
"shutDownPinVetoOutput": -1,
"shutdownInputPin": -1,
"sleepAfterBoot": "10",
"tempUnits": "Fahrenheit",
"timeStamp": "2019-01-27-20:33:12",
"useRTC": "",
"useRamDiskForLogfiles": "0",
"userIdOfServer": "xxxxxxxxx",
"wifiOFF": "ON"
}pi@raspberrypi:~/pibeacon $
[it seems stuck after starting loop -- same as in the Indigo Event log when I start the plug-in}pi@raspberrypi:~/pibeacon $ sudo python master.py
Killed
pi@raspberrypi:~/pibeacon $ 20190127-21:19:09 master master IP find:::: wifiIP >><<; eth0IP: >>192.168.2.124<<; hostnameIP >>['192.168.2.124', '192.168.2.6']<<; ipAddressRead >>192.168.2.124<<
20190127-21:19:09 master master: DNS server reachable at:192.168.2.1
20190127-21:19:09 master master writing ip number to file >>192.168.2.124<<
20190127-21:19:10 master master can ping indigo server at ip:>>192.168.2.105<<
20190127-21:19:10 installLibs starting
20190127-21:19:10 installLibs no opsys upgrade requested
20190127-21:19:10 installLibs install finished
20190127-21:19:10 receive GPIO commands started, listing to port: 9999
20190127-21:19:10 master starting master loop
20190127-21:19:11 beaconloop hcitool -i hci0 cmd 0x08 0x0008 1E 02 01 1A 1A FF 4C 00 02 15 2f 23 44 54 cf 6d 4a 0f ad f2 f4 91 1b a9 ff a6 00 09 00 01 C5 00
20190127-21:19:11 beaconloop hcitool -i hci0 cmd 0x08 0x0006 00 40 00 40 03 00 00 00 00 00 00 00 00 07 00
20190127-21:19:11 beaconloop hcitool -i hci0 cmd 0x08 0x000a 01
20190127-21:19:11 beaconloop hci0: Type: BR/EDR Bus: UART
20190127-21:19:11 beaconloop BD Address: B8:27:EB:5D:F1:8D ACL MTU: 1021:8 SCO MTU: 64:1
20190127-21:19:11 beaconloop starting loop
Re: piBeacon: presence monitoring plugin discussions
That looks perfect.
Now the tail -F...!
Sent from my iPhone using Tapatalk
Now the tail -F...!
Sent from my iPhone using Tapatalk
Re: piBeacon: presence monitoring plugin discussions
I did find an old plug-in (piBeacon v 7.61.107)in my trash. So I disabled the plug-in, renamed the existing plug-in and moved the old plug in back to the downloads folder and double clicked it to enable. This seems like it may have restored functionality to my rPis and XY beacons. The following screenshot shows green dots next to the devices which are in fact up and running (the others showing red dots are accurate):pi@raspberrypi:~/pibeacon $ tail -F temp/messageSend (cap F)
-bash: syntax error near unexpected token `('
pi@raspberrypi:~/pibeacon $

But it shows as expired in the text, which seems to be in conflict with the green dot.
Re: piBeacon: presence monitoring plugin discussions
.. it was:
tail -F temp/messageSend
cap F was just a reminder to use F not f
.. interesting that it works w 7.61.
that makes me want to check it in more detail.. could we still do a teamviewer session?
in that older version the config .. files are still under ~/indigo/pibeacon
in the newer version they are all moved to the library/.....indigo 72./... directories.
Karl
tail -F temp/messageSend
cap F was just a reminder to use F not f
.. interesting that it works w 7.61.
that makes me want to check it in more detail.. could we still do a teamviewer session?
in that older version the config .. files are still under ~/indigo/pibeacon
in the newer version they are all moved to the library/.....indigo 72./... directories.
Karl
Re: piBeacon: presence monitoring plugin discussions
just realized: are you running indigo 7.0? there might be an issue with the paths
/Library/Application Support/Perceptive Automation/Indigo 7/ not 7.1 or 7.2 ?
[edit]
could you be so kind and check directory:
/Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Plugins
if it has
/Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Plugins/com.karlwachs.piBeacon
and what is in there
[/edit]
Karl
/Library/Application Support/Perceptive Automation/Indigo 7/ not 7.1 or 7.2 ?
[edit]
could you be so kind and check directory:
/Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Plugins
if it has
/Library/Application Support/Perceptive Automation/Indigo 7/Preferences/Plugins/com.karlwachs.piBeacon
and what is in there
[/edit]
Karl
Re: piBeacon: presence monitoring plugin discussions
Sorry, I have a cold that took a bad turn yesterday so I was out of commission yesterday. Feeling a bit better today

I am running Indigo 7.0. I can update to 7.2, but I saw some horror stories in the forums about it. I figured I was safe with the updated plug in as it didn't require a release past 7.0pi@raspberrypi:~ $ tail -F temp/messageSend
tail: cannot open ‘temp/messageSend’ for reading: No such file or directory
tail: cannot watch parent directory of ‘temp/messageSend’: No such file or directory
tail: inotify cannot be used, reverting to polling

Re: piBeacon: presence monitoring plugin discussions
Ok looks good
Next step would be an online session w teamviewer
Don’t know what else to do through remote diagnostics.
Send be an email if you want to do that.
Karl Wachs at me com
Sent from my iPhone using Tapatalk
Next step would be an online session w teamviewer
Don’t know what else to do through remote diagnostics.
Send be an email if you want to do that.
Karl Wachs at me com
Sent from my iPhone using Tapatalk
Re: piBeacon: presence monitoring plugin discussions
To conclude the story, for anyone following along, with the help of Karl, I was able to get the plug-in working again. Here's what we found: There were multiple IP addresses bound to the eth0 of one of my rPis. This was particularly odd because there was no evidence of the 'extra' IP found in the rPi configs. Also, the Wifi was turned off. So essentially, you could connect to the pi on 192.168.2.6 and/or 192.168.2.124. But in the pi, it only showed the 124 setting. Normally, having multiple IPs would not be an issue but for (1) both seemed to be bound to eth0 which is impossible and (2) one of the ips was generating thousands of error messages (something like Ip address not valid or out of range) causing trouble to the plug in. So I changed the pi Ip from 124 to 6 in the rPi and in the plug in and restarted everything. Then everything began working again as expected.
Thanks to Karl as I would have never 'seen' the issue with the multiple ips without his help (his debugging log showed all the errors with the offending ip). So not sure how this occurred, but suffice it to say, if anyone encounters my experience, ensure the IP address on your rPi is correct. So you may need to check your router to see what IPs have been issued to what devices and ensure each pi device has only one.
Hopefully no one else encounters this, but if you do, feel free to reach out for further assist.
Thanks to Karl as I would have never 'seen' the issue with the multiple ips without his help (his debugging log showed all the errors with the offending ip). So not sure how this occurred, but suffice it to say, if anyone encounters my experience, ensure the IP address on your rPi is correct. So you may need to check your router to see what IPs have been issued to what devices and ensure each pi device has only one.
Hopefully no one else encounters this, but if you do, feel free to reach out for further assist.
Re: piBeacon: presence monitoring plugin discussions
To round it up.
The plugin assigns an ip number to each rpi
If it gets a message from an unregistered device it ignores those packages - and writes a message to the log file.
This was added to protect the plugin from other senders that should not be communicating on that port/ipnumber.
Also you can assign multiple ip numbers to a single Ethernet card . In this case we still don’t know how it was done and “who”= which process did that.
Anyway. Ende gut alles gut. Or everything has an end only the sausage has one.
Sent from my iPhone using Tapatalk
The plugin assigns an ip number to each rpi
If it gets a message from an unregistered device it ignores those packages - and writes a message to the log file.
This was added to protect the plugin from other senders that should not be communicating on that port/ipnumber.
Also you can assign multiple ip numbers to a single Ethernet card . In this case we still don’t know how it was done and “who”= which process did that.
Anyway. Ende gut alles gut. Or everything has an end only the sausage has one.
Sent from my iPhone using Tapatalk