piBeacon: presence monitoring plugin discussions
Re: piBeacon: presence monitoring plugin discussions
Looks all
Ok will do 2 more copies to simulate.
And by the way you have a temperature or under Voltage issue on your rpi.
Look at your power supply.
Karl.
Sent from my iPhone using Tapatalk
Ok will do 2 more copies to simulate.
And by the way you have a temperature or under Voltage issue on your rpi.
Look at your power supply.
Karl.
Sent from my iPhone using Tapatalk
Re: piBeacon: presence monitoring plugin discussions
And try to delete that device and recreate it.
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
Re: piBeacon: presence monitoring plugin discussions
HI Karl
Think it has to do with the blank ipAddress?
This rpi has a USB wifi connector (to use big antenna) as far away.
Occasionally gets 2 ip address 192.168.1.185 and on from the unwanted wlan1 adpater 192.168.1.42
Typically I disable that wlan1 with sudo ifconfig wlan1 down, and all ticks over until reboot.
ifconfig
But now getting (after resend all files) no ip address?
-----------------------
Ipaddress seems to be False Alarm - Sorry
----------------------
Resend everything and reboot seems to have resolved the ipAddress
The status still is recording 'bad Sensor data, disconnected'
That rpi is on a long long power cable above a water tank in waterproof box.
No surprising is undervolt; haven't got around to upgrading the gauge of cable...
Think it has to do with the blank ipAddress?
This rpi has a USB wifi connector (to use big antenna) as far away.
Occasionally gets 2 ip address 192.168.1.185 and on from the unwanted wlan1 adpater 192.168.1.42
Typically I disable that wlan1 with sudo ifconfig wlan1 down, and all ticks over until reboot.
ifconfig
Code: Select all
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether b8:27:eb:c4:3e:e3 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 619 bytes 149512 (146.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 619 bytes 149512 (146.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.185 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::f185:3dda:a1eb:bfde prefixlen 64 scopeid 0x20<link>
ether e8:4e:06:0c:32:39 txqueuelen 1000 (Ethernet)
RX packets 14125 bytes 2572946 (2.4 MiB)
RX errors 0 dropped 133 overruns 0 frame 0
TX packets 2154 bytes 350569 (342.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0Code: Select all
27-08:53:25 piBeaconUtils writeTZ L:1333 Lv:30 cBY:master changing timezone executing
27-08:53:26 piBeaconUtils writeIPtoFile L:1627 Lv:30 cBY:master writing ip number to file >><< reason:
27-08:53:31 master checknetwork0 L:1621 Lv:30 no ip number working, trying again, indigoServerOn:True, ip:
27-08:53:39 master checknetwork0 L:1621 Lv:30 no ip number working, trying again, indigoServerOn:True, ip:
27-08:53:46 master checknetwork0 L:1621 Lv:30 no ip number working, trying again, indigoServerOn:True, ip:
27-08:53:53 master checknetwork0 L:1621 Lv:30 no ip number working, trying again, indigoServerOn:True, ip:
27-08:53:53 master checknetwork0 L:1613 Lv:30 no ip number working, giving up, running w/o ip number, setting mode to clockMANUAL
27-08:53:55 piBeaconUtils writeTZ L:1333 Lv:30 cBY:master changing timezone executing
27-08:53:55 master readNewParams L:382 Lv:30 UPS-V2 interface NOT enabled
27-08:54:02 piBeaconUtils writeTZ L:1333 Lv:30 cBY:ADS1x15 changing timezone executing
27-08:54:02 ADS1x15 readParams L:611 Lv:30 ==== Start ADS1x15 ===== @ i2c:73; inputC:0; deltaX:0.1, gain:6144, resModel:1
27-08:54:02 ADS1x15 readParams L:611 Lv:30 ==== Start ADS1x15 ===== @ i2c:73; inputC:0; deltaX:0.1, gain:6144, resModel:1
27-08:54:02 ADS1x15 readParams L:611 Lv:30 ==== Start ADS1x15 ===== @ i2c:73; inputC:0; deltaX:0.1, gain:6144, resModel:1
27-08:54:02 ADS1x15 readParams L:611 Lv:30 ==== Start ADS1x15 ===== @ i2c:73; inputC:0; deltaX:0.1, gain:6144, resModel:1
27-08:54:02 ADS1x15 readParams L:613 Lv:30 ==== Start ADS1x15... sendToIndigoEvery:60.0;minSendDelta:4.0; sensorRefreshSecs:10.0,all i2c->devids:{73: [u'297270947', u'1036561108', u'1021059064', u'752082303']}
27-08:54:02 piBeaconUtils getIPNumber L:640 Lv:30 cBY:ADS1x15 no ip number defined
27-08:54:02 ADS1x15 execADS1x15 L:679 Lv:30 no ip number working, giving u-----------------------
Ipaddress seems to be False Alarm - Sorry
----------------------
Resend everything and reboot seems to have resolved the ipAddress
The status still is recording 'bad Sensor data, disconnected'
That rpi is on a long long power cable above a water tank in waterproof box.
No surprising is undervolt; haven't got around to upgrading the gauge of cable...
Re: piBeacon: presence monitoring plugin discussions
It can only show "bad Sensor data, disconnected?"
when the RPI sends that to the plugin
and the rpi sends that when
and value =="" when there is a read error
you should see that with:
tail -f /var/log/pibeacon.log
on the RPI
And could you post the file parameters from the RPI /home/pi/pibeacon/parameters
the section :
and here w 4 identical devices for the same input port
Karl
when the RPI sends that to the plugin
Code: Select all
if u"badSensor" in uData:
self.addToStatesUpdateDict(dev.id,u"status",u"bad Sensor data, disconnected?")
Code: Select all
if value == "":
sensorWasBad = True
data["sensors"][sensor][devId]["INPUT"] = "badSensor"
if badSensor > 5:
U.logger.log(30," bad sensor")
U.sendURL(data)
lastData[devId] =-100.
continue
you should see that with:
tail -f /var/log/pibeacon.log
on the RPI
And could you post the file parameters from the RPI /home/pi/pibeacon/parameters
the section :
Code: Select all
"sensors": {
"ADS1x15": {
"1697729290": {
"format": "%3.2f",
"gain": "6144",
"i2cAddress": "72",
"input": "0",
"logScale": "0",
"minSendDelta": "4",
"offset": "-370",
"resModel": "16",
"sendToIndigoEvery": "30",
"sensorRefreshSecs": "2",
"useMuxChannel": "-1"
},
"188809276": {
"format": "%3.0f",
"gain": "6144",
"i2cAddress": "72",
"input": "0",
"logScale": "0",
"minSendDelta": "4",
"offset": "-370",
"resModel": "16",
"sendToIndigoEvery": "30",
"sensorRefreshSecs": "2",
"useMuxChannel": "-1"
}
},
....
Re: piBeacon: presence monitoring plugin discussions
Yeah - saw that in the plugin.py.
I do have a couple (well plenty) of sensors on other rpis that are actually disconnected/bad Sensor.
How well isolated to this sensor/pi is that error message?
(Strangely INPUT, INPut_raw all fine....)
parameters: (Copied and paste in 2 halfs ignore any {} formatting issues)
Just noticed that 1021059064 - doesn't have useMuxChannel - have opened and edited slightly to hopefully update.
Doesn't seem to have updated at rpi level - will do so manually in Nano, no difference
I do have a couple (well plenty) of sensors on other rpis that are actually disconnected/bad Sensor.
How well isolated to this sensor/pi is that error message?
(Strangely INPUT, INPut_raw all fine....)
parameters: (Copied and paste in 2 halfs ignore any {} formatting issues)
Code: Select all
"sensors": {
"ADS1x15": {
"1021059064": {
"gain": "6144",
"i2cAddress": "73",
"input": "0",
"logScale": "0",
"minSendDelta": "4",
"offset": "0",
"resModel": "16",
"sendToIndigoEvery": "60",
"sensorRefreshSecs": "1"
},
"1036561108": {
"gain": "6144",
"i2cAddress": "73",
"input": "0",
"logScale": "0",
"minSendDelta": "10",
"offset": "-370",
"resModel": "16",
"sendToIndigoEvery": "180",
"sensorRefreshSecs": "10",
"useMuxChannel": "-1"
},
"297270947": {
"format": "%3.0f",
"gain": "6144",
"i2cAddress": "73",
"input": "0",
"logScale": "0",
"minSendDelta": "10",
"offset": "-370",
"resModel": "16",
"sendToIndigoEvery": "180",
"sensorRefreshSecs": "10",
"useMuxChannel": "-1"
},
"752082303": {
"gain": "6144",
"i2cAddress": "73",
"input": "0",
"logScale": "0",
"minSendDelta": "4",
"offset": "0",
"resModel": "16",
"sendToIndigoEvery": "60",
"sensorRefreshSecs": "10",
"useMuxChannel": "-1"
}
}
Doesn't seem to have updated at rpi level - will do so manually in Nano, no difference
Last edited by GlennNZ on Sun Jul 26, 2020 5:19 pm, edited 2 times in total.
Re: piBeacon: presence monitoring plugin discussions
and for the undervolt issue:
Even if you don't use ethernet connection (ie wifi) use an ethernet cable w POE injector and poe splitter to feed the RPi.
You don't have to use the ethernet function.
That has the advantage that it sends 50Volts (1/10 of the amps needed) and then converts its back to 5V AT THE PLACE OF THE RPI.
eg:
https://www.amazon.com/GAF-USB-802-3af- ... 182&sr=8-1
andhttps://www.amazon.com/Injector-Adapter ... 066&sr=8-9
Karl
Even if you don't use ethernet connection (ie wifi) use an ethernet cable w POE injector and poe splitter to feed the RPi.
You don't have to use the ethernet function.
That has the advantage that it sends 50Volts (1/10 of the amps needed) and then converts its back to 5V AT THE PLACE OF THE RPI.
eg:
https://www.amazon.com/GAF-USB-802-3af- ... 182&sr=8-1
andhttps://www.amazon.com/Injector-Adapter ... 066&sr=8-9
Karl
Re: piBeacon: presence monitoring plugin discussions
the parameters file looks good.
>>How well isolated to this sensor/pi is that error message?<<
here the code in the plugin:
the "badSensor" text must be in sensors[sensor][devid]
>>How well isolated to this sensor/pi is that error message?<<
here the code in the plugin:
Code: Select all
for devIds in sensors[sensor]:
try: devId = int(devIds)
except: devId = 0
if devId == 0: continue
dev= indigo.devices[devId]
props= dev.pluginProps
data = sensors[sensor][devIds]
uData = unicode(data)
..
if u"badSensor" in uData:
self.addToStatesUpdateDict(dev.id,u"status",u"bad Sensor data, disconnected?")
try: dev.updateStateImageOnServer(indigo.kStateImageSel.PowerOff)
except: pass
continueRe: piBeacon: presence monitoring plugin discussions
>>Just noticed that 1021059064 - doesn't have useMuxChannel - have opened and edited slightly to hopefully update.
That devices is not using the mux channels, it is ignored, not used if it is there or not, BUT it should be consistent, either the key is there or not, will check
w four independent inputs and four i2c options ( = 16 adc channels) that should be enough
Karl
===> check
tail -f /var/log/pibeacon
!!!
That devices is not using the mux channels, it is ignored, not used if it is there or not, BUT it should be consistent, either the key is there or not, will check
w four independent inputs and four i2c options ( = 16 adc channels) that should be enough
Karl
===> check
tail -f /var/log/pibeacon
!!!
Re: piBeacon: presence monitoring plugin discussions
Hi
Added :
Oddly - getting nothing at all in plugin.log, where is it coming from....
G
Added :
Code: Select all
if u"badSensor" in uData:
self.indiLOG.log(10, sensor+" Glenn Added Udata: "+ unicode(uData))
self.addToStatesUpdateDict(dev.id,u"status",u"bad Sensor data, disconnected?")
try: dev.updateStateImageOnServer(indigo.kStateImageSel.PowerOff)
except: pass
continue
G
Re: piBeacon: presence monitoring plugin discussions
I think the bad Sensor data == message is very old, and that the status of the ADS1x15 device is not being updated....
Glenn
Glenn
Re: piBeacon: presence monitoring plugin discussions
Then it has may be the wrong i2c channelGlennNZ wrote:I think the bad Sensor data == message is very old, and that the status of the ADS1x15 device is not being updated....
Glenn
Please check the device id. Make sure
- it is active ( comm on )
- the id is part of the parameters file.
I tried also to add one with the wrong i2c and then yes it shows bad sensor. But only for that one
Also when you have consistent under voltage status you will damage the ssd
Karl
Sent from my iPhone using Tapatalk
piBeacon: presence monitoring plugin discussions
Thanks will try ASAP
But are you remembering that all the other states INPUT etc INPUT_raw all correct and updating regularly .....
Seems something specific to the “status” state of the ADS device, but not the others
Glenn
Sent from my iPhone using Tapatalk
But are you remembering that all the other states INPUT etc INPUT_raw all correct and updating regularly .....
Seems something specific to the “status” state of the ADS device, but not the others
Glenn
Sent from my iPhone using Tapatalk
Re: piBeacon: presence monitoring plugin discussions
OK i2c correct, in edit and parameters file i2cdetect -y 1 - detects
& INPUT updated every 20 seconds or so
plugin.py line 13063:
added Log
1036561108 == status bad sensor, but seems never updated
297270947 == status bad sensor, but seems never updated
1021059064 == Status uptodate & correct
They all have INPUT_O selected - correct one showing key INPUT rest ?INPUT_0,,,,
& INPUT updated every 20 seconds or so
plugin.py line 13063:
added Log
Code: Select all
if sensor == u"ADS1x15" :
self.indiLOG.log(10, u'Glenn added : devid:' +unicode(dev.id)+", data: "+ unicode(data)+ ', whichkeys:'+unicode(whichKeysToDisplay)+ u', sensor:'+unicode(sensor))
self.updateINPUT(dev, data, whichKeysToDisplay, 0, sensor)
continueCode: Select all
2020-07-27 11:25:31 Glenn added : devid:1874635667, data: {u'INPUT': 1051.31}, whichkeys:INPUT_1, sensor:ADS1x15
2020-07-27 11:25:31 Glenn added : devid:1980283685, data: {u'INPUT': 1427.38}, whichkeys:INPUT_0, sensor:ADS1x15
2020-07-27 11:25:31 Glenn added : devid:1874635667, data: {u'INPUT': 1050.75}, whichkeys:INPUT_1, sensor:ADS1x15
2020-07-27 11:25:31 Glenn added : devid:1980283685, data: {u'INPUT': 1417.5}, whichkeys:INPUT_0, sensor:ADS1x15
2020-07-27 11:25:51 Glenn added : devid:93013512, data: {u'INPUT': 553.31}, whichkeys:INPUT, sensor:ADS1x15
2020-07-27 11:25:51 Glenn added : devid:1123032143, data: {u'INPUT': 552.56}, whichkeys:INPUT, sensor:ADS1x15
2020-07-27 11:26:32 Glenn added : devid:1874635667, data: {u'INPUT': 1050.38}, whichkeys:INPUT_1, sensor:ADS1x15
2020-07-27 11:26:32 Glenn added : devid:1980283685, data: {u'INPUT': 1419.63}, whichkeys:INPUT_0, sensor:ADS1x15
2020-07-27 11:26:38 Glenn added : devid:297270947, data: {u'INPUT': 958.88}, whichkeys:INPUT_0, sensor:ADS1x15
2020-07-27 11:26:38 Glenn added : devid:1036561108, data: {u'INPUT': 959.25}, whichkeys:INPUT_0, sensor:ADS1x15
2020-07-27 11:26:38 Glenn added : devid:1021059064, data: {u'INPUT': 959.44}, whichkeys:INPUT, sensor:ADS1x15
2020-07-27 11:26:38 Glenn added : devid:752082303, data: {u'INPUT': 959.44}, whichkeys:INPUT_0, sensor:ADS1x15
2020-07-27 11:27:03 Glenn added : devid:93013512, data: {u'INPUT': 524.25}, whichkeys:INPUT, sensor:ADS1x15
2020-07-27 11:27:03 Glenn added : devid:1123032143, data: {u'INPUT': 522.94}, whichkeys:INPUT, sensor:ADS1x15297270947 == status bad sensor, but seems never updated
1021059064 == Status uptodate & correct
They all have INPUT_O selected - correct one showing key INPUT rest ?INPUT_0,,,,
Re: piBeacon: presence monitoring plugin discussions
Ok delete and recreate the devices.
Changed from input_x to just input as each device now has just one channel.
Was done some release ago.
Sent from my iPhone using Tapatalk
Changed from input_x to just input as each device now has just one channel.
Was done some release ago.
Sent from my iPhone using Tapatalk
Re: piBeacon: presence monitoring plugin discussions
OK
Mystery explained - might leave the devices as some are quite well used in triggers/scripts/control pages.. (and INPUT fine)
Thanks again - sorry Karl that was a bit of a wild goose chase..
Mystery explained - might leave the devices as some are quite well used in triggers/scripts/control pages.. (and INPUT fine)
Thanks again - sorry Karl that was a bit of a wild goose chase..