Storing device events into PostgreSQL database

[quote=“GustavoLema1988, post:41, topic:4724, full:true”]
thanks for the information @brocaar

but I do not know what happened but now I get this in portal-gateway-bridge already reboots but when I see the status of the server returns to this error and the same happens with loraserver that could be wrong

hello @bryansmith

the file that I believe you with the code
lora-app-server configuration file> lora-app-server.toml.
it is like this with the point at the end,
or so

lora-app-server configuration file> lora-app-server.toml

no point as shown in the loraserver.io document

You are correct Gustavo. I was using proper punctuation. I changed my post and made it a block quote so that no one else is mistaken. Thanks

@brocaar @bryansmith @GustavoLema1988
Hello everyone, after I configured the lora-app-server.toml file, I still can’t see the postgesql integration option. I didn’t find the reason. I reinstalled the latest components of the ubuntu operating system and the latest loraserver server. But still not successful.
1:
Application_server.integration]
Enabled=[“mqtt”, “postgresql”]
If I join postgresql, then lora-app-server fails to open web 8080 port, delete postgreql will open normally, I don’t know why?
2:
[application_server.integration.mqtt]
Server=“tcp://localhost:1883”
The second item has not changed since the originally installed configuration file has the option configuration of this port 1883 by default.
3:
[application_server.integration.postgresql]
Dsn=“postgres://loraserver_as:loraserver_as@localhost/loraserver_as_events?sslmode=disable”
My postgresql database server is also configured on another computer, for example: dsn=“postgres://usernamdb:mypassword@192.168.1.15/loraserver_as_events?sslmode=disable”

Other creations of database and table names, etc., are based on the default and default values ​​recommended by the author.
Same as the screenshot in front of me.
I don’t know why the postgrsql integration option still does not appear? Can anyone answer me? First, thank you.

The answer is here in this post:

@bryansmith
Thank you very much for your reply: 1: That is to say, even if the configuration is correct under the integration project option, you can’t see the postgresql option? 2: According to the author’s instructions, why do I join the Enabled = [“mqtt”, “postgresql”] character, the original normal website page 8080 port can not open? Thanks again.

In English please :grinning:

@bryansmith
Thank you very much for your reply: 1: That is to say, even if the configuration is correct under the integration project option, you can’t see the postgresql option? 2: According to the author’s instructions, why do I join the Enabled = [“mqtt”, “postgresql”] character, the original normal website page 8080 port can not open? Thanks again.

Hello @node-loraserver, my last response addressed part of your issue.

1: You will not see postgresql under the integrations drop down of your application. You define it in the configuration and lora-app-server will write events to the database that you define in the dsn.

  1. You need to be running version 3.1.0 or greater of lora-app-server. Make sure that you are running the latest version.

Please reread this post. Everything that you asked, has already been asked here and addressed here.

1 Like

Thank you for your reply, the version of the installed lora-app-server is the latest v3.1 version. Just don’t know why modify Enabled = [“mqtt”] to "Enabled = [“mqtt”, “postgresql”], after that, you can no longer open the WEB page of port 8080. After deleting postgresql characters, the web access is normal. Don’t know what the reason.