Sense Hat support on Raspberry Pi

@shramik_salgaonkar Hi results below:

I do NOT have /usr/lib/python3/dist-packages/sense_emu

I DO have /usr/lib/python3/dist-packages/sense_hat

~B

check if you have enabled emulator in the SenseHAT Temperature section in sensehat.plugin file: init_args={"use_emulator": true}

@shramik_salgaonkar here’s my entire sensehat.plugin file which is located at /etc/myDevices/plugins/cayenne-plugin-sensehat but - NO I do not have that enabled there:

pi@raspberrypi:/etc/myDevices/plugins/cayenne-plugin-sensehat $ cat sensehat.plugin
[SenseHAT Temperature]
enabled=true
channel=0
module=sensehat
class=SenseHAT
read=get_temperature

[SenseHAT Humidity]
inherit=SenseHAT Temperature
enabled=true
channel=1
read=get_humidity

[SenseHAT Pressure]
inherit=SenseHAT Temperature
enabled=true
channel=2
read=get_pressure

[SenseHAT Accelerometer]
inherit=SenseHAT Temperature
enabled=true
channel=3
read=get_acclerometer

[SenseHAT Digital Actuator]
inherit=SenseHAT Temperature
enabled=true
channel=4
read=get_digital
write=set_digital

[SenseHAT Analog Actuator]
inherit=SenseHAT Temperature
enabled=true
channel=5
read=get_analog
write=set_analog
pi@raspberrypi:/etc/myDevices/plugins/cayenne-plugin-sensehat $

can you try 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
1 Like

@shramik_salgaonkar We have success! Thank you. Now of course the post porterm - why sed -i ‘s/True/False/’ and then re-install? Doesn’t the re-install wipe out whatever was just modified in startservice.py?

commands forces the plugin to not use the emulator when starting the background service.

1 Like

Is there a bug where humidity data from the SenseHAT is not being graphed? Whenever I try to view the graph, the only thing that gets plotted is the Live view. m, h, d, w, 1mo, 3mo, 6mo, and 1y do not plot anything. It says “No data available for this period” in every period except for Live

can you remove the humidity widget and let it re-add on next data publish (this will delete all previous data history and new widget will be added)

I’ve tried deleting and readding, same thing keeps happening.

can you private message me your email id. i will check the issue.

which sensor graph is testing facility humidity graph ? is it of sensehat only?

it’s using the same channel as SenseHAT Humidity: dev:sensehat:1

how did you add two widget on same channel?

Add NewDevice/WidgetCustom WidgetsLine Chart and then I just filled all the fields in with channel being dev:sensehat:1.

I also did the same thing for the temperature, there is the regular SenseHAT Temperature value widget but I created a secondary graph widget using the same channel (dev:sensehat:0) and that seems to be working.

you cannot use two widgets on one channel.

That’s weird that the temperature is working just fine.

I’ve tried deleting both widgets that used dev:channel:1 and then renabling the SenseHAT humidity sensor but it still didn’t work after that

You dont have to add them manually, the dashboard will auto add green widget on data publish and you can add them by clicking on + on the widget

Yeah I just realized the temperature is not working either. When clicking on the graph of SenseHAT temperature I’m getting the same “No data available for this period message”

you are not doing it correctly. you dont need to add the widget manually. Green widgets will pop up when the device published data. Remove them and wait for device to publish.

After deleting the widgets, they are not disappearing from the left hand dropdown