Sense Hat on Raspberry pi 4 not showing all sensors

Hi there!
I am using a Sense Hat on Raspberry pi 4.
I have exactly the same problem that bubba198 reported on 14 July. I tried the proposed solution but the problem persists! Sense Hat sensors are still missing as you can see in my screenshot.

Please Advise!

There is already a solution for it for bubba198 Sense Hat support on Raspberry Pi - #64 by bubba198

Thank you for the quick response !

If you mean this
"cd /etc/myDevices/plugins/cayenne-plugin-sensehat
sudo sed -i ‘s/True/False/’ /etc/myDevices/plugins/cayenne-plugin-sensehat/sensehat/startservice.py
sudo python3 setup.py install
sudo service myDevices restart
"

I have already tried ( twice …) . No Luck . Any other solution or idea to try ?

run this command and share the log:-

sudo service myDevices restart
tail -f /var/log/myDevices/cayenne.log

pi@raspberrypi : ~ $ tail -f /var/log/myDevices/cayenne.log

2020-11-06 20:35:13 - myDevices - INFO - Enabled plugins: dict_keys([‘sensehat:0’, ‘sensehat:1’, ‘sensehat:2’, ‘sensehat:3’, ‘sensehat:4’, ‘sensehat:5’])

2020-11-06 20:35:13 - 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 20:35:13 - myDevices - INFO - Connected with result code 0

2020-11-06 20:35:14 - myDevices - INFO - Executing regular download test for network speed

2020-11-06 20:35:14 - myDevices - INFO - Sensors info:

2020-11-06 20:35:14 - myDevices - ERROR - Failed to connect to Sense HAT device

2020-11-06 20:35:14 - myDevices - ERROR - Failed to connect to Sense HAT device

2020-11-06 20:35:14 - myDevices - ERROR - Failed to connect to Sense HAT device

2020-11-06 20:35:14 - myDevices - ERROR - Failed to connect to Sense HAT device

2020-11-06 20:35:14 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 2.3}, {‘sys:cpu;temp’: 56.965}, {‘sys:ram;usage’: 268525568}, {‘sys:storage:/;usage’: 3517501440}, {‘sys:net;ip’: ‘192.168.1.62’}, {‘dev:sensehat:4’: 0}, {‘dev:sensehat:5’: 0.0}] + sys:gpio

2020-11-06 20:35:29 - myDevices - INFO - Sensors info:

2020-11-06 20:35:29 - myDevices - ERROR - Failed to connect to Sense HAT device

2020-11-06 20:35:29 - myDevices - ERROR - Failed to connect to Sense HAT device

2020-11-06 20:35:29 - myDevices - ERROR - Failed to connect to Sense HAT device

2020-11-06 20:35:29 - myDevices - ERROR - Failed to connect to Sense HAT device

2020-11-06 20:35:29 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 0.0}, {‘sys:cpu;temp’: 55.504}, {‘sys:ram;usage’: 269221888}, {‘sys:net;speedtest’: 1.8205054451317866}]

check your connection with sensehat. The raspberry pi is not detecting it. You may want to manually check and see if you can read data from sensehat first.

Thank you !
I will check the hardware connection . Any suggestions for reading/testing manually ?

https://projects.raspberrypi.org/en/projects/getting-started-with-the-sense-hat

Thank you !
I will read and try . First try using python3 returns error " Cannot detect RPI Sense …etc " .
My Pi obviously does not see my Sense Hat for some reason , even though it has all its led lights brightly on .
Thank you again !

is it continuously on??

Yes

Like this all the time

that means some issue with the sensehat or connection. The light should turn ON and then turn OFF once booted.

dtoverlay=rpi-sense

was missing on /boot/config.txt

After adding and rebooting PROBLEM SOLVED !
Thank you

1 Like

I have done all of the suggested changes. The lights go off as they should, and also have access and read each one of the sensors and the LED-matrix via python examples. So there should be no connection or hardware problem. Still the

tail -f /var/log/myDevices/cayenne.log

gives

2020-11-10 19:13:48 - myDevices - INFO - Sensors info:
2020-11-10 19:13:48 - myDevices - INFO - Sense HAT service connection refused
2020-11-10 19:13:48 - myDevices - ERROR - [Errno 111] Connection refused
2020-11-10 19:13:48 - myDevices - INFO - Sense HAT service connection refused
2020-11-10 19:13:48 - myDevices - ERROR - [Errno 111] Connection refused
2020-11-10 19:13:48 - myDevices - INFO - Sense HAT service connection refused
2020-11-10 19:13:48 - myDevices - ERROR - [Errno 111] Connection refused
2020-11-10 19:13:48 - myDevices - INFO - Sense HAT service connection refused
2020-11-10 19:13:48 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 0.0}, {‘sys:ra m;usage’: 227610624}]
2020-11-10 19:13:48 - myDevices - INFO - Checking for updates…
2020-11-10 19:14:03 - myDevices - INFO - Sensors info:
2020-11-10 19:14:03 - myDevices - INFO - Sense HAT service connection refused
2020-11-10 19:14:03 - myDevices - INFO - Sense HAT service connection refused
2020-11-10 19:14:03 - myDevices - INFO - Sense HAT service connection refused
2020-11-10 19:14:03 - myDevices - INFO - Sense HAT service connection refused
2020-11-10 19:14:03 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 0.5}, {‘sys:ra m;usage’: 228126720}]

On the dashboard I have only the SensHAT Digital and SensHAT Analog actuator.

What happens here ?

Thanks

can you try

cd /etc/myDevices/plugins/cayenne-plugin-sensehat
sudo sed -i ‘s/True/False/’ /etc/myDevices/plugins/cayenne-plugin-sensehat/sensehat/startservice.py
sudo python3 setup.py install
sudo service myDevices restart

