Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home Assistant Addon #204

Open
boennemann opened this issue Apr 10, 2024 · 15 comments
Open

Home Assistant Addon #204

boennemann opened this issue Apr 10, 2024 · 15 comments

Comments

@boennemann
Copy link

Hey all,

I'm planning to run the docker container as a Home Assistant Add-on directly on my Home Assistant Yellow – as I understood an add-on is anyway just a super slim layer of metadata on top of docker containers.

Before I dive into that I wanted to open the discussion already.

  1. Has anyone done this before and can share something?
  2. Are there any reasons I'm missing why this is either a bad idea or not possible
  3. Once I've got it working I'd love to contribute the setup back, ideally getting this into Home Assistant as an Add-On without the need to fork.

Let me know what you think!

@busaku
Copy link

busaku commented Apr 10, 2024

I would love an direct HA-Addon :)

@boennemann
Copy link
Author

boennemann commented Apr 11, 2024

In the end it's really just a matter of 3 steps

  1. copying the contents of the src/ folder to /addons/solarflow-control
  2. adding config.yaml, here is mine:
name: "Solarflow Control"
description: "Solarflow Control"
version: "0.0.1"
slug: "solarflow_control"
init: false
arch:
  - aarch64
  - amd64
  - armhf
  - armv7
  - i386
  1. I added this one line to the Dockerfile: COPY ./config.ini /solarflow/config.ini

Edit: In order to ship this we'd probably need to map out all config.ini parameters in the config.yaml and make those available as env vars.

@busaku
Copy link

busaku commented Apr 11, 2024

So it worked without any extras?
You should publish it into official HA-Addon Repo :)
( After the okay from all contributor here :) )

@busaku
Copy link

busaku commented Apr 11, 2024

Wow, that was easy!
Love it :)

image

@boennemann
Copy link
Author

I hope I get to mapping out the config values soon – it's anyway annoying to rebuild the docker container for every config change. Afterwards it might be almost universally applicable.

Maybe a sprinkle of metadata on top and we're good to go :)

@busaku
Copy link

busaku commented Apr 30, 2024

@boennemann any updates here? if not, i would give it a try :)

@Sweti934
Copy link

Sweti934 commented May 6, 2024

Hi all thank you for the amazing work so far!! Really awesome. To get it right - I could integrate this into home assistant ? I have all the things reporting already to my home assistant mosquito Mqtt. Would I have to change the topics or could I change the topics inside the docker where this here listeners to?

@dfigus
Copy link
Contributor

dfigus commented Sep 2, 2024

Hi all,

I just started with a HA addon here dfigus/addon-solarflow-control. It's still in an early state, but you can already configure everything via addon configs and it's runny already for a few days without issues in my setup.

If you want to give it a try and provide feedback or even contribute, you can install it via my EDGE addon repository:
https://github.com/dfigus/hassio-addons-edge

Once I added a bit of docs, I will promote it to a beta (https://github.com/dfigus/hassio-addons-beta) and finally release it (https://github.com/dfigus/hassio-addons).

@Sweti934
Copy link

Sweti934 commented Sep 2, 2024

Thanks @dfigus - Highly appreciated! I am so curious how it works out!

@jschroeter
Copy link

I wanted to give this a try but I'm stuck at allowing anonymous MQTT access to my broker running in HA, how did you guys do this? I do see in the logs that Hyper wants to connect but the connection gets refused due to the credentials.

@dfigus
Copy link
Contributor

dfigus commented Sep 15, 2024

@jschroeter I use the EMQX add-on as this allows anonymous login. The Mosquito add-on does no longer allow anonymous login. The best option would be to spoof the login credentials the hub is sending to the broker, but I didn't have the time to look into this so far...

@reinhard-brandstaedter
Copy link
Owner

@jschroeter if the hyper uses the same (stupid) credentials as the rest of the SF devices then you can calculate the password it from the device ID and add that user to your MQTT broker.

@reinhard-brandstaedter
Copy link
Owner

@jschroeter @dfigus as sooner or later people will find out the password of their SF/Hyper device anyway here is how you can calculate it from your device ID, without snooping (verified only on SF devices):

#!/usr/bin/python
import hashlib
device_id = "<DEVICEID>"
md5_hash = hashlib.md5(device_id.encode()).hexdigest().upper()[8:24]

@jschroeter
Copy link

Awesome, will give it a try! Username is the device ID?

@reinhard-brandstaedter
Copy link
Owner

username = device ID, correct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants