posed v 7.66.152
fixed:signal delta mode send too many messages, now does the correct compare and only sends a message to indigo if signal from iBeacon changed by > xx dBm.
added:==
now offers a new way of getting the data from the RPI to indigo. the RPi opens a direct tcp/ip socket to the indigo plugin and send the data directly. This avoids the loooong path RPI->HTTP->Indigowebserver -> log file ->SQLlogger-> subscribe toVariableChanges - >plugin. It also measures stats that can be shown in the log file, e.g.:
- Code: Select all
15:14:39 pi TCPIP socket -Stats for RPI-->INDIGO data transfers. Tracking started 2017-10-10 14:52:10. Report TX errors if time between errors is <:10Min
15:14:39 pi TCPIP socket -IP name type first last #MSGs #bytes bytes/MSG bytes/min MSGs/min
15:14:39 -192.168.1.20 pi_IN_0 ok 2017-10-10 14:52:25 2017-10-10 15:14:33 98 18912 192 841.0400 4.3582
15:14:39 -192.168.1.20 pi_IN_Alive ok 2017-10-10 14:59:09 2017-10-10 15:10:14 2 232 116 10.3173 0.0889
15:14:40 -192.168.1.21 pi_IN_1 ok 2017-10-10 14:52:23 2017-10-10 15:14:22 65 16575 255 737.1107 2.8906
15:14:40 -192.168.1.21 pi_IN_Alive ok 2017-10-10 14:54:55 2017-10-10 15:05:41 2 226 113 10.0505 0.0889
15:14:40 -192.168.1.22 pi_IN_2 ok 2017-10-10 14:52:25 2017-10-10 15:14:39 109 33730 309 1500.0 4.8474
15:14:40 -192.168.1.22 pi_IN_Alive ok 2017-10-10 15:01:02 2017-10-10 15:13:27 2 238 119 10.5842 0.0889
15:14:40 -192.168.1.23 pi_IN_3 ok 2017-10-10 14:52:27 2017-10-10 15:14:27 126 103786 823 4615.5 5.6034
15:14:40 -192.168.1.23 pi_IN_Alive ok 2017-10-10 14:59:32 2017-10-10 15:10:38 2 224 112 9.9616 0.0889
15:14:40 -192.168.1.24 pi_IN_4 ok 2017-10-10 14:52:26 2017-10-10 15:13:59 55 56187 1021 2498.7 2.4459
15:14:40 -192.168.1.24 pi_IN_Alive ok 2017-10-10 14:52:44 2017-10-10 15:13:40 3 345 115 15.3426 0.1334
15:14:40 -192.168.1.25 pi_IN_5 errLength 2017-10-10 14:53:42 2017-10-10 15:11:08 4 5792 1448 257.5774 0.1779
15:14:40 -192.168.1.25 pi_IN_5 ok 2017-10-10 14:52:50 2017-10-10 15:14:25 63 82089 1303 3650.6 2.8017
15:14:40 -192.168.1.25 pi_IN_Alive ok 2017-10-10 14:53:20 2017-10-10 15:14:18 3 339 113 15.0757 0.1334
15:14:40 -192.168.1.26 pi_IN_6 ok 2017-10-10 14:52:35 2017-10-10 15:14:23 93 51379 552 2284.9 4.1358
15:14:40 -192.168.1.26 pi_IN_Alive ok 2017-10-10 15:02:26 2017-10-10 15:12:49 2 238 119 10.5842 0.0889
15:14:40 -192.168.1.27 pi_IN_7 ok 2017-10-10 14:52:23 2017-10-10 15:13:51 13 2182 167 97.0362 0.5781
15:14:40 -192.168.1.27 pi_IN_Alive ok 2017-10-10 14:53:57 2017-10-10 15:13:30 11 1210 110 53.8102 0.4892
15:14:40 -192.168.1.28 pi_IN_8 ok 2017-10-10 14:52:23 2017-10-10 15:14:39 58 15291 263 680.0096 2.5793
15:14:40 -192.168.1.28 pi_IN_Alive ok 2017-10-10 14:57:04 2017-10-10 15:07:52 2 226 113 10.0505 0.0889
15:14:40 -192.168.1.29 pi_IN_9 ok 2017-10-10 14:52:30 2017-10-10 15:14:06 15 3540 236 157.4282 0.6671
15:14:40 -192.168.1.29 pi_IN_Alive ok 2017-10-10 14:52:27 2017-10-10 15:11:08 12 1392 116 61.9040 0.5337
15:14:40 -192.168.1.31 pi_IN_11 ok 2017-10-10 14:52:28 2017-10-10 15:14:40 63 20790 330 924.5569 2.8017
15:14:40 -192.168.1.31 pi_IN_Alive ok 2017-10-10 15:02:39 2017-10-10 15:13:01 2 222 111 9.8726 0.0889
15:14:40 -192.168.1.33 pi_IN_13 ok 2017-10-10 14:52:52 2017-10-10 15:14:11 24 7046 293 313.3443 1.0673
15:14:40 -192.168.1.33 pi_IN_Alive ok 2017-10-10 14:55:03 2017-10-10 15:05:39 2 252 126 11.2068 0.0889
15:14:40 -192.168.1.34 pi_IN_14 ok 2017-10-10 14:52:42 2017-10-10 15:14:39 17 3315 195 147.4221 0.7560
15:14:40 -192.168.1.34 pi_IN_Alive ok 2017-10-10 14:54:25 2017-10-10 15:06:21 3 354 118 15.7428 0.1334
15:14:40 -192.168.1.36 pi_IN_16 ok 2017-10-10 14:52:42 2017-10-10 15:14:19 59 13629 231 606.0984 2.6238
15:14:40 -192.168.1.36 pi_IN_Alive ok 2017-10-10 14:55:20 2017-10-10 15:05:57 2 222 111 9.8726 0.0889
15:14:40 -192.168.1.38 pi_IN_18 ok 2017-10-10 14:52:38 2017-10-10 15:13:41 15 2696 179 119.8944 0.6671
15:14:40 -192.168.1.38 pi_IN_Alive ok 2017-10-10 14:52:34 2017-10-10 15:13:38 8 1066 133 47.4063 0.3558
15:14:40 -total 935 443725 474 19733.0 41.5806
15:14:40 pi TCPIP socket - === Stats for RPI --> INDIGO data transfers == END total minutes measured: 22
you can see e.g. the bad packages from RPI_5. every 10th page has the wrong length = incomplete package. using a different cable the RPI is fine.. now I need to replace the cable in the wall.
the new method can be selected in config. You need to set the incoming PORT default is 12087.. any port > 10k should be fine.
==
option to ignore "junk beacons" set in config. Junk beacons are beacon with no data in the package, UUID undefined, rx=tx ..
==
accept new beacons can be set to a dBm value instead of just on/off This allow to add a new beacon and set e.g. the threshold to -60 dBm and put the beacon on the RPI. It should only see THAT beacon as a new one as all the others should have much lower signal strength.
==
ignore signals that are too weak you can set a threshold for each beacon individually to ignore a signal < xxdBm (e.g. -88). The RPI will ignore these signals and not update indigo. This should allow to suppress up/down/up/down for beacons that are just at the edge of the detection distance.
==
changed default folder device and variable names replaced any "-" with a "_" character. As indigo is not fully supporting a - sign in some of these case I changed all occurrences from - to _. This might require you to edit e.g. events that rigger on e.g. signal variables with a - sign e.g. "iBeacon_Count_ALL_Away" is the new name..
when starting this plugin you SHOULD go into config and make sure that all parameters are set properly.
Karl
this was a major learning experience to have a threaded tcpcip listener running in indigo and feeding the plugin in a very fast and efficient way.
and thanks to all the professional help from Matt/Jay/R.