gustonator / goodwe-prometheus-exporter

Exporter for prometheus to export metrics from GoodWe Inverters
2 stars 3 forks source link

exporter.py not found #1

Closed mevlad24 closed 1 year ago

mevlad24 commented 1 year ago

mevlad@raspberrypi:~ $ python exporter.py --port 8787 --interval 30 --inverter 110.0.0.36 /usr/local/bin/python3.8: can't open file 'exporter.py': [Errno 2] No such file or directory

Hello, Overall installation on Python 3.8 was successful but the script file can not be found. Would you please advise what can be wrong here? Thank you

gustonator commented 1 year ago

Hi @mevlad24 Looks like you're trying to run it manually. Are you sure you are in the same folder as the exporter.py script? Try to run it with: python src/exporter.py --port 8787 --interval 30 --inverter 110.0.0.36

I will add later some more scenarios to the documentation

mevlad24 commented 1 year ago

Hello,

Thank you for responding my last comment and very sorry for bothering again.

Unfortunately the situation has not changed much and those three py scripts  (inverter_scan.py,get-inverter-data.py, exporter.py ) still can't be found e ven from global search (/).

I'm installing the package onto Raspberry Pi 4 and I'm not sure if any specifics may apply here..or am I doing anything wrong. 

Kind regards

mevlad

@.***:~ $ python -m pip install asyncio prometheus_client

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple

Requirement already satisfied: asyncio in ./.local/lib/python3.8/site- packages (3.4.3)

Requirement already satisfied: prometheus_client in ./.local/lib/python3.8/ site-packages (0.17.0)

WARNING: You are using pip version 19.2.3, however version 23.1.2 is available.

You should consider upgrading via the 'pip install --upgrade pip' command.

@.***:~ $ pip install goodwe==0.2.23

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple

Collecting goodwe==0.2.23

  Using cached https://www.piwheels.org/simple/goodwe/goodwe-0.2.23-py3-none -any.whl (33 kB)

Installing collected packages: goodwe

Successfully installed goodwe-0.2.23

@.***:~ $ python scripts/inverter_scan.py

/usr/local/bin/python3.8: can't open file 'scripts/inverter_scan.py': [Errno 2] No such file or directory

@.***:~ $ python scripts/get-inverter-data.py

/usr/local/bin/python3.8: can't open file 'scripts/get-inverter-data.py': [Errno 2] No such file or directory

@.***:~ $ python src/exporter.py --port 8787 --interval 30 -- inverter 10.0.0.36

/usr/local/bin/python3.8: can't open file 'src/exporter.py': [Errno 2] No such file or directory

@.***:~ $ ls /home/mevlad/.local/lib/python3.8/site-packages/ goodwe

const.py  es.py  exceptions.py  init.py  modbus.py     protocol.py  sensor.py

dt.py     et.py  goodwe.py      inverter.py  processor.py  pycache  xs. py

