I cant add extension MCP3008 to my dashboard

Hi everyone,
i have Analog Distance Sensor connecting it with extension MCP3008 and i wanted to view the result on the cayenne but i couldn’t add the MCP3008 to my dashboard and i also cant add the analog distance sensor as well


thank you

you need to use plugins GitHub - myDevicesIoT/cayenne-plugin-mcp3xxx: An MCP3XXX extension plugin for Cayenne

i tried with this way but it didn’t work , the class was the same as mine MCP3008 so i didn’t change anything and then i restart it with the command but it didn’t work

can you share the logs tail -f /var/log/myDevices/cayenne.log

hi, here it is

2020-11-06 19:21:46 - myDevices - INFO - Sensors info:
2020-11-06 19:21:46 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:21:46 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:21:46 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:21:46 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:21:46 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:21:46 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:21:46 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:21:46 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:21:46 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 42.3}, {‘sys:cpu;temp’: 63.783}, {‘sys:ram;usage’: 1203630080}, {‘sys:storage:/;usage’: 10095222784}]
2020-11-06 19:22:01 - myDevices - INFO - Sensors info:
2020-11-06 19:22:01 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:22:01 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:22:01 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:22:01 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 8.6}, {‘sys:cpu;temp’: 63.783}, {‘sys:ram;usage’: 1188515840}, {‘sys:storage:/;usage’: 10095611904}, {‘sys:net;ip’: ‘192.168.0.106’}, {‘sys:net;speedtest’: 1.9526273088597534}] + sys:gpio
2020-11-06 19:22:16 - myDevices - INFO - Sensors info:
2020-11-06 19:22:16 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 4.6}, {‘sys:cpu;temp’: 61.348}, {‘sys:ram;usage’: 1188192256}]
2020-11-06 19:22:26 - myDevices - INFO - Checking for updates…
2020-11-06 19:22:31 - myDevices - INFO - Sensors info:
2020-11-06 19:22:31 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 6.7}, {‘sys:cpu;temp’: 60.861}, {‘sys:ram;usage’: 1198702592}, {‘sys:storage:/;usage’: 10095624192}]
2020-11-06 19:22:46 - myDevices - INFO - Sensors info:
2020-11-06 19:22:46 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 15.1}, {‘sys:ram;usage’: 1182498816}, {‘sys:storage:/;usage’: 10095616000}]
2020-11-06 19:23:01 - myDevices - INFO - Sensors info:
2020-11-06 19:23:01 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:23:01 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:23:01 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:23:01 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:23:01 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:23:01 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:23:01 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:23:01 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:23:01 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 10.1}, {‘sys:cpu;temp’: 60.861}, {‘sys:ram;usage’: 1176543232}, {‘sys:storage:/;usage’: 10095620096}, {‘sys:net;ip’: ‘192.168.0.106’}, {‘sys:net;speedtest’: 1.9526273088597534}] + sys:gpio

can you restart the agent sudo service myDevices restart and soon check the logs tail -f /var/log/myDevices/cayenne.log

still same problem

