Git Product home page Git Product logo

Comments (11)

mgrouch avatar mgrouch commented on August 15, 2024

Have you tried the suggestion from that reddit thread

pip3 install securesystemslib==0.31.0

(1.0 doesn’t work)

as homeassistant user

from lysmarine_gen.

metzger100 avatar metzger100 commented on August 15, 2024

Yes I tried that. But that didn't help.

from lysmarine_gen.

mgrouch avatar mgrouch commented on August 15, 2024

In Reddit post they have this issue on python 3.12 too. So the issue exists even with recommended python version.
I’d suggest checking on HomeAssistant specific support forums.

from lysmarine_gen.

metzger100 avatar metzger100 commented on August 15, 2024

I didn't find much. I have to open a new thread. That might take some time. I will update this Issue.

from lysmarine_gen.

metzger100 avatar metzger100 commented on August 15, 2024

Update 2: I fixed it.

How did I fix it? I was right it had to do with the python version.
I installed a backport of python3.12 made by a dev of homeassistant und updated to the most recent version.

I logged in as root-user changed the password of the homeassistant user, because I didn't have a password for it and made it a sudo user:

sudo su
passwd homeassistant
usermod -aG sudo homeassistant

I left the rootuser-CLI by pressing CTRL-D. After that I followed the instruction of this guide to install a backport of python3.12:

Switch to the user that is running Home Assistant and install python3.12:

sudo -u homeassistant -H -s
wget -qO- https://pascalroeleven.nl/deb-pascalroeleven.gpg | sudo tee /etc/apt/keyrings/deb-pascalroeleven.gpg
cat <<EOF | sudo tee /etc/apt/sources.list.d/pascalroeleven.sources
Types: deb
URIs: http://deb.pascalroeleven.nl/python3.12
Suites: bookworm-backports
Components: main
Signed-By: /etc/apt/keyrings/deb-pascalroeleven.gpg
EOF
sudo apt update
sudo apt install python3.12 python3.12-venv python3.12-dev
sudo apt-get install -y python3 python3-dev python3-venv python3-pip bluez libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libopenjp2-7 libtiff6 libturbojpeg0-dev tzdata ffmpeg liblapack3 liblapack-dev libatlas-base-dev
cd /srv/homeassistant
python3.12 -m venv .
source bin/activate
python3.12 -m pip install wheel
pip3.12 install homeassistant==2024.5.4

Then I logged out of homeassistant user (CTRL-D) and rebooted:

reboot

After that it took a while till Home Assistant started with the version 2024.5.4. Then the installation of HACS worked flawlessly.

from lysmarine_gen.

metzger100 avatar metzger100 commented on August 15, 2024

I also installed https://home-assistant-china.github.io/docs/ecosystem/hass-configurator/
To have a webbased editor for the homeassistant configuration files.

cd /home/homeassistant/.homeassistant/
wget https://raw.githubusercontent.com/danielperna84/hass-configurator/master/configurator.py
sudo chmod 755 configurator.py

Adjust the BASEPATH to BASEPATH = "/home/homeassistant/.homeassistant/":

nano configurator.py

Then enable the autostart of the webeditor via systemd:

sudo nano /etc/systemd/system/hass-configurator.service

Paste that into that file:

[Unit]
Description=Home Assistant Configurator
After=network.target

[Service]
Type=simple
User=homeassistant
ExecStart=/usr/bin/python3.12 /home/homeassistant/.homeassistant/configurator.py
WorkingDirectory=/home/homeassistant/.homeassistant
Restart=on-failure

[Install]
WantedBy=multi-user.target

activate the service:

sudo systemctl enable --now hass-configurator.py

The editor is now available on http://BBN-OS-IP-Address:3218/

That is needed because the homeassistant mqtt signalk integration is outdated and broken.
I followed this guide to setup mqtt entities via the configuration yaml
https://community.home-assistant.io/t/bridging-signalk-server-nmea-and-home-assistant-using-signalk-mqtt-bridge-and-mosquitto-mqtt/642640/1

Rough guide:
install mosquitto
install signalk-mqtt-bridge
configure it to localhost
install mqtt-integration on HA
configure it to localhost
create automation which requests all entries in vessels/self/
image
create the sensors in configuration.yaml
image

i recommend to use the MQTT-Explorer as AppImage for that task. (don't forget to make the Appimage executable)

from lysmarine_gen.

metzger100 avatar metzger100 commented on August 15, 2024

From my side you can close the Issue. But it might help some users if you apply the fix in your next update and also provide mqtt-explorer and install the WebEditor for Home Assistant. That would make life easier.

from lysmarine_gen.

mgrouch avatar mgrouch commented on August 15, 2024

Thanks. It’s helpful.
Could you please share more HomeAssistant sensors configuration yaml files so others could just copy and paste?
There is a need for some universal SignalK sensors definition file.

Thanks again!

from lysmarine_gen.

metzger100 avatar metzger100 commented on August 15, 2024

I can't. There is no way you can copy and paste it because it depends on the SignalK Configuration.

For example the freezer temprature:

mqtt: # SignalK MQTT HA Bridge
  # https://developers.home-assistant.io/docs/core/entity/sensor/
  sensor:
    - name: "SignalK MCS Kuehlschrank Temperatur"
      unique_id: "signalk_mcs_freezer_temperature"
      state_topic: N/signalk/bb8e1eedbfb1/vessels/self/environment/inside/freezer/temperature
      value_template: "{{ value_json.value - 273.15 }}"
      unit_of_measurement: "C"

The state_topic depends on your config in SignalK. I bought a MCS Board to get some Fieldbuses to the Raspberry.

image

I configured the 1-Wire-Sensor as a freezer temperature in SignalK with the topic path "vessels/self/environment/inside/freezer/temperature"
There hundreds of possible configurations. Even if we could gather all configurations for Home Assistant together, there would be hundreds of "dead" Elements in Home Assistant. Then there would still be the problem of the ID in MQTT. SignalK generates a random ID for MQTT. In my case its bb8e1eedbfb1. It gets displayed in the SignalK-mqtt-bridge Plugin. You always need to adjust that. And if you are a weird US american who wants his/her freezer temperature in Fahrenheit you have lost, because the value_template is completely different. I can write a guide about setting up a mqtt element of the SignalK mqtt-broker like I did with the configurator and the python backport. But there will always be some understanding of mqtt needed to configure the sensors.

But I will open another Issue for that to make it visible on Search Engines. I will also open a new one for the WebEditor and directly close it.

from lysmarine_gen.

mgrouch avatar mgrouch commented on August 15, 2024

Ok. After pasting they could do global replace of it in a text editor. What would help is all paths specified by SignalK exposed as HomeAssistant sensors in one file.

Thanks

from lysmarine_gen.

metzger100 avatar metzger100 commented on August 15, 2024

Yeah. The structure SignalK sends to the mqtt-broker is always kind of the same:

image

If I get more configurations done I will share them but I don't really need them yet. So it might take some time till I really integrate SignalK into Home Assistant.

from lysmarine_gen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.