ADS1015 Connection on RPI

once you restart the agent, add this command tail -f /var/log/myDevices/cayenne.log and share the terminal output here.

I will have to do this later this afternoon. Will let you know. Thank you

Kevin Williams

Commercial Food Equipment Service Instructor

Wake Tech Community College

Email correspondence to and from this address may be subject to the North Carolina Public Records law and may be disclosed to third parties by an authorized state official (NCGS. ch. 132). Student educational records are subject to FERPA.

It is cooking!!
There is a lot of information that is spitting out! Pages!

Here it is…
page 1
pi@raspberrypi:~ $ tail -f /var/log/myDevices/cayenne.log
2019-04-22 16:44:32 - myDevices - INFO - Sensors info: [{‘unit’: ‘c’, ‘value’: 24.38, ‘type’: ‘temp’, ‘name’: ‘DS18B20’, ‘channel’: ‘dev:020a9177ef40’}]
2019-04-22 16:44:33 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 4.0}, {‘sys:cpu;temp’: 55.844}, {‘sys:ram;usage’: 497926144}, {‘sys:storage:/;usage’: 5961510912}, {‘sys:net;ip’: ‘192.168.0.24’}, {‘sys:net;speedtest’: 1.8332855915210544}, {‘dev:020a9177ef40’: 24.38}, {‘dev:cayenne_ads1xxx:3’: 0.138671875}, {‘dev:cayenne_ads1xxx:2’: 0.12841796875}, {‘dev:cayenne_ads1xxx:1’: 0.1396484375}, {‘dev:cayenne_ads1xxx:0’: 0.18896484375}] + sys:gpio
2019-04-22 16:44:47 - myDevices - INFO - Sensors info: [{‘unit’: ‘c’, ‘value’: 24.25, ‘type’: ‘temp’, ‘name’: ‘DS18B20’, ‘channel’: ‘dev:020a9177ef40’}]
2019-04-22 16:44:48 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 1.8}, {‘sys:cpu;temp’: 55.306}, {‘sys:ram;usage’: 500973568}, {‘sys:storage:/;usage’: 5961531392}, {‘dev:020a9177ef40’: 24.25}, {‘dev:cayenne_ads1xxx:3’: 0.126953125}, {‘dev:cayenne_ads1xxx:2’: 0.138671875}, {‘dev:cayenne_ads1xxx:1’: 0.12841796875}, {‘dev:cayenne_ads1xxx:0’: 0.18994140625}]
2019-04-22 16:45:02 - myDevices - INFO - Sensors info: [{‘unit’: ‘c’, ‘value’: 24.38, ‘type’: ‘temp’, ‘name’: ‘DS18B20’, ‘channel’: ‘dev:020a9177ef40’}]
2019-04-22 16:45:03 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 7.2}, {‘sys:cpu;temp’: 55.844}, {‘sys:ram;usage’: 507187200}, {‘sys:storage:/;usage’: 5961588736}, {‘dev:020a9177ef40’: 24.38}, {‘dev:cayenne_ads1xxx:3’: 0.1396484375}, {‘dev:cayenne_ads1xxx:1’: 0.1396484375}, {‘dev:cayenne_ads1xxx:0’: 0.19091796875}]
2019-04-22 16:45:17 - myDevices - INFO - Sensors info: [{‘unit’: ‘c’, ‘value’: 24.31, ‘type’: ‘temp’, ‘name’: ‘DS18B20’, ‘channel’: ‘dev:020a9177ef40’}]
2019-04-22 16:45:18 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 1.8}, {‘sys:cpu;temp’: 54.768}, {‘sys:ram;usage’: 505532416}, {‘sys:storage:/;usage’: 5961535488}, {‘dev:020a9177ef40’: 24.31}, {‘dev:cayenne_ads1xxx:3’: 0.12744140625}, {‘dev:cayenne_ads1xxx:2’: 0.1396484375}]
2019-04-22 16:45:32 - myDevices - INFO - Sensors info: [{‘unit’: ‘c’, ‘value’: 24.31, ‘type’: ‘temp’, ‘name’: ‘DS18B20’, ‘channel’: ‘dev:020a9177ef40’}]
2019-04-22 16:45:33 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 2.5}, {‘sys:cpu;temp’: 54.768}, {‘sys:ram;usage’: 516120576}, {‘sys:storage:/;usage’: 5961580544}, {‘sys:net;ip’: ‘192.168.0.24’}, {‘sys:net;speedtest’: 1.8332855915210544}, {‘dev:020a9177ef40’: 24.31}, {‘dev:cayenne_ads1xxx:3’: 0.14013671875}, {‘dev:cayenne_ads1xxx:2’: 0.12744140625}, {‘dev:cayenne_ads1xxx:1’: 0.13916015625}, {‘dev:cayenne_ads1xxx:0’: 0.19140625}] + sys:gpio
2019-04-22 16:45:47 - myDevices - INFO - Sensors info: [{‘unit’: ‘c’, ‘value’: 24.31, ‘type’: ‘temp’, ‘name’: ‘DS18B20’, ‘channel’: ‘dev:020a9177ef40’}]
2019-04-22 16:45:48 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 7.2}, {‘sys:ram;usage’: 518901760}, {‘sys:storage:/;usage’: 5961560064}, {‘dev:cayenne_ads1xxx:3’: 0.126953125}, {‘dev:cayenne_ads1xxx:2’: 0.13916015625}, {‘dev:cayenne_ads1xxx:1’: 0.140625}, {‘dev:cayenne_ads1xxx:0’: 0.18896484375}]
2019-04-22 16:46:02 - myDevices - INFO - Sensors info: [{‘unit’: ‘c’, ‘value’: 24.31, ‘type’: ‘temp’, ‘name’: ‘DS18B20’, ‘channel’: ‘dev:020a9177ef40’}]
2019-04-22 16:46:03 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 12.8}, {‘sys:ram;usage’: 519061504}, {‘dev:cayenne_ads1xxx:3’: 0.140625}, {‘dev:cayenne_ads1xxx:2’: 0.138671875}, {‘dev:cayenne_ads1xxx:1’: 0.12744140625}, {‘dev:cayenne_ads1xxx:0’: 0.1904296875}]
2019-04-22 16:46:17 - myDevices - INFO - Sensors info: [{‘unit’: ‘c’, ‘value’: 24.31, ‘type’: ‘temp’, ‘name’: ‘DS18B20’, ‘channel’: ‘dev:020a9177ef40’}]
2019-04-22 16:46:18 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 5.5}, {‘sys:cpu;temp’: 53.692}, {‘sys:ram;usage’: 518742016}, {‘sys:storage:/;usage’: 5961568256}, {‘dev:cayenne_ads1xxx:3’: 0.138671875}, {‘dev:cayenne_ads1xxx:2’: 0.14013671875}, {‘dev:cayenne_ads1xxx:1’: 0.1396484375}, {‘dev:cayenne_ads1xxx:0’: 0.18994140625}]
2019-04-22 16:46:32 - myDevices - INFO - Sensors info: [{‘unit’: ‘c’, ‘value’: 24.38, ‘type’: ‘temp’, ‘name’: ‘DS18B20’, ‘channel’: ‘dev:020a9177ef40’}]
2019-04-22 16:46:33 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 6.2}, {‘sys:cpu;temp’: 54.23}, {‘sys:ram;usage’: 507326464}, {‘sys:storage:/;usage’: 5961568256}, {‘sys:net;ip’: ‘192.168.0.24’}, {‘sys:net;speedtest’: 1.8332855915210544}, {‘dev:020a9177ef40’: 24.38}, {‘dev:cayenne_ads1xxx:3’: 0.12939453125}, {‘dev:cayenne_ads1xxx:2’: 0.1396484375}, {‘dev:cayenne_ads1xxx:1’: 0.138671875}, {‘dev:cayenne_ads1xxx:0’: 0.1904296875}] + sys:gpio

