piBeacon: presence monitoring plugin discussions

Posted on
Mon Mar 06, 2017 6:58 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: presence monitoring plugin discussions

How do you test in a python script ?
Condition If any change
Then in action you have to convert to an integer then do the if




Sent from my iPhone using Tapatalk

Posted on
Mon Mar 06, 2017 7:30 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: presence monitoring plugin discussions

or you could simply do:
Screen Shot 2017-03-06 at 07.25.50.png
Screen Shot 2017-03-06 at 07.25.50.png (28.97 KiB) Viewed 3249 times
to test if it is RPi-0
same for 1,2,3

or:
Code: Select all
clRPi= int(indigo.devices["b-xy-orange-beep"].states["closestRPI"])
if clRPi > 2:
    indigo.server.log(" 2 fired")



Karl

Posted on
Mon Mar 06, 2017 7:58 am
johnpolasek offline
Posts: 911
Joined: Aug 05, 2011
Location: Aggieland, Texas

Re: piBeacon: presence monitoring plugin discussions

kw123 wrote:
How do you test in a python script ?
Condition If any change
Then in action you have to convert to an integer then do the if




Sent from my iPhone using Tapatalk


I was just using the "condition" tab in the trigger; and quite honestly, I was thinking of simplifying the trigger collection (3 family beacons x 3 doors = 9 triggers, which may become 12 or 15 if mom and/or my sister come to visit for a week or two) by having a single trigger when number of family beacons changes that runs a python script which goes through all the valid beacons, checks latest time of change and finds the closest rPI for that beacon, in which case I know how to cast it from anything it is to whatever it needs to be... I was just wondering why the KISS methodology of using the trigger condition dialog wasn't getting the job done. And incidentally, I usually follow Jay's advice and use IDs rather than device names simply because sometimes I do change the names and remembering everywhere I used it can be a real drag even with utilities to help.

And I don't want to unlock doors as we walk from room to room; I only want it to trigger when we first enter the beacons reception area (drive up to the house or come in from working in the pasture or barn).

Posted on
Mon Mar 06, 2017 8:28 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: presence monitoring plugin discussions

the posted code should do it, just replace the "name" with the id# of the beacon and simply trigger on any change of # of beacons


Code: Select all
if int(indigo.devices[1234567].states["closestRPI"]) >2:
    indigo.server.log(" 2 fired for 123456")
if int(indigo.devices[2345678].states["closestRPI"]) >2:
    indigo.server.log(" 2 fired for 2345678")
if int(indigo.devices[4567890].states["closestRPI"]) >2:
    indigo.server.log(" 2 fired for 4567890")
for each of the beacons to test

Posted on
Tue Mar 21, 2017 12:39 pm
roquej offline
User avatar
Posts: 609
Joined: Jan 04, 2015
Location: South Florida, USA

Re: piBeacon: presence monitoring plugin discussions

Karl,

Two of my RPs keep going down. They won't respond to reboot from the menu or accept direct ssh connections. All I can do it turn them off and back on. This happens several times a day or after a couple of days.

I have replaced the ssd twice. They correctly has a 32GB ssd. I have also replaced the power supply.

Just running out of ideas. What else could I try to fix this?

Thank you in advance.

JP

Posted on
Tue Mar 21, 2017 1:09 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: presence monitoring plugin discussions

You might have a bad power supply. Short interruptions of power can cause this.

Also switch from regular reboot to the special one in device edit.


Sent from my iPhone using Tapatalk

Posted on
Tue Mar 21, 2017 1:11 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: presence monitoring plugin discussions

I would then put them in a test bench = connect monitor and keyboard and let it die.


Sent from my iPhone using Tapatalk

Posted on
Wed Mar 22, 2017 4:02 am
benip offline
Posts: 34
Joined: Mar 08, 2016

Re: piBeacon: presence monitoring plugin discussions

roquej wrote:
Two of my RPs keep going down. They won't respond to reboot from the menu or accept direct ssh connections. All I can do it turn them off and back on. This happens several times a day or after a couple of days.


I get this if the wifi AP goes down or is rebooted. The RPis appear connected in Indigo, but do not update and cannot be pinged or sshd into. Every time I think about putting them on a LAN connection, but never get round to it :?

Posted on
Wed Mar 22, 2017 5:52 am
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: piBeacon: presence monitoring plugin discussions

This whole plugin continues to perform excellently for me.

EXCEPT... (lol) I have one pi that continually loses its IP address.

Code: Select all
Mar 22, 2017, 6:43:47 AM
   piBeacon                        rPi#: 3  >>169.254.67.160<<   ip number has changed, please fix in menue/pibeacon/setup pi or changed Ip number or send restart to rPi; old= 10.0.1.196  received from pi: 169.254.67.160


