Settings editing

@borpin and @TrystanLea
I have a new EmonPi installation and would like to edit the settings.php file. What fields am I supposed to edit? This is the message I get after the set up

1 Like

If it is a new EmonPi, you need to edit the settings ini file.

The settings work off a default file (default-settings.ini) and a local file (settings.ini). Values in the local file over-ride the default settings.

This enables new settings to be introduced without breaking an individual setup. To see what settings can be changed, look in the default file and copy those that need to be changed into the local file.

how do you verify credentials configuration in the setting.php file?
image .

If you have created a settings.php file - Delete it.

As I said above use the INI file.

I’ve changed the error message to say settings.ini in latest master branch, this will hopefully help clear things up in future - once merged to stable.

1 Like

I have edited the settings file
Please take a look at this settings file and let me know what could possibly be possibly wrong settings.txt (6.0 KB)

I’m not sure how you have ended up with that file - it has certainly been changed from standard. This looks like the default file was copied complete (do not do that please) so it is unsurprising it does not work.

The settings.ini file for a standard EmonPi should be this emonpi/emonpi.settings.ini at master · openenergymonitor/emonpi · GitHub.

The default settings file should look like this. emoncms/default-settings.ini at master · emoncms/emoncms · GitHub

Make sure the default has not been edited, copy your existing file to say settings.backup and then replace with a standard file (above).

Then make changes to the settings.ini file from there.

I have done the following
i) Deleted the settings.php file which I had created.
ii) Edited the settings.ini file as reflected in the file I have attached.
iii) Restarted my emonpi afterwards
Upon typing emonpi.local (as well as emonpi ) in the search engine (Note that I am not connected on any wifi network as of now), the feedback I got is still the same.
Can’t Connect to the database, please verify credentials/configurations in settings.php . Error message: Connection Refused

What could possibly be wrong?
settings.txt (2.0 KB)

You would be better starting with the file I pointed you to, saving it as settings.ini, checking things work, then editing that.

Any of these…

server   = ""
prefix = 'emoncms'
;;host = 'localhost'
;;port = 1883
user = 'emonpi'
password = 'password'

Why do you feel the need to edit the standard EmonPi file?

Which versions of emoncms and Raspbian did you install on your EmonPi/Raspberry Pi?
If you installed the GUI version, of Raspbian, maybe try the lite version and stick to the CLI?

1 Like

Raspberry Pi Buster Full Version

Do you really mean an EmonPi?

So you reflashed the card with that image, then installed Emoncms?

Yes. But then I had to expand my boot partition using a separate software for the EmonSD to work.
As for the EmonPi installation, involving the use of EmonScripts rather than EmonSD image, I had downloaded and tried to use the Raspberry Buster full version because I wanted to have a GUI to work with. This did not work. I resorted to reinstalling EmonSD instead.

Sounds like the confuson there was the lack of realization that you don’t actually do anything
on the the emonPi itself. (WRT setup/configuration, viewing graphs, etc.) that’s done via a web browser connected to the emonPi via ethernet or WiFi.

Exactly. I am actually trying these out for the first time.