page 2

2019-04-22 16:47:48 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 7.5}, {‘sys:ram;usage’: 529043456}, {‘sys:storage:/;usage’: 5961605120}, {‘dev:020a9177ef40’: 24.31}, {‘dev:cayenne_ads1xxx:3’: 0.1279296875}, {‘dev:cayenne_ads1xxx:1’: 0.14013671875}, {‘dev:cayenne_ads1xxx:0’: 0.189453125}]
2019-04-22 16:48:02 - myDevices - INFO - Sensors info: [{‘unit’: ‘c’, ‘value’: 24.31, ‘type’: ‘temp’, ‘name’: ‘DS18B20’, ‘channel’: ‘dev:020a9177ef40’}]
2019-04-22 16:48:03 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 5.8}, {‘sys:cpu;temp’: 56.382}, {‘sys:ram;usage’: 526745600}, {‘sys:storage:/;usage’: 5961613312}, {‘dev:cayenne_ads1xxx:2’: 0.13916015625}, {‘dev:cayenne_ads1xxx:0’: 0.1904296875}]
2019-04-22 16:48:17 - myDevices - INFO - Sensors info: [{‘unit’: ‘c’, ‘value’: 24.25, ‘type’: ‘temp’, ‘name’: ‘DS18B20’, ‘channel’: ‘dev:020a9177ef40’}]
2019-04-22 16:48:18 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 0.5}, {‘sys:cpu;temp’: 54.23}, {‘sys:ram;usage’: 515231744}, {‘sys:storage:/;usage’: 5961621504}, {‘dev:020a9177ef40’: 24.25}, {‘dev:cayenne_ads1xxx:2’: 0.1396484375}]
2019-04-22 16:48:32 - myDevices - INFO - Sensors info: [{‘unit’: ‘c’, ‘value’: 24.38, ‘type’: ‘temp’, ‘name’: ‘DS18B20’, ‘channel’: ‘dev:020a9177ef40’}]
2019-04-22 16:48:33 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 0.8}, {‘sys:cpu;temp’: 54.23}, {‘sys:ram;usage’: 514408448}, {‘sys:storage:/;usage’: 5961621504}, {‘sys:net;ip’: ‘192.168.0.24’}, {‘sys:net;speedtest’: 1.8332855915210544}, {‘dev:020a9177ef40’: 24.38}, {‘dev:cayenne_ads1xxx:3’: 0.13818359375}, {‘dev:cayenne_ads1xxx:2’: 0.1396484375}, {‘dev:cayenne_ads1xxx:1’: 0.12841796875}, {‘dev:cayenne_ads1xxx:0’: 0.19091796875}] + sys:gpio
2019-04-22 16:48:47 - myDevices - INFO - Sensors info: [{‘unit’: ‘c’, ‘value’: 24.38, ‘type’: ‘temp’, ‘name’: ‘DS18B20’, ‘channel’: ‘dev:020a9177ef40’}]
2019-04-22 16:48:48 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 0.5}, {‘sys:cpu;temp’: 53.692}, {‘sys:ram;usage’: 515776512}, {‘sys:storage:/;usage’: 5961871360}, {‘dev:cayenne_ads1xxx:3’: 0.14013671875}, {‘dev:cayenne_ads1xxx:2’: 0.138671875}, {‘dev:cayenne_ads1xxx:1’: 0.126953125}, {‘dev:cayenne_ads1xxx:0’: 0.18994140625}]
2019-04-22 16:49:02 - myDevices - INFO - Sensors info: [{‘unit’: ‘c’, ‘value’: 24.38, ‘type’: ‘temp’, ‘name’: ‘DS18B20’, ‘channel’: ‘dev:020a9177ef40’}]
2019-04-22 16:49:03 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 9.7}, {‘sys:cpu;temp’: 54.768}, {‘sys:ram;usage’: 529100800}, {‘sys:storage:/;usage’: 5961883648}, {‘dev:cayenne_ads1xxx:3’: 0.13818359375}, {‘dev:cayenne_ads1xxx:2’: 0.140625}, {‘dev:cayenne_ads1xxx:0’: 0.19091796875}]
2019-04-22 16:49:17 - myDevices - INFO - Sensors info: [{‘unit’: ‘c’, ‘value’: 24.31, ‘type’: ‘temp’, ‘name’: ‘DS18B20’, ‘channel’: ‘dev:020a9177ef40’}]
2019-04-22 16:49:18 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 17.3}, {‘sys:ram;usage’: 524660736}, {‘sys:storage:/;usage’: 5961908224}, {‘dev:020a9177ef40’: 24.31}, {‘dev:cayenne_ads1xxx:3’: 0.14013671875}, {‘dev:cayenne_ads1xxx:2’: 0.13818359375}, {‘dev:cayenne_ads1xxx:1’: 0.1396484375}]
2019-04-22 16:49:32 - myDevices - INFO - Sensors info: [{‘unit’: ‘c’, ‘value’: 24.38, ‘type’: ‘temp’, ‘name’: ‘DS18B20’, ‘channel’: ‘dev:020a9177ef40’}]
2019-04-22 16:49:33 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 15.5}, {‘sys:cpu;temp’: 54.768}, {‘sys:ram;usage’: 527630336}, {‘sys:storage:/;usage’: 5961945088}, {‘sys:net;ip’: ‘192.168.0.24’}, {‘sys:net;speedtest’: 1.8332855915210544}, {‘dev:020a9177ef40’: 24.38}, {‘dev:cayenne_ads1xxx:3’: 0.1396484375}, {‘dev:cayenne_ads1xxx:2’: 0.140625}, {‘dev:cayenne_ads1xxx:1’: 0.12841796875}, {‘dev:cayenne_ads1xxx:0’: 0.19091796875}] + sys:gpio
2019-04-22 16:49:47 - myDevices - INFO - Sensors info: [{‘unit’: ‘c’, ‘value’: 24.25, ‘type’: ‘temp’, ‘name’: ‘DS18B20’, ‘channel’: ‘dev:020a9177ef40’}]
2019-04-22 16:49:48 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 80.9}, {‘sys:cpu;temp’: 57.996}, {‘sys:ram;usage’: 548466688}, {‘sys:storage:/;usage’: 5962067968}, {‘dev:020a9177ef40’: 24.25}, {‘dev:cayenne_ads1xxx:3’: 0.14013671875}, {‘dev:cayenne_ads1xxx:2’: 0.1396484375}, {‘dev:cayenne_ads1xxx:1’: 0.138671875}, {‘dev:cayenne_ads1xxx:0’: 0.18701171875}]
2019-04-22 16:50:02 - myDevices - INFO - Sensors info: [{‘unit’: ‘c’, ‘value’: 24.38, ‘type’: ‘temp’, ‘name’: ‘DS18B20’, ‘channel’: ‘dev:020a9177ef40’}]
2019-04-22 16:50:03 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 7.6}, {‘sys:cpu;temp’: 55.844}, {‘sys:ram;usage’: 528642048}, {‘sys:storage:/;usage’: 5962022912}, {‘dev:020a9177ef40’: 24.38}, {‘dev:cayenne_ads1xxx:3’: 0.1279296875}, {‘dev:cayenne_ads1xxx:2’: 0.13916015625}, {‘dev:cayenne_ads1xxx:1’: 0.1396484375}, {‘dev:cayenne_ads1xxx:0’: 0.1904296875}]
2019-04-22 16:50:17 - myDevices - INFO - Sensors info: [{‘unit’: ‘c’, ‘value’: 24.25, ‘type’: ‘temp’, ‘name’: ‘DS18B20’, ‘channel’: ‘dev:020a9177ef40’}]
2019-04-22 16:50:18 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 2.5}, {‘sys:cpu;temp’: 54.23}, {‘sys:ram;usage’: 523612160}, {‘sys:storage:/;usage’: 5962027008}, {‘dev:020a9177ef40’: 24.25}, {‘dev:cayenne_ads1xxx:3’: 0.13916015625}, {‘dev:cayenne_ads1xxx:2’: 0.14013671875}, {‘dev:cayenne_ads1xxx:1’: 0.138671875}, {‘dev:cayenne_ads1xxx:0’: 0.19091796875}]
2019-04-22 16:50:32 - myDevices - INFO - Sensors info: [{‘unit’: ‘c’, ‘value’: 24.38, ‘type’: ‘temp’, ‘name’: ‘DS18B20’, ‘channel’: ‘dev:020a9177ef40’}]
2019-04-22 16:50:33 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 3.1}, {‘sys:cpu;temp’: 54.768}, {‘sys:ram;usage’: 529084416}, {‘sys:storage:/;usage’: 5962031104}, {‘sys:net;ip’: ‘192.168.0.24’}, {‘sys:net;speedtest’: 1.8332855915210544}, {‘dev:020a9177ef40’: 24.38}, {‘dev:cayenne_ads1xxx:3’: 0.12890625}, {‘dev:cayenne_ads1xxx:2’: 0.138671875}, {‘dev:cayenne_ads1xxx:1’: 0.14013671875}, {‘dev:cayenne_ads1xxx:0’: 0.1904296875}] + sys:gpio

