jblance / mpp-solar

Python package to communicate to MPP Solar PIP-4048MS inverters (and similar)
MIT License
355 stars 149 forks source link

everything installed but does not start! #13

Closed cheomfp closed 4 years ago

cheomfp commented 4 years ago

Hello! I have tried to make everything work but I am not successful. everything is installed, but I have not seen anything in GRAFANA. I think I am missing some configuration. the investor responds to the compando, here is an attached photo: inv

jblance commented 4 years ago

So mpp-solar is working

If you are trying to graph data in grafana, you will have to check each step is working

I've added a picture of the steps involved to the readme (note that these components are not part of mpp-solar)

cheomfp commented 4 years ago

Yes, I have everything tested and installed, the only thing is that I cannot see anything in Grafana. Could you come in and take a look at teamviwer? plss ID 1402080010 pass: 2616

jblance commented 4 years ago

I dont wont to start that level of support - also its not wise to publish those details Please post the test results for the above

cheomfp commented 4 years ago

I apologize that I am a beginner in this, and have been learning a little from you to find an alternative to the software that the inverter brings (watchpower).

jblance commented 4 years ago

Thats ok - one reason for you to do this is too learn...

cheomfp commented 4 years ago

Can you give me instructions to obtain the information you are requesting?

test1

cheomfp commented 4 years ago

Influx test2

jblance commented 4 years ago

so first off, it doesnt look like you are sending any info on a regular basis you need to setup cron or the mpp-solar service i.e. you need to be talking to the inverter and sending info to MQTT on a periodic basis are you using cron or the service?

jblance commented 4 years ago

influx is empty - by default telegraf will put computer stats in there. have you configured telegraf? what does sudo systemctl status telegraf give

cheomfp commented 4 years ago

TELEGRAF test3

jblance commented 4 years ago

you truncated the last few lines (including an error) what do they say

cheomfp commented 4 years ago

test4

jblance commented 4 years ago

have you created the database telegraf in influx?

cheomfp commented 4 years ago

I think I haven't created it yet. Could you tell me how to do it?

jblance commented 4 years ago

influx

create database telegraf
use telegraf

create user grafana with password '<passwordhere>' with all privileges
grant all privileges on telegraf to grafana
cheomfp commented 4 years ago

influx


use telegraf

create user grafana with password '<passwordhere>' with all privileges
grant all privileges on telegraf to grafana

yes, I have done this before

cheomfp commented 4 years ago

I think I have done everything that is in your publication, what I would lack is how to make the grafana read from my inverter

cheomfp commented 4 years ago

What I want to show in grafana would be: the load of L1, L2 production of solar panels PV1, PV2 Maybe over time, as you learn a little about this, keep adding a few more things: D

jblance commented 4 years ago

you might have done it, but telegraf is failing to write to influx and you are not regularly sending information to MQTT So there is no way that grafana will be able to display anything from influx

cheomfp commented 4 years ago

Sorry if I don't understand very well, since my English is not very good. my language is spanish :P

jblance commented 4 years ago

can you post your /etc/telegraf/telegraf.d/influx-output.conf

cheomfp commented 4 years ago

puedes publicar tu /etc/telegraf/telegraf.d/influx-output.conf

edited to remove password

[[outputs.influxdb]]
  urls = ["http://127.0.0.1:8086"]
  database = "home"
  skip_database_creation = true
  username = "grafana"
  password = <supplied>
jblance commented 4 years ago

Thats weird, coz the error in the telegraf service mentions database telegraf

jblance commented 4 years ago

did you edit the /etc/telegraf/telegraf.conf file? can you post the output of egrep -v "#|^$" /etc/telegraf/telegraf.conf

cheomfp commented 4 years ago

not yet! test6

jblance commented 4 years ago

ok - you shouldn't need to can you post the output of the above (as it displays the file without all the comments and blank lines) also try restarting telegraf sudo systemctl restart telegraf

cheomfp commented 4 years ago

did you edit the /etc/telegraf/telegraf.conf file? can you post the output of egrep -v "#|^$" /etc/telegraf/telegraf.conf

test7

jblance commented 4 years ago

ok, you do need to edit it, find the line with [[outputs.influxdb]] and put a # at the start (i.e. comment out that line) then restart telegraf as above then post the output of sudo systemctl status telegraf