Now, I have my router reserve the IP addresses for each pi, so it trying to reach it at 10.0.1.196 works... but it fills my log with these errors. I can't figure out what the deal is. Sometimes using the menu option to correct the IP address fixes it. Sometimes it needs a reboot. Sometimes both... I've also started this pi from scratch with a new SD card and the problem popped up again.... so any possibility that this is a hardware issue? Seems weird, but with a rebuilt SD card, it kind of isolates the problem to the hardware, no? (it is a pi3, and I also run one pi2 and two other pi3s and none of them have the same issue).

http://nerdhome.jimdo.com

Posted on
Wed Mar 22, 2017 7:57 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

piBeacon: presence monitoring plugin discussions

Some things to look at.
How did you setup the network on the rpi
Do you have wifi and Ethernet
Could you check the file ipAddress on the rpi
Do ifconfig in the rpi

I also have this when I have the roter thinks that it should have one ip and the rpi uses a different one


Sent from my iPhone using Tapatalk

Posted on
Wed Mar 22, 2017 8:00 am
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: presence monitoring plugin discussions

benip wrote:
roquej wrote:
Two of my RPs keep going down. They won't respond to reboot from the menu or accept direct ssh connections. All I can do it turn them off and back on. This happens several times a day or after a couple of days.


I get this if the wifi AP goes down or is rebooted. The RPis appear connected in Indigo, but do not update and cannot be pinged or sshd into. Every time I think about putting them on a LAN connection, but never get round to it :?

They still send Bluetooth signals. So from that point of view they are alive. That's why the plugin shows them on


Sent from my iPhone using Tapatalk

Posted on
Thu Mar 23, 2017 10:53 am
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: piBeacon: presence monitoring plugin discussions

kw123 wrote:
Some things to look at.
How did you setup the network on the rpi
Do you have wifi and Ethernet
Could you check the file ipAddress on the rpi
Do ifconfig in the rpi

I also have this when I have the roter thinks that it should have one ip and the rpi uses a different one


Sent from my iPhone using Tapatalk



I didn't really do any network setup. Pi is connected via wired network, so I never activated wifi or anything. To that end, I've used the exact same process on the other pis and they have no issue (which is what points me back to hardware).

Don't know where the ipAddress file is...

ifconfig says:
Code: Select all
pi@RPiReceiver3:~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr b8:27:eb:13:11:1e 
          inet addr:10.0.1.196  Bcast:10.0.1.255  Mask:255.255.255.0
          inet6 addr: fe80::91b:670d:9932:68cb/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:142994 errors:0 dropped:11749 overruns:0 frame:0
          TX packets:15297 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:22410466 (21.3 MiB)  TX bytes:2493325 (2.3 MiB)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:200 errors:0 dropped:0 overruns:0 frame:0
          TX packets:200 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:16656 (16.2 KiB)  TX bytes:16656 (16.2 KiB)

wlan0     Link encap:Ethernet  HWaddr b8:27:eb:46:44:4b 
          inet6 addr: fe80::2f91:529a:e8fd:28f2/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:20254 errors:0 dropped:20254 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:7200894 (6.8 MiB)  TX bytes:0 (0.0 B)


http://nerdhome.jimdo.com

Posted on
Thu Mar 23, 2017 12:50 pm
roquej offline
User avatar
Posts: 609
Joined: Jan 04, 2015
Location: South Florida, USA

Re: piBeacon: presence monitoring plugin discussions

Karl,

A bit more information. I have 4 rpis. Two are solid and stable. Two keep going down, where only a power-off resets them. Curiously, the only difference is that the two that keep crashing have:

min interval set to "as soon as we received a new message, use this for fast down and CAR models"

The other stable two have this option set to default ( 5 min)

Considering that I have changed the power supplies and replaced the SSD, and they are in either a UPS or power filter, this seems to point to a software issue.

For now, I have set all rpis to 5min and they seem to be stable.

JP

Posted on
Thu Mar 23, 2017 2:54 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

piBeacon: presence monitoring plugin discussions

Will check. And thanks for the parameters

And do you have debug on in the rpi. It might be that the temp space for the logfile blows up.

[UPDATE]: that parameter is only for the plugin, is not used on the RPI.. ...????


Sent from my iPhone using Tapatalk

Posted on
Thu Mar 23, 2017 5:11 pm
kw123 offline
User avatar
Posts: 8363
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: presence monitoring plugin discussions

Could you send me all parameters relevant for these rpi?
Use the menu print option.


Sent from my iPhone using Tapatalk

Page 50 of 78 1 ... 47, 48, 49, 50, 51, 52, 53 ... 78

Who is online

Users browsing this forum: No registered users and 4 guests