Yup, just keeps on going…
I see there is an error on updating…How do I fix that?

if you check the ads is loaded properly.

can you restart the agent and send the log again.

Those two lines… were those in the message I sent you or I need to load them in?
Is that code telling you its not loaded properly? Where do I find this and change it? Are all the xxx’s supposed to be changed to the ads1015? Where is this code to change it?

they were in the log you send me and it is telling me the ads is loaded properly.

can you send me the log again after restarting the agent?

Sure.

Kevin Williams

Commercial Food Equipment Service Instructor

Wake Tech Community College

Email correspondence to and from this address may be subject to the North Carolina Public Records law and may be disclosed to third parties by an authorized state official (NCGS. ch. 132). Student educational records are subject to FERPA.

here it is!

pi@raspberrypi:~ cd /etc/myDevices/plugins pi@raspberrypi:/etc/myDevices/plugins sudo service myDevices restart
pi@raspberrypi:/etc/myDevices/plugins $ tail -f /var/log/myDevices/cayenne.log
2019-04-24 07:09:31 - myDevices - INFO - Send system info: [{‘sys:os:name’: ‘raspbian’}, {‘sys:os:version’: ‘9’}, {‘agent:version’: ‘2.0.3.275’}, {‘sys:pwr:reset’: 0}, {‘sys:pwr:halt’: 0}, {‘sys:i2c’: 1}, {‘sys:1wire’: 1}, {‘sys:spi’: 1}, {‘sys:devicetree’: 1}, {‘sys:uart’: 1}]
2019-04-24 07:09:32 - myDevices - INFO - Executing regular download test for network speed
2019-04-24 07:09:33 - myDevices - INFO - Sensors info: [{‘type’: ‘temp’, ‘channel’: ‘dev:020a9177ef40’, ‘unit’: ‘c’, ‘name’: ‘DS18B20’, ‘value’: 22.75}]
2019-04-24 07:09:33 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 19.0}, {‘sys:cpu;temp’: 54.768}, {‘sys:ram;usage’: 489185280}, {‘sys:storage:/;usage’: 5977264128}, {‘sys:net;ip’: ‘192.168.0.24’}, {‘dev:020a9177ef40’: 22.75}, {‘dev:cayenne_ads1xxx:0’: 0.18896484375}, {‘dev:cayenne_ads1xxx:1’: 0.12841796875}, {‘dev:cayenne_ads1xxx:2’: 0.14111328125}, {‘dev:cayenne_ads1xxx:3’: 0.140625}] + sys:gpio
2019-04-24 07:09:48 - myDevices - INFO - Sensors info: [{‘type’: ‘temp’, ‘channel’: ‘dev:020a9177ef40’, ‘unit’: ‘c’, ‘name’: ‘DS18B20’, ‘value’: 22.81}]
2019-04-24 07:09:48 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 35.7}, {‘sys:cpu;temp’: 55.844}, {‘sys:ram;usage’: 487067648}, {‘sys:storage:/;usage’: 5977784320}, {‘sys:net;speedtest’: 2.0349564824556228}, {‘dev:020a9177ef40’: 22.81}, {‘dev:cayenne_ads1xxx:0’: 0.18798828125}, {‘dev:cayenne_ads1xxx:1’: 0.14111328125}, {‘dev:cayenne_ads1xxx:3’: 0.1396484375}]
2019-04-24 07:10:03 - myDevices - INFO - Sensors info: [{‘type’: ‘temp’, ‘channel’: ‘dev:020a9177ef40’, ‘unit’: ‘c’, ‘name’: ‘DS18B20’, ‘value’: 22.75}]
2019-04-24 07:10:04 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 42.8}, {‘sys:cpu;temp’: 56.92}, {‘sys:ram;usage’: 493375488}, {‘sys:storage:/;usage’: 5977833472}, {‘dev:020a9177ef40’: 22.75}, {‘dev:cayenne_ads1xxx:0’: 0.1875}, {‘dev:cayenne_ads1xxx:1’: 0.1396484375}, {‘dev:cayenne_ads1xxx:3’: 0.14013671875}]
2019-04-24 07:10:18 - myDevices - INFO - Sensors info: [{‘type’: ‘temp’, ‘channel’: ‘dev:020a9177ef40’, ‘unit’: ‘c’, ‘name’: ‘DS18B20’, ‘value’: 22.69}]
2019-04-24 07:10:18 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 5.9}, {‘sys:ram;usage’: 506986496}, {‘sys:storage:/;usage’: 5977804800}, {‘dev:020a9177ef40’: 22.69}, {‘dev:cayenne_ads1xxx:0’: 0.189453125}, {‘dev:cayenne_ads1xxx:1’: 0.14111328125}, {‘dev:cayenne_ads1xxx:2’: 0.12841796875}, {‘dev:cayenne_ads1xxx:3’: 0.140625}]
2019-04-24 07:10:33 - myDevices - INFO - Sensors info: [{‘type’: ‘temp’, ‘channel’: ‘dev:020a9177ef40’, ‘unit’: ‘c’, ‘name’: ‘DS18B20’, ‘value’: 22.62}]
2019-04-24 07:10:33 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 1.5}, {‘sys:cpu;temp’: 54.768}, {‘sys:ram;usage’: 505585664}, {‘sys:storage:/;usage’: 5977796608}, {‘sys:net;ip’: ‘192.168.0.24’}, {‘sys:net;speedtest’: 2.0349564824556228}, {‘dev:020a9177ef40’: 22.62}, {‘dev:cayenne_ads1xxx:0’: 0.189453125}, {‘dev:cayenne_ads1xxx:1’: 0.12744140625}, {‘dev:cayenne_ads1xxx:2’: 0.12890625}, {‘dev:cayenne_ads1xxx:3’: 0.13818359375}] + sys:gpio