I have already done that. Here is my current startservice.py file:

“”"
This module provides script for starting the Sense HAT service. This service is needed so that it can be run
as root to use the sense_hat module, while allowing clients that are not running as root to access Sense HAT data.
“”"
from sensehat.manager import start_server

if name == “main”:
start_server(True)

of course I have done it once more… but still…

run this command and share the log:-

sudo service myDevices restart
tail -f /var/log/myDevices/cayenne.log

pi@raspberrypi:/etc/myDevices/plugins/cayenne-plugin-sensehat $ sudo service myDevices restart
pi@raspberrypi:/etc/myDevices/plugins/cayenne-plugin-sensehat $ tail -f /var/log/myDevices/cayenne.log
2020-11-10 19:50:43 - myDevices - INFO - Connected with result code 0
2020-11-10 19:50:43 - myDevices - INFO - GPIO - Native added
2020-11-10 19:50:43 - myDevices - INFO - Loading plugin: /etc/myDevices/plugins/cayenne-plugin-sense hat/sensehat.plugin
2020-11-10 19:50:43 - myDevices - INFO - Sections: [‘SenseHAT Temperature’, ‘SenseHAT Humidity’, ‘Se nseHAT Pressure’, ‘SenseHAT Accelerometer’, ‘SenseHAT Digital Actuator’, ‘SenseHAT Analog Actuator’]
2020-11-10 19:50:43 - myDevices - INFO - Creating instance of SenseHAT for SenseHAT Temperature
2020-11-10 19:50:43 - myDevices - INFO - Sense HAT service connection refused
2020-11-10 19:50:43 - myDevices - ERROR - [Errno 111] Connection refused
2020-11-10 19:50:43 - myDevices - INFO - Loaded sections: [‘SenseHAT Temperature’, ‘SenseHAT Humidit y’, ‘SenseHAT Pressure’, ‘SenseHAT Accelerometer’, ‘SenseHAT Digital Actuator’, ‘SenseHAT Analog Act uator’]
2020-11-10 19:50:43 - myDevices - INFO - Enabled plugins: dict_keys([‘sensehat:0’, ‘sensehat:1’, ‘se nsehat:2’, ‘sensehat:3’, ‘sensehat:4’, ‘sensehat:5’])
2020-11-10 19:50:44 - myDevices - INFO - Send system info: [{‘sys:os:name’: ‘raspbian’}, {‘sys:os:ve rsion’: ‘10’}, {‘agent:version’: ‘2.0.4.280’}, {‘sys:pwr:reset’: 0}, {‘sys:pwr:halt’: 0}, {‘sys:i2c’ : 0}, {‘sys:spi’: 0}, {‘sys:uart’: 0}, {‘sys:1wire’: 1}, {‘sys:devicetree’: 1}]
2020-11-10 19:50:44 - myDevices - INFO - Executing regular download test for network speed
2020-11-10 19:50:44 - myDevices - INFO - Sensors info:
2020-11-10 19:50:44 - myDevices - INFO - Sense HAT service connection refused
2020-11-10 19:50:44 - myDevices - ERROR - [Errno 111] Connection refused
2020-11-10 19:50:44 - myDevices - INFO - Sense HAT service connection refused
2020-11-10 19:50:44 - myDevices - ERROR - [Errno 111] Connection refused
2020-11-10 19:50:44 - myDevices - INFO - Sense HAT service connection refused
2020-11-10 19:50:44 - myDevices - ERROR - [Errno 111] Connection refused
2020-11-10 19:50:44 - myDevices - INFO - Sense HAT service connection refused
2020-11-10 19:50:44 - myDevices - ERROR - [Errno 111] Connection refused
2020-11-10 19:50:45 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 10.5}, {‘sys:cpu;temp’ : 48.312}, {‘sys:ram;usage’: 227229696}, {‘sys:storage:/;usage’: 3664760832}, {‘sys:net;ip’: ‘192.16 8.0.103’}, {‘dev:sensehat:4’: 0}, {‘dev:sensehat:5’: 0.0}] + sys:gpio
2020-11-10 19:50:59 - myDevices - INFO - Sensors info:
2020-11-10 19:50:59 - myDevices - INFO - Sense HAT service connection refused
2020-11-10 19:50:59 - myDevices - ERROR - [Errno 111] Connection refused
2020-11-10 19:50:59 - myDevices - INFO - Sense HAT service connection refused
2020-11-10 19:50:59 - myDevices - ERROR - [Errno 111] Connection refused
2020-11-10 19:50:59 - myDevices - INFO - Sense HAT service connection refused
2020-11-10 19:50:59 - myDevices - ERROR - [Errno 111] Connection refused
2020-11-10 19:50:59 - myDevices - INFO - Sense HAT service connection refused
2020-11-10 19:50:59 - myDevices - ERROR - [Errno 111] Connection refused
2020-11-10 19:51:00 - myDevices - INFO - Send changed data: [{‘sys:cpu;load’: 0.0}, {‘sys:cpu;temp’: 46.16}, {‘sys:ram;usage’: 228028416}, {‘sys:storage:/;usage’: 3664764928}, {‘sys:net;speedtest’: 1. 9987377970811435}]
^C

I pressed CTL-C because after some pause a next read of rows comes out…

since you are able to read the data from sense hat using python, I would suggest you to use GitHub - myDevicesIoT/Cayenne-MQTT-Python: Python Library for Cayenne MQTT API to send sense hat data to send to cayenne as it will take some time to resolve this issue.

Ok… It seems I am of the lucky ones… Hopefully you come eventually with a solution…

thanks for the fast answer…