MatterVN / ModbusTCP2MQTT

Sungrow & SMA Solar Inverter addon for Home Assistant using mobusTCP
MIT License
67 stars 50 forks source link

Update Dockerfile to fix install error #75

Closed DisreputableCode closed 4 months ago

DisreputableCode commented 5 months ago

Added --break-system-packages to pip install pycryptodomex line in docker file which fixes #73 and #74. This should not have any issues with the system as the change is local to the docker container.

Note that I need someone to test on a known working system/config. I'm still working through another issue with having the add on connect to MQTT which may or may not be related to this library.

SL666 commented 5 months ago

I've just moved from a PI to a VM - the install is now broken, but i do have a known good config.

DisreputableCode commented 5 months ago

@SL666, can you try adding https://github.com/DisreputableCode/ModbusTCP2MQTT/tree/hassio to your plug in repositories and try to install? In theory, it should successfully complete the installation, and hopefully you will have a working system. The only difference with that branch is I've added a repository.json file so Home Assistant picks it up as a valid repo.

SL666 commented 5 months ago

image_2024-02-27_173414328

error - when trying to add the repository (not on install)

roabyd commented 4 months ago

Ive tried to implement the same changes in my own repo, and the install is successful now, however when running the addon I am getting errors that the MQTT server is not configured. This Loop is continuously logged: image

This error looks like it stems from earlier in the logs: "Please make sure mqtt.py exists in the exports folder""

image

SL666 commented 4 months ago

Installs fine for me - get the same cycling error

little bit of investigation shows that the sungather/exports/mqtt.py file needs an update - for a 24th/feb PAHO something something change..

OLD code

mqttc = mqtt.Client()

NEW code

mqttc = mqtt.Client(mqtt.CallbackAPIVersion.VERSION1)

referenced here: https://eclipse.dev/paho/files/paho.mqtt.python/html/migrations.html

eg - small change forces paho mqtt to use the v1 api instead of the v2 which is now default.

edit2: also the message that led me down this path was "Failed loading export: Unsupported callback API version: version 2.0 added a callback_api_version, see migrations.md for details"

SL666 commented 4 months ago

Ive tried to implement the same changes in my own repo, and the install is successful now,

Using your repo It has installed and is now successfully working for me (after the update).

roabyd commented 4 months ago

I've also tried to implement this but I am getting the same error. Is there some trick to get home assistant OS to pull down the latest changes to the repo? I have updated the addon, as well as the addon repo to refer to the latest version of the addon, but still the same error.

On Thu, Mar 14, 2024 at 9:27 AM SL666 @.***> wrote:

Ive tried to implement the same changes in my own repo, and the install is successful now,

Using your repo It has installed and is now successfully working for me (after the update).

— Reply to this email directly, view it on GitHub https://github.com/MatterVN/ModbusTCP2MQTT/pull/75#issuecomment-1995998364, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANGN55AQ7OODHPUH3QTMZE3YYDHFNAVCNFSM6AAAAABD3LZKD2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJVHE4TQMZWGQ . You are receiving this because you commented.Message ID: @.***>

SL666 commented 4 months ago

Not that i know of - I am literally using your repo - it showed up as an update in the notifications - i clicked update checked the config tab and restarted the process and it worked.

shows as "Current version: 0.3.11" ModbusTCP2MQTT - Roaby's Fork