2019-04-24 07:10:48 - myDevices - INFO - Sensors info: [{‘type’: ‘temp’, ‘channel’: ‘dev:020a9177ef40’, ‘unit’: ‘c’, ‘name’: ‘DS18B20’, ‘value’: 22.69}]
2019-04-24 07:10:48 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 1.8}, {‘sys:cpu;temp’: 54.23}, {‘sys:ram;usage’: 505970688}, {‘dev:020a9177ef40’: 22.69}, {‘dev:cayenne_ads1xxx:0’: 0.1904296875}, {‘dev:cayenne_ads1xxx:1’: 0.12841796875}, {‘dev:cayenne_ads1xxx:2’: 0.1298828125}]
2019-04-24 07:11:03 - myDevices - INFO - Sensors info: [{‘type’: ‘temp’, ‘channel’: ‘dev:020a9177ef40’, ‘unit’: ‘c’, ‘name’: ‘DS18B20’, ‘value’: 22.69}]
2019-04-24 07:11:04 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 10.4}, {‘sys:cpu;temp’: 53.692}, {‘sys:ram;usage’: 507424768}, {‘sys:storage:/;usage’: 5977800704}, {‘dev:cayenne_ads1xxx:0’: 0.18798828125}, {‘dev:cayenne_ads1xxx:1’: 0.14013671875}, {‘dev:cayenne_ads1xxx:2’: 0.1416015625}, {‘dev:cayenne_ads1xxx:3’: 0.14013671875}]
2019-04-24 07:11:18 - myDevices - INFO - Sensors info: [{‘type’: ‘temp’, ‘channel’: ‘dev:020a9177ef40’, ‘unit’: ‘c’, ‘name’: ‘DS18B20’, ‘value’: 22.56}]
2019-04-24 07:11:18 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 16.3}, {‘sys:cpu;temp’: 55.844}, {‘sys:ram;usage’: 504688640}, {‘sys:storage:/;usage’: 5977899008}, {‘dev:020a9177ef40’: 22.56}, {‘dev:cayenne_ads1xxx:0’: 0.18896484375}, {‘dev:cayenne_ads1xxx:1’: 0.140625}, {‘dev:cayenne_ads1xxx:2’: 0.13037109375}]
2019-04-24 07:11:33 - myDevices - INFO - Sensors info: [{‘type’: ‘temp’, ‘channel’: ‘dev:020a9177ef40’, ‘unit’: ‘c’, ‘name’: ‘DS18B20’, ‘value’: 22.69}]
2019-04-24 07:11:33 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 4.0}, {‘sys:cpu;temp’: 56.92}, {‘sys:ram;usage’: 514564096}, {‘sys:storage:/;usage’: 5977915392}, {‘sys:net;ip’: ‘192.168.0.24’}, {‘sys:net;speedtest’: 2.0349564824556228}, {‘dev:020a9177ef40’: 22.69}, {‘dev:cayenne_ads1xxx:0’: 0.189453125}, {‘dev:cayenne_ads1xxx:1’: 0.1416015625}, {‘dev:cayenne_ads1xxx:2’: 0.14111328125}, {‘dev:cayenne_ads1xxx:3’: 0.14013671875}] + sys:gpio
2019-04-24 07:11:48 - myDevices - INFO - Sensors info: [{‘type’: ‘temp’, ‘channel’: ‘dev:020a9177ef40’, ‘unit’: ‘c’, ‘name’: ‘DS18B20’, ‘value’: 22.62}]
2019-04-24 07:11:48 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 1.3}, {‘sys:cpu;temp’: 54.23}, {‘sys:ram;usage’: 502202368}, {‘sys:storage:/;usage’: 5977882624}, {‘dev:020a9177ef40’: 22.62}, {‘dev:cayenne_ads1xxx:1’: 0.14111328125}, {‘dev:cayenne_ads1xxx:2’: 0.13037109375}]
2019-04-24 07:12:03 - myDevices - INFO - Sensors info: [{‘type’: ‘temp’, ‘channel’: ‘dev:020a9177ef40’, ‘unit’: ‘c’, ‘name’: ‘DS18B20’, ‘value’: 22.62}]
2019-04-24 07:12:03 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 4.2}, {‘sys:cpu;temp’: 53.692}, {‘sys:ram;usage’: 501927936}, {‘dev:cayenne_ads1xxx:0’: 0.18994140625}, {‘dev:cayenne_ads1xxx:1’: 0.14013671875}, {‘dev:cayenne_ads1xxx:2’: 0.14013671875}, {‘dev:cayenne_ads1xxx:3’: 0.13916015625}]