---------- Původní e-mail ---------- Od: Rudolf Brosztl @.> Komu: gustonator/goodwe-prometheus-exporter <goodwe-prometheus-exporter@ noreply.github.com> Kopie: mevlad24 @.>, Mention @.***> Datum: 10. 6. 2023 11:38:49 Předmět: Re: [gustonator/goodwe-prometheus-exporter] exporter.py not found (Issue #1) "

Hi @mevlad24(https://github.com/mevlad24) Looks like you're trying to run it manually. Are you sure you are in the same folder as the exporter.py script? Try to run it with: python src/exporter.py --port 8787 --interval 30 --inverter 110.0.0.36

I will add later some more scenarios to the documentation

— Reply to this email directly, view it on GitHub (https://github.com/gustonator/goodwe-prometheus-exporter/issues/1#issuecomment-1585585517) , or unsubscribe (https://github.com/notifications/unsubscribe-auth/BAOOBOYXYOZKW6NAZB6VT3DXKQ6CLANCNFSM6AAAAAAZA4K3D4) . You are receiving this because you were mentioned. Message ID: <gustonator/ @.***> "

gustonator commented 1 year ago

Hi @mevlad24 Are you sure you are in the root folder of the cloned git repository? (goodwe-prometheus-exporter) - not you system root (/)

If you execute ls -la command, you should see files: Dockerfile, README.md, docker-compose.yml and the 2 folders scripts and src If not, you are obviously running it from a different folder. In that case, use absolute path: ie.:

python /home/mevlad/goodwe-prometheus-exporter/scripts/inverter_scan.py

or:

$(which python) /home/mevlad/goodwe-prometheus-exporter/scripts/inverter_scan.py

(adjust the path, where you cloned the repository)

regards Rudolf

mevlad24 commented 1 year ago

Hi Rudolf, thank you once again for your kind support.

I'm afraid there might be something wrong with Python. I have  3.9 installed by default and the co-existence with 3.8 does not seem to be very smooth.  I have noticed these errors while running "sudo apt-get install python3.8 python3.8-dev python3.8-distutils python3.8-venv"

Note, selecting 'libpython3.8-dev' for regex 'python3.8-dev'

Package python3.8 is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

E: Package 'python3.8' has no installation candidate

E: Unable to locate package python3.8-distutils

E: Couldn't find any package by glob 'python3.8-distutils'

E: Couldn't find any package by regex 'python3.8-distutils'

E: Unable to locate package python3.8-venv

E: Couldn't find any package by glob 'python3.8-venv'

E: Couldn't find any package by regex 'python3.8-venv'

So I need to fix this one first before proceeding further

 

Thanks again so far

Regards

Vladimir ---------- Původní e-mail ---------- Od: Rudolf Brosztl @.> Komu: gustonator/goodwe-prometheus-exporter <goodwe-prometheus-exporter@ noreply.github.com> Kopie: mevlad24 @.>, Mention @.***> Datum: 12. 6. 2023 10:53:11 Předmět: Re: [gustonator/goodwe-prometheus-exporter] exporter.py not found (Issue #1) "

Hi @mevlad24(https://github.com/mevlad24) Are you sure you are in the root folder of the cloned git repository? (goodwe-prometheus-exporter) - not you system root (/)

If you execute ls -la command, you should see files: Dockerfile, README.md, docker-compose.yml and the 2 folders scripts and src If not, you are obviously running it from a different folder. In that case, use absolute path: ie.:

python /home/mevlad/goodwe-prometheus-exporter/scripts/inverter_scan.py

or:

$(which python) /home/mevlad/goodwe-prometheus-exporter/scripts/inverter_scan.py

(adjust the path, where you cloned the repository)

regards Rudolf

—. Reply to this email directly, view it on GitHub (https://github.com/gustonator/goodwe-prometheus-exporter/issues/1#issuecomment-1586880350) , or unsubscribe (https://github.com/notifications/unsubscribe-auth/BAOOBO7BA473YWWY6SNBX23XK3KHFANCNFSM6AAAAAAZA4K3D4) . You are receiving this because you were mentioned. Message ID: <gustonator/ @.***> "

gustonator commented 1 year ago

BTW: I have also just tried to install multiple version of python (ubuntu 22.04) and without problem. of cource, you have to install multimple libraries and pip version.

sudo apt-get install python3.9 python3.9-dev python3.9-distutils python3.9-venv
python3.9 -m pip install prometheus_client aiohttp goodwe

the same worked for python 3.10:

sudo apt-get install python3.10 python3.10-dev python3.10-distutils python3.10-venv
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
python3.10 -m pip install prometheus_client aiohttp goodwe

and then you can check different versions:

python3.8 --version
python3.9 --version
python3.10 --version

I've tested the script with all 3 version, and it's working. So there is no need to install older python version. Sorry for the confusion. I will update the documentation

mevlad24 commented 1 year ago

Hello again,

thanks for further hints.

Have tried on Python 3.10 as you recommended below. The installation seemed to have passed, but  the sought scripts are still not created (see attached) . Giving up... will check with Linux skilled colleagues what do I do wrong.

BR

Vladimir

 

---------- Původní e-mail ---------- Od: Rudolf Brosztl @.> Komu: gustonator/goodwe-prometheus-exporter <goodwe-prometheus-exporter@ noreply.github.com> Kopie: mevlad24 @.>, Mention @.***> Datum: 12. 6. 2023 12:59:45 Předmět: Re: [gustonator/goodwe-prometheus-exporter] exporter.py not found (Issue #1) "

BTW: I have also just tried to install multiple version of python (ubuntu 22.04) and without problem. of cource, you have to install multimple libraries and pip version.

sudo apt-get install python3.9 python3.9-dev python3.9-distutils python3.9-venv python3.9 -m pip install prometheus_client aiohttp goodwe

the same worked for python 3.10:

sudo apt-get install python3.10 python3.10-dev python3.10-distutils python3.10-venv curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 python3.10 -m pip install prometheus_client aiohttp goodwe

and then you can check different versions:

python3.8 --version python3.9 --version python3.10 --version

I've tested the script with all 3 version, and it's working

— Reply to this email directly, view it on GitHub (https://github.com/gustonator/goodwe-prometheus-exporter/issues/1#issuecomment-1587092474) , or unsubscribe (https://github.com/notifications/unsubscribe-auth/BAOOBO4YNFFMCH5ABBKWZK3XK3ZBXANCNFSM6AAAAAAZA4K3D4) . You are receiving this because you were mentioned. Message ID: <gustonator/ @.***> "

@.***:~$ ls -la total 2592 drwxr-x--- 14 mevlad mevlad 4096 čen 12 20:58 . drwxr-xr-x 3 root root 4096 čen 12 17:27 .. -rw------- 1 mevlad mevlad 1803 čen 12 20:50 .bash_history -rw-r--r-- 1 mevlad mevlad 220 čen 12 17:12 .bash_logout -rw-r--r-- 1 mevlad mevlad 3771 čen 12 17:12 .bashrc drwx------ 10 mevlad mevlad 4096 čen 12 17:36 .cache drwx------ 10 mevlad mevlad 4096 čen 12 17:36 .config drwxr-xr-x 2 mevlad mevlad 4096 čen 12 17:35 Desktop drwxr-xr-x 2 mevlad mevlad 4096 čen 12 17:35 Documents drwxr-xr-x 2 mevlad mevlad 4096 čen 12 20:58 Downloads -rw-rw-r-- 1 mevlad mevlad 2578580 čen 12 17:50 get-pip.py drwx------ 3 mevlad mevlad 4096 čen 12 17:35 .local drwxr-xr-x 2 mevlad mevlad 4096 čen 12 17:35 Music drwxr-xr-x 2 mevlad mevlad 4096 čen 12 17:35 Pictures -rw-r--r-- 1 mevlad mevlad 807 čen 12 17:12 .profile drwxr-xr-x 2 mevlad mevlad 4096 čen 12 17:35 Public drwx------ 5 mevlad mevlad 4096 čen 12 20:47 snap -rw-r--r-- 1 mevlad mevlad 0 čen 12 17:41 .sudo_as_admin_successful drwxr-xr-x 2 mevlad mevlad 4096 čen 12 17:35 Templates drwxr-xr-x 2 mevlad mevlad 4096 čen 12 17:35 Videos

@.:~$ python3.10 get-pip.py Defaulting to user installation because normal site-packages is not writeable Collecting pip Downloading pip-23.1.2-py3-none-any.whl (2.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 6.0 MB/s eta 0:00:00 Collecting setuptools Downloading setuptools-67.8.0-py3-none-any.whl (1.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 6.6 MB/s eta 0:00:00 Collecting wheel Downloading wheel-0.40.0-py3-none-any.whl (64 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.5/64.5 kB 3.1 MB/s eta 0:00:00 Installing collected packages: wheel, setuptools, pip WARNING: The script wheel is installed in '/home/mevlad/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The scripts pip, pip3 and pip3.10 are installed in '/home/mevlad/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed pip-23.1.2 setuptools-67.8.0 wheel-0.40.0 @.:~$ python3.10 -m pip install prometheus_client aiohttp goodwe Defaulting to user installation because normal site-packages is not writeable Collecting prometheus_client Downloading prometheus_client-0.17.0-py3-none-any.whl (60 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.6/60.6 kB 760.6 kB/s eta 0:00:00 Collecting aiohttp Downloading aiohttp-3.8.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.0 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 5.3 MB/s eta 0:00:00 Collecting goodwe Downloading goodwe-0.2.31-py3-none-any.whl (35 kB) Collecting attrs>=17.3.0 (from aiohttp) Downloading attrs-23.1.0-py3-none-any.whl (61 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.2/61.2 kB 1.7 MB/s eta 0:00:00 Collecting charset-normalizer<4.0,>=2.0 (from aiohttp) Downloading charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (195 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 195.9/195.9 kB 4.1 MB/s eta 0:00:00 Collecting multidict<7.0,>=4.5 (from aiohttp) Downloading multidict-6.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (116 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 116.6/116.6 kB 1.9 MB/s eta 0:00:00 Collecting async-timeout<5.0,>=4.0.0a3 (from aiohttp) Downloading async_timeout-4.0.2-py3-none-any.whl (5.8 kB) Collecting yarl<2.0,>=1.0 (from aiohttp) Downloading yarl-1.9.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (262 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 262.1/262.1 kB 4.0 MB/s eta 0:00:00 Collecting frozenlist>=1.1.1 (from aiohttp) Downloading frozenlist-1.3.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (148 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 148.1/148.1 kB 3.0 MB/s eta 0:00:00 Collecting aiosignal>=1.1.2 (from aiohttp) Downloading aiosignal-1.3.1-py3-none-any.whl (7.6 kB) Requirement already satisfied: idna>=2.0 in /usr/lib/python3/dist-packages (from yarl<2.0,>=1.0->aiohttp) (3.3) Installing collected packages: goodwe, prometheus_client, multidict, frozenlist, charset-normalizer, attrs, async-timeout, yarl, aiosignal, aiohttp WARNING: The script normalizer is installed in '/home/mevlad/.local/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed aiohttp-3.8.4 aiosignal-1.3.1 async-timeout-4.0.2 attrs-23.1.0 charset-normalizer-3.1.0 frozenlist-1.3.3 goodwe-0.2.31 multidict-6.0.4 prometheus_client-0.17.0 yarl-1.9.2 @.:~$ ls -la total 2592 drwxr-x--- 14 mevlad mevlad 4096 čen 12 20:58 . drwxr-xr-x 3 root root 4096 čen 12 17:27 .. -rw------- 1 mevlad mevlad 1803 čen 12 20:50 .bash_history -rw-r--r-- 1 mevlad mevlad 220 čen 12 17:12 .bash_logout -rw-r--r-- 1 mevlad mevlad 3771 čen 12 17:12 .bashrc drwx------ 11 mevlad mevlad 4096 čen 12 20:59 .cache drwx------ 10 mevlad mevlad 4096 čen 12 17:36 .config drwxr-xr-x 2 mevlad mevlad 4096 čen 12 17:35 Desktop drwxr-xr-x 2 mevlad mevlad 4096 čen 12 17:35 Documents drwxr-xr-x 2 mevlad mevlad 4096 čen 12 20:58 Downloads -rw-rw-r-- 1 mevlad mevlad 2578580 čen 12 17:50 get-pip.py drwx------ 5 mevlad mevlad 4096 čen 12 20:59 .local drwxr-xr-x 2 mevlad mevlad 4096 čen 12 17:35 Music drwxr-xr-x 2 mevlad mevlad 4096 čen 12 17:35 Pictures -rw-r--r-- 1 mevlad mevlad 807 čen 12 17:12 .profile drwxr-xr-x 2 mevlad mevlad 4096 čen 12 17:35 Public drwx------ 5 mevlad mevlad 4096 čen 12 20:47 snap -rw-r--r-- 1 mevlad mevlad 0 čen 12 17:41 .sudo_as_admin_successful drwxr-xr-x 2 mevlad mevlad 4096 čen 12 17:35 Templates drwxr-xr-x 2 mevlad mevlad 4096 čen 12 17:35 Videos @.:~$ python3.10 -m pip install asyncio prometheus_client Defaulting to user installation because normal site-packages is not writeable Collecting asyncio Downloading asyncio-3.4.3-py3-none-any.whl (101 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 101.8/101.8 kB 578.8 kB/s eta 0:00:00 Requirement already satisfied: prometheus_client in ./.local/lib/python3.10/site-packages (0.17.0) Installing collected packages: asyncio Successfully installed asyncio-3.4.3 @.:~$ pip install goodwe==0.2.23 Command 'pip' not found, but can be installed with: sudo apt install python3-pip @.:~$ sudo apt install python3-pip [sudo] password for mevlad: Reading package lists... Done Building dependency tree... Done Reading state information... Done The following packages were automatically installed and are no longer required: dctrl-tools dmeventd dmraid dpkg-repack efibootmgr gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 grub-common grub-efi-arm64 grub-efi-arm64-bin grub-efi-arm64-signed grub2-common kpartx kpartx-boot libdebian-installer4 libdevmapper-event1.02.1 libdmraid1.0.0.rc16 liblvm2cmd2.03 libreoffice-ogltrans libtimezonemap-data libtimezonemap1 lvm2 os-prober python3-icu python3-pam rdate thin-provisioning-tools Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: build-essential cpp-11 dpkg-dev fakeroot g++ g++-11 gcc gcc-11 gcc-11-base javascript-common libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan6 libcc1-0 libdpkg-perl libfakeroot libgcc-11-dev libhwasan0 libitm1 libjs-jquery libjs-sphinxdoc libjs-underscore liblsan0 libpython3-dev libstdc++-11-dev libtsan0 libubsan1 lto-disabled-list make python3-dev python3-setuptools python3-wheel Suggested packages: gcc-11-locales debian-keyring gcc-11-doc gcc-multilib autoconf automake libtool flex bison gcc-doc apache2 | lighttpd | httpd git bzr libstdc++-11-doc make-doc python-setuptools-doc The following NEW packages will be installed: build-essential dpkg-dev fakeroot g++ g++-11 gcc gcc-11 javascript-common libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan6 libcc1-0 libfakeroot libgcc-11-dev libhwasan0 libitm1 libjs-jquery libjs-sphinxdoc libjs-underscore liblsan0 libpython3-dev libstdc++-11-dev libtsan0 libubsan1 lto-disabled-list make python3-dev python3-pip python3-setuptools python3-wheel The following packages will be upgraded: cpp-11 gcc-11-base libdpkg-perl 3 upgraded, 31 newly installed, 0 to remove and 187 not upgraded. Need to get 45,3 MB/55,0 MB of archives. After this operation, 147 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 libcc1-0 arm64 12.1.0-2ubuntu1~22.04 [45,0 kB] Get:2 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 libitm1 arm64 12.1.0-2ubuntu1~22.04 [28,4 kB] Get:3 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 libasan6 arm64 11.3.0-1ubuntu1~22.04.1 [2 227 kB] Get:4 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 liblsan0 arm64 12.1.0-2ubuntu1~22.04 [1 034 kB] Get:5 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 libtsan0 arm64 11.3.0-1ubuntu1~22.04.1 [2 235 kB] Get:6 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 libubsan1 arm64 12.1.0-2ubuntu1~22.04 [965 kB] Get:7 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 libhwasan0 arm64 12.1.0-2ubuntu1~22.04 [1 119 kB] Get:8 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 libgcc-11-dev arm64 11.3.0-1ubuntu1~22.04.1 [1 147 kB] Get:9 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 gcc-11 arm64 11.3.0-1ubuntu1~22.04.1 [19,4 MB] Get:10 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 gcc arm64 4:11.2.0-1ubuntu1 [5 128 B] Get:11 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 libstdc++-11-dev arm64 11.3.0-1ubuntu1~22.04.1 [2 075 kB] Get:12 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 g++-11 arm64 11.3.0-1ubuntu1~22.04.1 [11,1 MB] Get:13 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 g++ arm64 4:11.2.0-1ubuntu1 [1 394 B] Get:14 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 make arm64 4.3-4.1build1 [177 kB] Get:15 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 libdpkg-perl all 1.21.1ubuntu2.2 [237 kB] Get:16 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 lto-disabled-list all 24 [12,5 kB] Get:17 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 dpkg-dev all 1.21.1ubuntu2.2 [922 kB] Get:18 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 build-essential arm64 12.9ubuntu3 [4 740 B] Get:19 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libfakeroot arm64 1.28-1ubuntu1 [31,5 kB] Get:20 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 fakeroot arm64 1.28-1ubuntu1 [60,5 kB] Get:21 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 javascript-common all 11+nmu1 [5 936 B] Get:22 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libalgorithm-diff-perl all 1.201-1 [41,8 kB] Get:23 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libalgorithm-diff-xs-perl arm64 0.04-6build3 [11,7 kB] Get:24 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libalgorithm-merge-perl all 0.08-3 [12,0 kB] Get:25 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libjs-jquery all 3.6.0+dfsg+~3.5.13-1 [321 kB] Get:26 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libjs-underscore all 1.13.2~dfsg-2 [118 kB] Get:27 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libjs-sphinxdoc all 4.3.2-1 [139 kB] Get:28 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 libpython3-dev arm64 3.10.6-1~22.04 [7 168 B] Get:29 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 python3-dev arm64 3.10.6-1~22.04 [26,0 kB] Get:30 http://ports.ubuntu.com/ubuntu-ports jammy-updates/main arm64 python3-setuptools all 59.6.0-1.2ubuntu0.22.04.1 [339 kB] Get:31 http://ports.ubuntu.com/ubuntu-ports jammy-updates/universe arm64 python3-wheel all 0.37.1-2ubuntu0.22.04.1 [32,0 kB] Get:32 http://ports.ubuntu.com/ubuntu-ports jammy-updates/universe arm64 python3-pip all 22.0.2+dfsg-1ubuntu0.3 [1 305 kB] Fetched 45,3 MB in 5s (8 740 kB/s)
Extracting templates from packages: 100% (Reading database ... 183963 files and directories currently installed.) Preparing to unpack .../00-cpp-11_11.3.0-1ubuntu1~22.04.1_arm64.deb ... Unpacking cpp-11 (11.3.0-1ubuntu1~22.04.1) over (11.3.0-1ubuntu1~22.04) ... Preparing to unpack .../01-gcc-11-base_11.3.0-1ubuntu1~22.04.1_arm64.deb ... Unpacking gcc-11-base:arm64 (11.3.0-1ubuntu1~22.04.1) over (11.3.0-1ubuntu1~22.0 4) ... Selecting previously unselected package libcc1-0:arm64. Preparing to unpack .../02-libcc1-0_12.1.0-2ubuntu1~22.04_arm64.deb ... Unpacking libcc1-0:arm64 (12.1.0-2ubuntu1~22.04) ... Selecting previously unselected package libitm1:arm64. Preparing to unpack .../03-libitm1_12.1.0-2ubuntu1~22.04_arm64.deb ... Unpacking libitm1:arm64 (12.1.0-2ubuntu1~22.04) ... Selecting previously unselected package libasan6:arm64. Preparing to unpack .../04-libasan6_11.3.0-1ubuntu1~22.04.1_arm64.deb ... Unpacking libasan6:arm64 (11.3.0-1ubuntu1~22.04.1) ... Selecting previously unselected package liblsan0:arm64. Preparing to unpack .../05-liblsan0_12.1.0-2ubuntu1~22.04_arm64.deb ... Unpacking liblsan0:arm64 (12.1.0-2ubuntu1~22.04) ... Selecting previously unselected package libtsan0:arm64. Preparing to unpack .../06-libtsan0_11.3.0-1ubuntu1~22.04.1_arm64.deb ... Unpacking libtsan0:arm64 (11.3.0-1ubuntu1~22.04.1) ... Selecting previously unselected package libubsan1:arm64. Preparing to unpack .../07-libubsan1_12.1.0-2ubuntu1~22.04_arm64.deb ... Unpacking libubsan1:arm64 (12.1.0-2ubuntu1~22.04) ... Selecting previously unselected package libhwasan0:arm64. Preparing to unpack .../08-libhwasan0_12.1.0-2ubuntu1~22.04_arm64.deb ... Unpacking libhwasan0:arm64 (12.1.0-2ubuntu1~22.04) ... Selecting previously unselected package libgcc-11-dev:arm64. Preparing to unpack .../09-libgcc-11-dev_11.3.0-1ubuntu1~22.04.1_arm64.deb ... Unpacking libgcc-11-dev:arm64 (11.3.0-1ubuntu1~22.04.1) ... Selecting previously unselected package gcc-11. Preparing to unpack .../10-gcc-11_11.3.0-1ubuntu1~22.04.1_arm64.deb ... Unpacking gcc-11 (11.3.0-1ubuntu1~22.04.1) ... Selecting previously unselected package gcc. Preparing to unpack .../11-gcc_4%3a11.2.0-1ubuntu1_arm64.deb ... Unpacking gcc (4:11.2.0-1ubuntu1) ... Selecting previously unselected package libstdc++-11-dev:arm64. Preparing to unpack .../12-libstdc++-11-dev_11.3.0-1ubuntu1~22.04.1_arm64.deb .. . Unpacking libstdc++-11-dev:arm64 (11.3.0-1ubuntu1~22.04.1) ... Selecting previously unselected package g++-11. Preparing to unpack .../13-g++-11_11.3.0-1ubuntu1~22.04.1_arm64.deb ... Unpacking g++-11 (11.3.0-1ubuntu1~22.04.1) ... Selecting previously unselected package g++. Preparing to unpack .../14-g++_4%3a11.2.0-1ubuntu1_arm64.deb ... Unpacking g++ (4:11.2.0-1ubuntu1) ... Selecting previously unselected package make. Preparing to unpack .../15-make_4.3-4.1build1_arm64.deb ... Unpacking make (4.3-4.1build1) ... Preparing to unpack .../16-libdpkg-perl_1.21.1ubuntu2.2_all.deb ... Unpacking libdpkg-perl (1.21.1ubuntu2.2) over (1.21.1ubuntu2.1) ... Selecting previously unselected package lto-disabled-list. Preparing to unpack .../17-lto-disabled-list_24_all.deb ... Unpacking lto-disabled-list (24) ... Selecting previously unselected package dpkg-dev. Preparing to unpack .../18-dpkg-dev_1.21.1ubuntu2.2_all.deb ... Unpacking dpkg-dev (1.21.1ubuntu2.2) ... Selecting previously unselected package build-essential. Preparing to unpack .../19-build-essential_12.9ubuntu3_arm64.deb ... Unpacking build-essential (12.9ubuntu3) ... Selecting previously unselected package libfakeroot:arm64. Preparing to unpack .../20-libfakeroot_1.28-1ubuntu1_arm64.deb ... Unpacking libfakeroot:arm64 (1.28-1ubuntu1) ... Selecting previously unselected package fakeroot. Preparing to unpack .../21-fakeroot_1.28-1ubuntu1_arm64.deb ... Unpacking fakeroot (1.28-1ubuntu1) ... Selecting previously unselected package javascript-common. Preparing to unpack .../22-javascript-common_11+nmu1_all.deb ... Unpacking javascript-common (11+nmu1) ... Selecting previously unselected package libalgorithm-diff-perl. Preparing to unpack .../23-libalgorithm-diff-perl_1.201-1_all.deb ... Unpacking libalgorithm-diff-perl (1.201-1) ... Selecting previously unselected package libalgorithm-diff-xs-perl. Preparing to unpack .../24-libalgorithm-diff-xs-perl_0.04-6build3_arm64.deb ... Unpacking libalgorithm-diff-xs-perl (0.04-6build3) ... Selecting previously unselected package libalgorithm-merge-perl. Preparing to unpack .../25-libalgorithm-merge-perl_0.08-3_all.deb ... Unpacking libalgorithm-merge-perl (0.08-3) ... Selecting previously unselected package libjs-jquery. Preparing to unpack .../26-libjs-jquery_3.6.0+dfsg+~3.5.13-1_all.deb ... Unpacking libjs-jquery (3.6.0+dfsg+~3.5.13-1) ... Selecting previously unselected package libjs-underscore. Preparing to unpack .../27-libjs-underscore_1.13.2~dfsg-2_all.deb ... Unpacking libjs-underscore (1.13.2~dfsg-2) ... Selecting previously unselected package libjs-sphinxdoc. Preparing to unpack .../28-libjs-sphinxdoc_4.3.2-1_all.deb ... Unpacking libjs-sphinxdoc (4.3.2-1) ... Selecting previously unselected package libpython3-dev:arm64. Preparing to unpack .../29-libpython3-dev_3.10.6-1~22.04_arm64.deb ... Unpacking libpython3-dev:arm64 (3.10.6-1~22.04) ... Selecting previously unselected package python3-dev. Preparing to unpack .../30-python3-dev_3.10.6-1~22.04_arm64.deb ... Unpacking python3-dev (3.10.6-1~22.04) ... Selecting previously unselected package python3-setuptools. Preparing to unpack .../31-python3-setuptools_59.6.0-1.2ubuntu0.22.04.1_all.deb ... Unpacking python3-setuptools (59.6.0-1.2ubuntu0.22.04.1) ... Selecting previously unselected package python3-wheel. Preparing to unpack .../32-python3-wheel_0.37.1-2ubuntu0.22.04.1_all.deb ... Unpacking python3-wheel (0.37.1-2ubuntu0.22.04.1) ... Selecting previously unselected package python3-pip. Preparing to unpack .../33-python3-pip_22.0.2+dfsg-1ubuntu0.3_all.deb ... Unpacking python3-pip (22.0.2+dfsg-1ubuntu0.3) ... Setting up javascript-common (11+nmu1) ... Setting up gcc-11-base:arm64 (11.3.0-1ubuntu1~22.04.1) ... Setting up lto-disabled-list (24) ... Setting up libpython3-dev:arm64 (3.10.6-1~22.04) ... Setting up python3-setuptools (59.6.0-1.2ubuntu0.22.04.1) ... Setting up libalgorithm-diff-perl (1.201-1) ... Setting up python3-wheel (0.37.1-2ubuntu0.22.04.1) ... Setting up libfakeroot:arm64 (1.28-1ubuntu1) ... Setting up libasan6:arm64 (11.3.0-1ubuntu1~22.04.1) ... Setting up fakeroot (1.28-1ubuntu1) ... update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot ( fakeroot) in auto mode Setting up make (4.3-4.1build1) ... Setting up python3-pip (22.0.2+dfsg-1ubuntu0.3) ... Setting up libdpkg-perl (1.21.1ubuntu2.2) ... Setting up libubsan1:arm64 (12.1.0-2ubuntu1~22.04) ... Setting up libhwasan0:arm64 (12.1.0-2ubuntu1~22.04) ... Setting up libjs-jquery (3.6.0+dfsg+~3.5.13-1) ... Setting up libalgorithm-diff-xs-perl (0.04-6build3) ... Setting up libcc1-0:arm64 (12.1.0-2ubuntu1~22.04) ... Setting up liblsan0:arm64 (12.1.0-2ubuntu1~22.04) ... Setting up libitm1:arm64 (12.1.0-2ubuntu1~22.04) ... Setting up libjs-underscore (1.13.2~dfsg-2) ... Setting up libalgorithm-merge-perl (0.08-3) ... Setting up libtsan0:arm64 (11.3.0-1ubuntu1~22.04.1) ... Setting up cpp-11 (11.3.0-1ubuntu1~22.04.1) ... Setting up dpkg-dev (1.21.1ubuntu2.2) ... Setting up libjs-sphinxdoc (4.3.2-1) ... Setting up libgcc-11-dev:arm64 (11.3.0-1ubuntu1~22.04.1) ... Setting up gcc-11 (11.3.0-1ubuntu1~22.04.1) ... Setting up gcc (4:11.2.0-1ubuntu1) ... Setting up python3-dev (3.10.6-1~22.04) ... Setting up libstdc++-11-dev:arm64 (11.3.0-1ubuntu1~22.04.1) ... Setting up g++-11 (11.3.0-1ubuntu1~22.04.1) ... Setting up g++ (4:11.2.0-1ubuntu1) ... update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mo de Setting up build-essential (12.9ubuntu3) ... Processing triggers for man-db (2.10.2-1) ... Processing triggers for libc-bin (2.35-0ubuntu3.1) ... @.:~$ pip install goodwe==0.2.23 Defaulting to user installation because normal site-packages is not writeable Collecting goodwe==0.2.23 Downloading goodwe-0.2.23-py3-none-any.whl (33 kB) Installing collected packages: goodwe Attempting uninstall: goodwe Found existing installation: goodwe 0.2.31 Uninstalling goodwe-0.2.31: Successfully uninstalled goodwe-0.2.31 Successfully installed goodwe-0.2.23 @.:~$ ls -la total 2592 drwxr-x--- 14 mevlad mevlad 4096 čen 12 20:58 . drwxr-xr-x 3 root root 4096 čen 12 17:27 .. -rw------- 1 mevlad mevlad 1803 čen 12 20:50 .bash_history -rw-r--r-- 1 mevlad mevlad 220 čen 12 17:12 .bash_logout -rw-r--r-- 1 mevlad mevlad 3771 čen 12 17:12 .bashrc drwx------ 11 mevlad mevlad 4096 čen 12 20:59 .cache drwx------ 10 mevlad mevlad 4096 čen 12 17:36 .config drwxr-xr-x 2 mevlad mevlad 4096 čen 12 17:35 Desktop drwxr-xr-x 2 mevlad mevlad 4096 čen 12 17:35 Documents drwxr-xr-x 2 mevlad mevlad 4096 čen 12 20:58 Downloads -rw-rw-r-- 1 mevlad mevlad 2578580 čen 12 17:50 get-pip.py drwx------ 5 mevlad mevlad 4096 čen 12 20:59 .local drwxr-xr-x 2 mevlad mevlad 4096 čen 12 17:35 Music drwxr-xr-x 2 mevlad mevlad 4096 čen 12 17:35 Pictures -rw-r--r-- 1 mevlad mevlad 807 čen 12 17:12 .profile drwxr-xr-x 2 mevlad mevlad 4096 čen 12 17:35 Public drwx------ 5 mevlad mevlad 4096 čen 12 20:47 snap -rw-r--r-- 1 mevlad mevlad 0 čen 12 17:41 .sudo_as_admin_successful drwxr-xr-x 2 mevlad mevlad 4096 čen 12 17:35 Templates drwxr-xr-x 2 mevlad mevlad 4096 čen 12 17:35 Videos @.:~$ ^C @.:~$

gustonator commented 1 year ago

hi @mevlad24 I'm looking at your ls -la command. You are in your home folder, but I don't see the cloned repository with the script.

here is the full step-by step:

cd ~/
git clone https://github.com/gustonator/goodwe-prometheus-exporter.git
cd goodwe-prometheus-exporter
python src/exporter.py --port 8787 --interval 30 --inverter 110.0.0.36
mevlad24 commented 1 year ago

Hi Rudolf

Great news; looks like the exporter is alive:

@.***:~/goodwe-prometheus-exporter$ python3 src/exporter.py --port 8787 --interval 30 --inverter 10.0.0.36

GOODWE DATA EXPORTER v1.4.0

polling interval:        30s inverter scrape IP:        10.0.0.36 total PV power:         5670W spot price scrape:         Disabled fixed energy price:         0.2 eur/KW exporter started on port:    8787


energy price (fixed):        0.2 eur/KW number of metrics:        135 last scrape:            14.06.2023 20:04:44

Now I need to re-install Prometheus and Grafana

Please excuse my poor knowledge how GIT is working. This was actually my first experience with it.

GREAT THANKS!

Vladimir

---------- Původní e-mail ---------- Od: Rudolf Brosztl @.> Komu: gustonator/goodwe-prometheus-exporter <goodwe-prometheus-exporter@ noreply.github.com> Kopie: mevlad24 @.>, Mention @.***> Datum: 12. 6. 2023 22:25:44 Předmět: Re: [gustonator/goodwe-prometheus-exporter] exporter.py not found (Issue #1) "

hi @mevlad24(https://github.com/mevlad24) I'm looking at your ls -la command. You are in your home folder, but I don't see the cloned repository with the script.

here is the full step-by step:

cd ~/ git clone https://github.com/gustonator/goodwe-prometheus-exporter.git cd goodwe-prometheus-exporter python src/exporter.py --port 8787 --interval 30 --inverter 110.0.0.36

— Reply to this email directly, view it on GitHub (https://github.com/gustonator/goodwe-prometheus-exporter/issues/1#issuecomment-1588039530) , or unsubscribe (https://github.com/notifications/unsubscribe-auth/BAOOBO2AW5MMUSPVONMEKGLXK53MJANCNFSM6AAAAAAZA4K3D4) . You are receiving this because you were mentioned. Message ID: <gustonator/ @.***> "