2020-11-06 19:31:10 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:31:10 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:31:10 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 6.8}, {‘sys:cpu;temp’: 61.348}, {‘sys:ram;usage’: 1239113728}, {‘sys:storage:/;usage’: 10089455616}, {‘sys:net;ip’: ‘192.168.0.106’}] + sys:gpio
2020-11-06 19:31:25 - myDevices - INFO - Sensors info:
2020-11-06 19:31:25 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:31:25 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:31:25 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:31:25 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 14.6}, {‘sys:cpu;temp’: 60.861}, {‘sys:ram;usage’: 1240035328}, {‘sys:storage:/;usage’: 10089459712}, {‘sys:net;speedtest’: 1.9869714283443463}]
2020-11-06 19:31:40 - myDevices - INFO - Sensors info:
2020-11-06 19:31:40 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 20.3}, {‘sys:ram;usage’: 1246179328}]
2020-11-06 19:31:55 - myDevices - INFO - Sensors info:
2020-11-06 19:31:55 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 5.1}, {‘sys:cpu;temp’: 61.348}, {‘sys:ram;usage’: 1246449664}, {‘sys:storage:/;usage’: 10089472000}]
2020-11-06 19:31:58 - myDevices - INFO - Connecting to mqtt.mydevices.com:8883
2020-11-06 19:31:58 - myDevices - INFO - GPIO - Native added
2020-11-06 19:31:58 - myDevices - INFO - Loading plugin: /etc/myDevices/plugins/cayenne-plugin-mcp3xxx/cayenne_mcp3xxx.plugin
2020-11-06 19:31:58 - myDevices - INFO - Sections: [‘MCP’, ‘MCP_CH0’, ‘MCP_CH1’, ‘MCP_CH2’, ‘MCP_CH3’, ‘MCP_CH4’, ‘MCP_CH5’, ‘MCP_CH6’, ‘MCP_CH7’]
2020-11-06 19:31:58 - myDevices - INFO - Creating instance of MCP3008 for MCP
2020-11-06 19:31:58 - myDevices - ERROR -
2020-11-06 19:31:58 - myDevices - INFO - Creating instance of MCPInput for MCP_CH0
2020-11-06 19:31:58 - myDevices - INFO - Loaded sections: [‘MCP_CH0’, ‘MCP_CH1’, ‘MCP_CH2’, ‘MCP_CH3’, ‘MCP_CH4’, ‘MCP_CH5’, ‘MCP_CH6’, ‘MCP_CH7’]
2020-11-06 19:31:58 - myDevices - INFO - Enabled plugins: dict_keys([‘cayenne_mcp3xxx:0’, ‘cayenne_mcp3xxx:1’, ‘cayenne_mcp3xxx:2’, ‘cayenne_mcp3xxx:3’, ‘cayenne_mcp3xxx:4’, ‘cayenne_mcp3xxx:5’, ‘cayenne_mcp3xxx:6’, ‘cayenne_mcp3xxx:7’])
2020-11-06 19:31:58 - myDevices - INFO - Send system info: [{‘sys:os:name’: ‘raspbian’}, {‘sys:os:version’: ‘10’}, {‘agent:version’: ‘2.0.4.280’}, {‘sys:pwr:reset’: 0}, {‘sys:pwr:halt’: 0}]
2020-11-06 19:31:58 - myDevices - INFO - Connected with result code 0
2020-11-06 19:31:59 - myDevices - INFO - Executing regular download test for network speed
2020-11-06 19:31:59 - myDevices - INFO - Sensors info:
2020-11-06 19:31:59 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:31:59 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:31:59 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:31:59 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:31:59 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:31:59 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:31:59 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:31:59 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:31:59 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 19.0}, {‘sys:cpu;temp’: 61.348}, {‘sys:ram;usage’: 1258127360}, {‘sys:storage:/;usage’: 10089472000}, {‘sys:net;ip’: ‘192.168.0.106’}] + sys:gpio
2020-11-06 19:32:14 - myDevices - INFO - Sensors info:
2020-11-06 19:32:14 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:32:14 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:32:14 - myDevices - ERROR - Plugin cayenne_mcp3xxx:MCP is not loaded
2020-11-06 19:32:14 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 7.9}, {‘sys:ram;usage’: 1243955200}, {‘sys:storage:/;usage’: 10089459712}, {‘sys:net;speedtest’: 1.9552062253766216}]
2020-11-06 19:32:29 - myDevices - INFO - Sensors info:
2020-11-06 19:32:29 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 5.1}, {‘sys:cpu;temp’: 60.374}, {‘sys:ram;usage’: 1247657984}]
2020-11-06 19:32:44 - myDevices - INFO - Sensors info:

can you delete or move the MCP plugin from /etc/myDevices/plugins and re-install the plugin again. It looks like the plugin is not loaded properly

i delete the MCP plugin and re install it again but the problem was still there , yes it look like plugin have a problem but i already delete and re install and got the same error .

are you familiar with the python programming language?

tbh i just start using the python one month ago so i consider my self as a beginner

well, that is far enough.

Follow this tutorial and get your MCP3008 data to read successfully with raspberry pi Python & CircuitPython | MCP3008 - 8-Channel 10-Bit ADC With SPI Interface | Adafruit Learning System

sudo git clone https://github.com/myDevicesIoT/Cayenne-MQTT-Python
cd Cayenne-MQTT-Python
python3 setup.py install

run this command to install the cayenne python library.

Next to add a new device, on the dashboard go to Add new ---> Device/widgets --->Arduino You will get MQTT credentials. Copy and Paste them in the python code in the examples folder myDevicesIoT/Cayenne-MQTT-Python/examples

For plugin can you check if SPI is enabled on that device, If not they can enable it via sudo raspi-config .
What Pi are they using? Does the file /dev/spidev0.0 exist? What are the permissions?

i tried the tutorial but still nothing changed , the SPI in the raspberry is enable but there is another SPI in the cayenne program i couldn’t enable it and i dont know if its important or no ,im using raspberry pi 4 model b, the file is not exist , which permission ? D5DA22A20CE54AE2BCB036C935DD38E2
i can enable the spi here but there is no save button or something to save it this way , whenever i refresh the page the SPI as shown become disable again .

i deleted the whole program using the command ( sudo /etc/myDevices/uninstall/uninstall.sh ) and i deleted it . there was one file called (/home/pi/cayenne-plugin-mcp3xxx) that i tried to delete to install everything from the beginning but i couldn’t delete it .

hi , the file exist (/dev/spidev0.0) , i installed libraries for MCPs but it did not work , from the other side whenever i install libraries for any other sensor it show to me in the dashboard , it seems that there is a problem with the MCP however i bought a new SD card but still i could not succeed , any other suggestion ?

are you not able to get reading from MCP using this tutorial then I guess some issue with MCP sensor.