I have a pressure sensor hooked up on chan 0 with 36 PSI on it right now. The channel on the dashboard is not reading it, but I can read it with a separate Python code in the terminal mode and/or write a “bring your own thing” setup. It is kind of a backdoor way of getting the info and I think it should be done properly if the system is setup that way.

are you getting the value with python code then might use the BYOT and cayenne python library to show data on dshboard while i will try to see what is the issue here,
can you share the python code you are using?
can you also share the content of cayenne_ads1xxx.plugin file.

Yes, I will send it to you later.

Kevin Williams

Commercial Food Equipment Service Instructor

Wake Tech Community College

Email correspondence to and from this address may be subject to the North Carolina Public Records law and may be disclosed to third parties by an authorized state official (NCGS. ch. 132). Student educational records are subject to FERPA.

Here is the ADS plugin file.

[ADS]
enabled=true
module=cayenne_ads1xxx
class=ADS1015
read=read

[ADS_CH0]
enabled=true
channel=0
module=cayenne_ads1xxx
class=AnalogInput
init_args={“plugin_id”:“cayenne_ads1xxx:ADS”}
read=read
read_args={“channel”:$channel, “value_type”:“float”}

[ADS_CH1]
enabled=true
inherit=ADS_CH0
channel=1

[ADS_CH2]
enabled=true
inherit=ADS_CH0
channel=2