cheomfp commented 4 years ago

ok, you do need to edit it, find the line with [[outputs.influxdb]] and put a # at the start (i.e. comment out that line) then restart telegraf as above then post the output of sudo systemctl status telegraf

test8 It seems to me that now it gave no error

jblance commented 4 years ago

looking much better - telegraf seems to be working now on a command line influx use home show measurements and post that output

cheomfp commented 4 years ago

looking much better - telegraf seems to be working now on a command line influx use home show measurements and post that output

test9

jblance commented 4 years ago

ok so now you just need to be running the command regularly - did you follow the Schedule regular queries step? https://github.com/jblance/mpp-solar/blob/master/docs/MQTT_Influx_Grafana.md#schedule-regular-queries-and-mqtt-message-posts What command are you wanting the output of?

cheomfp commented 4 years ago

1- total production of solar panels. 2- Current load of lines L1, L2. 3- Voltage of the Batteries.

jblance commented 4 years ago

you need to pick the commands you want to run, looks like the LV5048 version of QPIGS so you need to use cron to schedule /usr/local/bin/mpp-info-pub -q localhost -M LV5048 -c QPIGS -i > /home/pi/cron.out 2>&1 or setup the mpp-solar service

cheomfp commented 4 years ago

mpp-solar service configuration test10

jblance commented 4 years ago

you need to edit /etc/mpp-solar/mpp-solar.conf

jblance commented 4 years ago

actually you'll be better using cron as you need sudo for access to /dev/hidraw

cheomfp commented 4 years ago

I'm really lost, I don't know what I have to do. it will take me a little more time to learn how to do all this I am very new to this and I find it difficult to understand some things

jblance commented 4 years ago

the readme has a section on cron:

Schedule Regular Queries (and MQTT message posts) Use cron or similar to schedule the command to run on a regular basis e.g. for cron crontab -e to edit and add a line like

* * * * * /usr/local/bin/mpp-info-pub -q localhost -q localhost -M LV5048 -c QPIGS -i > /home/pi/cron.out 2>&1

start with that

cheomfp commented 4 years ago

Something like this? test11 Won't I have to add -d /dev/hydraw0?

jblance commented 4 years ago

Yes you'll need -d /dev/hidraw0 as well. You'll need to add sudo after the * and before the / though

Then check the mosquito sub window

cheomfp commented 4 years ago

I am very grateful for your patience and help. If there is a way to make any kind of donation to contribute to the project, please let me know, I am willing to contribute. I will continue reading a little more to see if I have any progress.😉

DMIINC commented 4 years ago

Order in which install should be done in my opinion. jblance posted the picture which hints as to what needs to be done and in which order. But in any case:

  1. Install MPP Solar Inverter Python Package and test with sample commands.
  2. Setup Mosquito MQTT broker and test
  3. Install Influxdb. Setup database.
  4. Install Telegraf and setup.
  5. Install python-systemd and add mpp-solar as service.
  6. Start influxdb and make sure that you are collecting data.

Follow instructions to the last letter. DO NOT USE CRONTAB.

Only after all of the above is working correctly should you install Grafana and start visualizing you database.

cheomfp commented 4 years ago

Order in which install should be done in my opinion. jblance posted the picture which hints as to what needs to be done and in which order. But in any case:

  1. Install MPP Solar Inverter Python Package and test with sample commands.
  2. Setup Mosquito MQTT broker and test
  3. Install Influxdb. Setup database.
  4. Install Telegraf and setup.
  5. Install python-systemd and add mpp-solar as service.
  6. Start influxdb and make sure that you are collecting data.

Follow instructions to the last letter. DO NOT USE CRONTAB.

Only after all of the above is working correctly should you install Grafana and start visualizing you database.

Hello! Thanks for the suggestion, I did it the same way! Here I attach a screenshot where you see the command running every minute. test12

DMIINC commented 4 years ago

Awesome. Did you start using grafana?

cheomfp commented 4 years ago

Awesome. Did you start using grafana?

I am using it but there are no graphics to display. test13

DMIINC commented 4 years ago

It looks like you need to figure out how to use Grafana. Maybe even try Chronograph.

jblance commented 4 years ago

what is in influx?

cheomfp commented 4 years ago

I think I am progressing very well, thanks to the help of all of you! test14

jblance commented 4 years ago

great!