# EnviroPlus Assistance

**URL:** <https://forums.pimoroni.com/t/enviroplus-assistance/11595>\
**Category:** Support\
**Created:** [September 10, 2019, 12:21am UTC](https://forums.pimoroni.com/t/enviroplus-assistance/11595 "2019-09-10T00:21:33Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![Azazel](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@Azazel](https://forums.pimoroni.com/u/Azazel)\
**Post date:** [October 15, 2019, 9:49am UTC](https://forums.pimoroni.com/t/enviroplus-assistance/11595/41 "2019-10-15T09:49:56Z")

</div>

Excellent! Thanks mate

---

<div class="post-metadata">

**Author:** ![vschinazi](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/vschinazi/32/6011_2.png) [@vschinazi](https://forums.pimoroni.com/u/vschinazi)\
**Post date:** [October 16, 2019, 6:06am UTC](https://forums.pimoroni.com/t/enviroplus-assistance/11595/42 "2019-10-16T06:06:06Z")

</div>

This looks awesome! I would really like to try this with my Enviro+. Can you share this project?  
Thank you!

---

<div class="post-metadata">

**Author:** ![Geotek1](https://avatars.discourse-cdn.com/v4/letter/g/a698b9/32.png) [@Geotek1](https://forums.pimoroni.com/u/Geotek1)\
**Post date:** [October 16, 2019, 11:37am UTC](https://forums.pimoroni.com/t/enviroplus-assistance/11595/43 "2019-10-16T11:37:07Z")

</div>

Greetings

The program for Enviroplus belongs to nophead,enclosed is the link to his github page [https://github.com/nophead/EnviroPlusWeb](https://github.com/nophead/EnviroPlusWeb)  
Have been having loads of fun experimenting with the Enviroplus  
Tom

---

<div class="post-metadata">

**Author:** ![drroboto](https://avatars.discourse-cdn.com/v4/letter/d/e9a140/32.png) [@drroboto](https://forums.pimoroni.com/u/drroboto)\
**Post date:** [April 1, 2020, 4:52pm UTC](https://forums.pimoroni.com/t/enviroplus-assistance/11595/44 "2020-04-01T16:52:08Z")

</div>

Hello there:  
I installed the enviroplus web and receive the following error:  
pi@raspberry1:~/EnviroPlusWeb $ sudo python3 app.py  
Traceback (most recent call last):  
File “app.py”, line 77, in   
smallfont = ImageFont.truetype(path + “/Asap/Asap-Bold.ttf”, 10)  
File “/usr/lib/python3/dist-packages/PIL/ImageFont.py”, line 280, in truetype  
return FreeTypeFont(font, size, index, encoding, layout\_engine)  
File “/usr/lib/python3/dist-packages/PIL/ImageFont.py”, line 145, in **init**  
layout\_engine=layout\_engine)  
OSError: cannot open resource

When I look at the source code, the following folder does not exist:  
enviroplus-python/examples/fonts

note: I am using the instructions from the latest issue of magpi

---

<div class="post-metadata">

**Author:** ![nophead](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/nophead/32/5827_2.png) [@nophead](https://forums.pimoroni.com/u/nophead)\
**Post date:** [April 1, 2020, 6:01pm UTC](https://forums.pimoroni.com/t/enviroplus-assistance/11595/45 "2020-04-01T18:01:36Z")

</div>

It seems Pimoroni have removed the font.

Try

```auto
from PIL import ImageFont
from fonts.ttf import RobotoMedium as UserFont

```

and change the smallfont line to:

```auto
smallfont = ImageFont.truetype(UserFont, 10)

```

That was recommended to me by another user but I haven’t tried it yet.

---

<div class="post-metadata">

**Author:** ![drroboto](https://avatars.discourse-cdn.com/v4/letter/d/e9a140/32.png) [@drroboto](https://forums.pimoroni.com/u/drroboto)\
**Post date:** [April 1, 2020, 7:01pm UTC](https://forums.pimoroni.com/t/enviroplus-assistance/11595/46 "2020-04-01T19:01:09Z")

</div>

I did find a temp solution.  
I created the fonts/Asap folders and downloaded the font from

> <https://github.com/google/fonts/blob/master/ofl/asap/Asap-Bold.ttf>

I can get my PC to show the dashboard but the LCD is just static.

---

<div class="post-metadata">

**Author:** ![nophead](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/nophead/32/5827_2.png) [@nophead](https://forums.pimoroni.com/u/nophead)\
**Post date:** [April 1, 2020, 8:02pm UTC](https://forums.pimoroni.com/t/enviroplus-assistance/11595/47 "2020-04-01T20:02:36Z")

</div>

The LCD should start displaying after 5 minutes.

---

<div class="post-metadata">

**Author:** ![gbar](https://avatars.discourse-cdn.com/v4/letter/g/e8c25b/32.png) [@gbar](https://forums.pimoroni.com/u/gbar)\
**Post date:** [April 3, 2020, 5:49pm UTC](https://forums.pimoroni.com/t/enviroplus-assistance/11595/48 "2020-04-03T17:49:26Z")

</div>

While nophead’s work looks awesome i’m less interested in the effects my lentil dahl is having on my household environment and much more interested in the outside environment and pollution in my area.

What the best way to do this? remotely run wires from an internal pi to the outside or put the whole lot outside pi and hat? either way i imagine volt drop might become an issue? sure somebody must have done it before?

---

<div class="post-metadata">

**Author:** ![nophead](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/nophead/32/5827_2.png) [@nophead](https://forums.pimoroni.com/u/nophead)\
**Post date:** [April 3, 2020, 6:49pm UTC](https://forums.pimoroni.com/t/enviroplus-assistance/11595/49 "2020-04-03T18:49:02Z")

</div>

I have one in Tenerife inside a utility cupboard / shed with a louvred door under a pergola. So it is pretty much outdoors but well protected and there is power.

In the UK I have it in my garage. It still sees car pollution for there.

To avoid problems with voltage drop you could use 12V and have a buck converter at the RPi end to make 5V.

---

<div class="post-metadata">

**Author:** ![gbar](https://avatars.discourse-cdn.com/v4/letter/g/e8c25b/32.png) [@gbar](https://forums.pimoroni.com/u/gbar)\
**Post date:** [April 3, 2020, 7:13pm UTC](https://forums.pimoroni.com/t/enviroplus-assistance/11595/50 "2020-04-03T19:13:57Z")

</div>

Cool thanks for the feedback ( loved your CD changer back in the day), so something like a ATX power supply in the garage , 12v cabling out to the pi and step down ,somehow into the go?

---

<div class="post-metadata">

**Author:** ![nophead](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/nophead/32/5827_2.png) [@nophead](https://forums.pimoroni.com/u/nophead)\
**Post date:** [April 3, 2020, 7:30pm UTC](https://forums.pimoroni.com/t/enviroplus-assistance/11595/51 "2020-04-03T19:30:24Z")

</div>

Yes I have used Drok branded buck converters to run an RPi3 from 12V in a 3D printer. You don’t need anything as hefty as an ATX because the current goes down with a buck converter. If the RPI takes 2A at 5V it will take less than an amp at 12V.

If you do use an ATX be sure to add a fuse between the 12V output and your cable.

---

<div class="post-metadata">

**Author:** ![drroboto](https://avatars.discourse-cdn.com/v4/letter/d/e9a140/32.png) [@drroboto](https://forums.pimoroni.com/u/drroboto)\
**Post date:** [April 5, 2020, 9:08pm UTC](https://forums.pimoroni.com/t/enviroplus-assistance/11595/52 "2020-04-05T21:08:14Z")

</div>

I have the basic program working and thanx for your work.  
I am more interested in plotting the results from the PMS5003, rather than temp, pressure, etc. To do this, is it the index.html file that I would modify?

---

<div class="post-metadata">

**Author:** ![nophead](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/nophead/32/5827_2.png) [@nophead](https://forums.pimoroni.com/u/nophead)\
**Post date:** [April 5, 2020, 11:32pm UTC](https://forums.pimoroni.com/t/enviroplus-assistance/11595/53 "2020-04-05T23:32:05Z")

</div>

Yes I think if you remove elements from the items array it will plot less on the graph.

---

<div class="post-metadata">

**Author:** ![DrGeoffH](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@DrGeoffH](https://forums.pimoroni.com/u/DrGeoffH)\
**Post date:** [April 10, 2020, 4:23pm UTC](https://forums.pimoroni.com/t/enviroplus-assistance/11595/54 "2020-04-10T16:23:22Z")

</div>

Helpful comment here _nophead_ but…I can’t get a Windows 10 laptop that logs into the Raspi to show the diagram of data being collected.

Putting your data in my app.py now works displaying the words that are shown in the Magpi 92 article on p. 68 on lowest LHS. These are the words:

_sudo python3 app.py is what is run and the output is:_

- Serving Flash app “app” (lazy loading)
- Environment: production  
WARNING: Do not use the development server in a production environment  
Use a production WSGI server instead
- Debug mode: off

Exactly as expected and the app stays open all the time and the tiny Enviro+ screen on the Enviro+ shows all the readings that are constantly changing. Also nothing else can be done on the Raspi as it is still in that application. So it is working.

But when I then contact to that Raspi from my Windows 10 laptop the Enviro+ diagram is not displayed as it says it should be.

I am surprised at what the Magpi 92 p.68 section 06 states. Just connecting from a laptop to the Raspi running Envirio+ automatically displays that diagram, I obviously want that to work as the diagrams that can be easily be adjusted are magnificent.

Any ideas?  
Geoff

---

<div class="post-metadata">

**Author:** ![nophead](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/nophead/32/5827_2.png) [@nophead](https://forums.pimoroni.com/u/nophead)\
**Post date:** [April 10, 2020, 4:41pm UTC](https://forums.pimoroni.com/t/enviroplus-assistance/11595/55 "2020-04-10T16:41:35Z")

</div>

I had no idea my software was featured in Magpi, I have never read it!

What do you see when you point a web browser to the ip address of the RPI?

---

<div class="post-metadata">

**Author:** ![DrGeoffH](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@DrGeoffH](https://forums.pimoroni.com/u/DrGeoffH)\
**Post date:** [April 10, 2020, 6:36pm UTC](https://forums.pimoroni.com/t/enviroplus-assistance/11595/56 "2020-04-10T18:36:32Z")

</div>

An idiot, that’s me, had thought I had to remotely log in to the RasPi from a Windows laptop!

Your comment made me realise I simply must **point a web browser to the IP address**.

I did this in Google on the Windows 10 laptop:

192.a.b.c (using my nos for a, b and c, of course)

Then it immediately opened up Enviro+  
and after 5 mins all the data is there on the diagram!!!

I really appreciate your statement and I feel a real fool despite having conducted IT since 1968.

Excellent to see your comments and your really quick replies.

Thanks nophead.

Geoff

---

<div class="post-metadata">

**Author:** ![DrGeoffH](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@DrGeoffH](https://forums.pimoroni.com/u/DrGeoffH)\
**Post date:** [May 13, 2020, 3:46pm UTC](https://forums.pimoroni.com/t/enviroplus-assistance/11595/57 "2020-05-13T15:46:42Z")

</div>

**Experiences I have used to get EnviroPlusWeb working properly at last.**

Yet again, I completely, rebuilt EnviroPlus with PM5003 from scratch on a new 32GB microSDHC from SanDisk.

I installed _Rasbian Buster_ (full) on 10 May 2020 from RasPi website.

I also immediately updated it with _sudo apt update_

I ensured that enabled were SSH and i2c.

I did all the steps (as before) that were written in MagPi 92 (Apr 2020), pp 66-69.

I then ran activities:

**EnviroPlus Activities**

_enviroplus-python_

_cd examples_

_python all-in-one.py_

Worked. Could run all applications in _enviroplus-python/examples._ **Very Good.**

**EnviroPlusWeb activities**

Then I installed EnviroPlusWeb

_cd_

_git clone [https://github.com/nophead/EnviroPlusWeb.git](https://github.com/nophead/EnviroPlusWeb.git)_

Tried to run

_cd EnviroPlusWeb_

_sudo python3 app.py_

the last line gave this error about BM280 not able to access _i2cdevice. “No module i2cdevice”_

Here is a screen capture of what that said:

Table 1  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/e/ef1929ba993e178c9164dfc243c648bb66dcc61a.png)  
Notice as well in Table 1, that after the failure, I typed in _i2cdetect –y 1_

It shows all of the i2c items: 23, 49 and 76.

I, then, looked at the files as follows:

Python 2 is using _i2cdevice_ and the **only** place where it is located on the Raspbian from a search is:

Table 2  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/pimoroni/original/2X/3/36a282f92bfba84e728968197e2b3ac17f53da32.png)  
That is, _i2cdevice_ is inside the _python2.7_ directory

_/usr/local/lib/python2.7/dist-packages/i2cdevice-0.0.6-py2.7.egg/ **i2cdevice** _

It is not inside the _python3.7 directory._

This is why in Table 1 above, using python3 leads to it not being able to find i2cdevice.

Here is the structure of the _/usr/local/lib/python3.7:_

_/usr/local/lib/python3.7/dist-packages/pimoroni\_bme280-0.0.2-py3.7.egg/bme280/ **init**.py_

**So I, fundamentally, changed to running EnviroPlusWeb using python2 instead of python3**

i.e.

_cd EnviroPlusWeb_

_sudo python2 app.py_

Initially, it flagged as often discussed before in this discussion group that was solved on April 2 2020 by nophead in EnviroPlus Assistance:

([EnviroPlus Assistance](https://forums.pimoroni.com/t/enviroplus-assistance/11595) section 44/56.)

Here is what he said:

“It seems Pimoroni have removed the font.

Try

**from** PIL **import** ImageFont

**from** fonts.ttf **import** RobotoMedium **as** UserFont

and change the smallfont line to:

smallfont = ImageFont.truetype(UserFont, 10)”

**I inserted that and now it’s working perfectly with python2 instead of python3. Hurrah!**

Even adding the standard _crontab –e_ entry works properly after reboots.

I just added this line to _crontab –e_

_@reboot sudo python2 /home/pi/EnviroPlusWeb/app.py &_

(from Magpi 92 article Section 08 pp 68-69)

Every time, I link from my laptop using _putty,_ to log into the Raspberry Pi that is running Enviro+ software, I can then issue a _sudo reboot_ to the Raspberry Pi. After reboot the Enviro+ display is always visible at any time from a laptop that simply uses Internet Explorer to issue Raspberry Pi’s IP address (e.g. _. 192.168.n.m_ )

**Summary questions**

1: Why is the _i2cdevice_ not in the correct place for running python3?

2: Why has the file _EnviroPlusWeb/app.py_ not yet been corrected to solve what that expert **nophead** found a month ago?

Could Pimoroni /Raspi staff update a solution to these issues? This would influence ongoing sales of Enviro+ kits I believe.

Overall, I totally support advice and comments from alphanumeric and nophead that have quickly advised solutions to me and others.

Geoff

---

<div class="post-metadata">

**Author:** ![nophead](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/nophead/32/5827_2.png) [@nophead](https://forums.pimoroni.com/u/nophead)\
**Post date:** [May 13, 2020, 5:22pm UTC](https://forums.pimoroni.com/t/enviroplus-assistance/11595/58 "2020-05-13T17:22:50Z")

</div>

1. Libraries for Python 3 need to be installed with pip3. So `pip3 i2cdevice` would probably fix it.

2. I haven’t got around to changing it because to test it would require me so stop my system and reinstall the latest Pimoroni library. It was probably a mistake to base my code on an examples library as Pimoroni keep changing things with no regard for backwards compatibility. As they are examples why would they?

What I really should do is make an installation procedure that is independent of the Pimoroni stuff and document it.

I doubt Pimoroni / Raspi staff are interested in my personal project. The Magpi article gives the impression it is an official solution but it is just my personal project that I announced to people in this forum.

---

<div class="post-metadata">

**Author:** ![luminoxs](https://avatars.discourse-cdn.com/v4/letter/l/b19c9b/32.png) [@luminoxs](https://forums.pimoroni.com/u/luminoxs)\
**Post date:** [January 5, 2021, 10:17pm UTC](https://forums.pimoroni.com/t/enviroplus-assistance/11595/59 "2021-01-05T22:17:08Z")

</div>

Hello,

I’ve been playing with the Enviro+ board and the examples for a while. I recently discovered EnviroPlusWeb and have been playing with it. I am unfamiliar with Python and would like to change the units from Metric to Imperial for the temperature and pressure. Would anyone be willing to help me with this? Also, would it be possible on the graph to “hover over” a vertical line and have it pop up with the values of that time?

Thanks!

---

<div class="post-metadata">

**Author:** ![prutsky](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/prutsky/32/733_2.png) [@prutsky](https://forums.pimoroni.com/u/prutsky)\
**Post date:** [July 10, 2021, 11:40am UTC](https://forums.pimoroni.com/t/enviroplus-assistance/11595/60 "2021-07-10T11:40:26Z")

</div>

Hi Tor,

If you have everything running on the Pi, I would really like to now how you did this. Do you share your project on GIT?

[Previous page](https://forums.pimoroni.com/t/enviroplus-assistance/11595.md?page=2)

[Next page](https://forums.pimoroni.com/t/enviroplus-assistance/11595.md?page=4)