[ADS_CH3]
enabled=true
inherit=ADS_CH0
channel=3

Here is the file that works…

# Simple demo of reading each digital input from the ADS1015 and transfering it
# to pressure
import board
import time
import busio
import adafruit_ads1x15.ads1015 as ADS
from adafruit_ads1x15.analog_in import AnalogIn
import cayenne.client
import time

i2c = busio.I2C(board.SCL, board.SDA)
ads = ADS.ADS1015(i2c)


MQTT_USERNAME = "----"
MQTT_PASSWORD = ""
MQTT_CLIENT_ID = "---"

def on_message(message):
        print("Message received: " + str(message))

def formatInput(channel):
    ch = 137.5*channel.voltage - 68.75
    if ch < 5:
        ch = 0
    ch = '{:,.2f}'.format(ch)
    return ch

def readInputs():
        ads.gain=2/3
        chan0=formatInput(AnalogIn(ads, ADS.P0))
        chan1=formatInput(AnalogIn(ads, ADS.P1))
        chan2=formatInput(AnalogIn(ads, ADS.P2))
        chan3=formatInput(AnalogIn(ads, ADS.P3))
        return chan0, chan1,chan2,chan3

client = cayenne.client.CayenneMQTTClient()
client.on_message = on_message
client.begin(MQTT_USERNAME, MQTT_PASSWORD, MQTT_CLIENT_ID)

