jaedog / EnvoyVenusDriver

A driver to integrate the Enphase Envoy device with Victron Venus OS as a PV Inverter. The Envoy provides data from the IQ7 micro inverters.
MIT License
1 stars 0 forks source link

Raspberry pi install #1

Open flexizon opened 2 years ago

flexizon commented 2 years ago

Hi. Am a noob in this. But i have an raspberrypi 4 4gb. and a new envoy. How do i install the driver/is it possible to install driver on a raspberry pi? The Venos os is running on a raspberry.

Kind regards Flexizon

mr-manuel commented 1 year ago

Hi, I'm also stuck. I was able to install all drivers, but then I get the error

INFO:dbus-envoy:Driver start
INFO:dbus-envoy:http server listening on port 8000
Traceback (most recent call last):
  File "/data/dbus-envoy/dbus-envoy.py", line 340, in <module>
    main()
  File "/data/dbus-envoy/dbus-envoy.py", line 321, in main
    _mainloop = gobject.MainLoop()
AttributeError: module 'gobject' has no attribute 'MainLoop'

I installed the drivers with this commands:

opkg update && opkg install python3-pip
python -m pip install Gauge gobject glib
jaedog commented 1 year ago

I'm pretty sure python3 isn't yet tested with this repo. It has been awhile since I've worked on it. It probably needs to be updated to the latest VenusOS and Python3.

mr-manuel commented 1 year ago

I tried to migrate the script to Python 3.x, by try and error but one issue is left. See pull request https://github.com/jaedog/EnvoyVenusDriver/pull/2. Unfortunately this is my first time scripting in Python.

root@raspberrypi4:~# /data/etc/dbus-envoy/dbus-envoy.py                                  
Traceback (most recent call last):
  File "/data/etc/dbus-envoy/dbus-envoy.py", line 33, in <module>
    from prometheus_client import start_http_server, Gauge
  File "/usr/lib/python3.8/site-packages/prometheus_client/__init__.py", line 3, in <module>
    from . import (
  File "/usr/lib/python3.8/site-packages/prometheus_client/metrics.py", line 10, in <module>
    from . import values  # retain this import style for testability
  File "/usr/lib/python3.8/site-packages/prometheus_client/values.py", line 5, in <module>
    from .mmap_dict import mmap_key, MmapedDict
  File "/usr/lib/python3.8/site-packages/prometheus_client/mmap_dict.py", line 2, in <module>
    import mmap
ModuleNotFoundError: No module named 'mmap'

To get it to work I had to comment out import mmap in /usr/lib/python3.8/site-packages/prometheus_client/mmap_dict.py, which is obviously not the right way. I was not able to install mmap. Maybe you know hot to fix it properly?

mr-manuel commented 1 year ago

If someone is interrested: I created a new package for the Enphase Envoy-S with MQTT. It integrates the PV and grid.

https://github.com/mr-manuel/venus-os_dbus-enphase-envoy