i=0
timestamp = 0

while True:
        client.loop()
        if (time.time() > timestamp + 3):
                chan0, chan1, chan2, chan3 = readInputs()
                client.virtualWrite(0, chan0, dataType='analog_sensor', dataUnit='null')
                client.virtualWrite(1, chan1, dataType='analog_sensor', dataUnit='null')
                client.virtualWrite(2, chan2, dataType='analog_sensor', dataUnit='null')
                client.virtualWrite(3, chan3, dataType='analog_sensor', dataUnit='null')
                timestamp = time.time()
                i=i+1


##print('Reading ADS1015 values, press Ctrl-C to quit...')
### Print nice channel column headers.
##print('| {0:>6} | {1:>6} | {2:>6} | {3:>6} |'.format(*range(4)))
##print('-' * 37)
##
##
##
##print("|"+chan0+"|"+chan1+"|"+chan2+"|"+chan3+"|")
### Print the ADC values.
### print(chan0*(550/4.5))
###print('| {0:} | {1:} | {2:} | {3:} |'.format(str*(4))
### Pause for half a second.

Here is the results when I run the “pressure test” file. Channel 0 has the 37lbs of pressure on it right now.

Connecting to mqtt.mydevices.com:1883
Connected with result code 0
SUB v1/803e1a20-0deb-11e9-809d-0f8fe4c30267/things/c86f22b0-6379-11e9-b189-ab9cb6660d7e/cmd/+

PUB v1/803e1a20-0deb-11e9-809d-0f8fe4c30267/things/c86f22b0-6379-11e9-b189-ab9cb6660d7e/sys/model
Python

PUB v1/803e1a20-0deb-11e9-809d-0f8fe4c30267/things/c86f22b0-6379-11e9-b189-ab9cb6660d7e/sys/version
1.1.0

PUB v1/803e1a20-0deb-11e9-809d-0f8fe4c30267/things/c86f22b0-6379-11e9-b189-ab9cb6660d7e/data/0
analog_sensor,null=37.73

PUB v1/803e1a20-0deb-11e9-809d-0f8fe4c30267/things/c86f22b0-6379-11e9-b189-ab9cb6660d7e/data/1
analog_sensor,null=0.00

PUB v1/803e1a20-0deb-11e9-809d-0f8fe4c30267/things/c86f22b0-6379-11e9-b189-ab9cb6660d7e/data/2
analog_sensor,null=0.00

PUB v1/803e1a20-0deb-11e9-809d-0f8fe4c30267/things/c86f22b0-6379-11e9-b189-ab9cb6660d7e/data/3
analog_sensor,null=0.00

we will check what is the issue with the plugin.

in your code you sending the formatted values. have you checked what are the raw analog values you are getting?

Yeah, that’s how we started. We got the ads1015 to send the voltage out and get a signal back. Then we programmed the output of the ads to show psi instead of voltage.

1 Like