Align dev with main

This commit is contained in:
Alexandre
2022-11-30 11:49:33 +01:00
parent e26fd0b9f8
commit ca7ea14671
6 changed files with 63 additions and 14 deletions

View File

@@ -1,15 +1,22 @@
- Migration to MyElectricalData
- WARNING : update to supervisor 2022.11 before installing - WARNING : update to supervisor 2022.11 before installing
- Add codenotary sign
- New standardized logic for Dockerfile build and packages installation
## 0.8.2-dev (26-11-2022) ## 0.8.2-dev (26-11-2022)
- Update to latest version from m4dm4rtig4n/enedisgateway2mqtt - Update to latest version from m4dm4rtig4n/enedisgateway2mqtt
## 0.8.0-dev (27-04-2022) ## 0.8.0-dev (27-04-2022)
- Update to latest version from m4dm4rtig4n/enedisgateway2mqtt - Update to latest version from m4dm4rtig4n/enedisgateway2mqtt
## 0.7.7 (27-04-2022) ## 0.7.7 (27-04-2022)
- Update to latest version from m4dm4rtig4n/enedisgateway2mqtt - Update to latest version from m4dm4rtig4n/enedisgateway2mqtt
## 0.8.0-dev (07-04-2022) ## 0.8.0-dev (07-04-2022)
- Update to latest version from m4dm4rtig4n/enedisgateway2mqtt - Update to latest version from m4dm4rtig4n/enedisgateway2mqtt
- Add codenotary sign - Add codenotary sign
- New standardized logic for Dockerfile build and packages installation - New standardized logic for Dockerfile build and packages installation

View File

@@ -15,7 +15,7 @@
################# #################
ARG BUILD_UPSTREAM="0.8.2-dev" ARG BUILD_UPSTREAM="0.8.2-dev"
FROM m4dm4rtig4n/enedisgateway2mqtt:$BUILD_UPSTREAM FROM m4dm4rtig4n/myelectricaldata:dev-latest
################## ##################

View File

@@ -1,10 +1,10 @@
# Home assistant add-on: Enedisgateway2mqtt # Home assistant add-on: MyElectricalData
[![Donate][donation-badge]](https://www.buymeacoffee.com/alexbelgium) [![Donate][donation-badge]](https://www.buymeacoffee.com/alexbelgium)
![Version](https://img.shields.io/badge/dynamic/json?label=Version&query=%24.version&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Fenedisgateway2mqtt_dev%2Fconfig.json) ![Version](https://img.shields.io/badge/dynamic/json?label=Version&query=%24.version&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Fenedisgateway2mqtt%2Fconfig.json)
![Ingress](https://img.shields.io/badge/dynamic/json?label=Ingress&query=%24.ingress&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Fenedisgateway2mqtt_dev%2Fconfig.json) ![Ingress](https://img.shields.io/badge/dynamic/json?label=Ingress&query=%24.ingress&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Fenedisgateway2mqtt%2Fconfig.json)
![Arch](https://img.shields.io/badge/dynamic/json?color=success&label=Arch&query=%24.arch&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Fenedisgateway2mqtt_dev%2Fconfig.json) ![Arch](https://img.shields.io/badge/dynamic/json?color=success&label=Arch&query=%24.arch&url=https%3A%2F%2Fraw.githubusercontent.com%2Falexbelgium%2Fhassio-addons%2Fmaster%2Fenedisgateway2mqtt%2Fconfig.json)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/9c6cf10bdbba45ecb202d7f579b5be0e)](https://www.codacy.com/gh/alexbelgium/hassio-addons/dashboard?utm_source=github.com&utm_medium=referral&utm_content=alexbelgium/hassio-addons&utm_campaign=Badge_Grade) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/9c6cf10bdbba45ecb202d7f579b5be0e)](https://www.codacy.com/gh/alexbelgium/hassio-addons/dashboard?utm_source=github.com&utm_medium=referral&utm_content=alexbelgium/hassio-addons&utm_campaign=Badge_Grade)
[![GitHub Super-Linter](https://github.com/alexbelgium/hassio-addons/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter) [![GitHub Super-Linter](https://github.com/alexbelgium/hassio-addons/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter)
@@ -20,12 +20,24 @@ _Thanks to everyone having starred my repo! To star it click on the image below,
## About ## About
Enedisgateway2mqtt use Enedis Gateway API to send data in your MQTT Broker. Enedisgateway2mqtt use Enedis Gateway API to send data in your MQTT Broker.
See its github for all informations : https://github.com/m4dm4rtig4n/enedisgateway2mqtt/blob/master/README.md See its github for all informations : https://github.com/m4dm4rtig4n/myelectricaldata
## Configuration ## Configuration
Install, then start the addon a first time to initialize the templates. Install, then start the addon a first time to initialize the templates.
Everything is configured using the config.yaml file found in /config/enedisgateway2mqtt/enedisgateway2mqtt.conf.
Options can be configured through two ways :
- Addon options
```yaml
CONFIG_LOCATION: /config/enedisgateway2mqtt/enedisgateway2mqtt.conf # Sets the location of the config.yaml (see below)
mqtt_autodiscover: true # Shows in the log the detail of the mqtt local server (if available). It can then be added to the config.yaml file.
TZ: Europe/Paris # Sets a specific timezone
```
- Config.yaml
Everything is configured using the config.yaml file found in /config/enedisgateway2mqtt/enedisgateway2mqtt.conf.
The complete list of options can be seen here : https://github.com/m4dm4rtig4n/enedisgateway2mqtt#environment-variable The complete list of options can be seen here : https://github.com/m4dm4rtig4n/enedisgateway2mqtt#environment-variable

View File

@@ -5,19 +5,23 @@
"armv7" "armv7"
], ],
"codenotary": "alexandrep.github@gmail.com", "codenotary": "alexandrep.github@gmail.com",
"description": "use Enedis Gateway API to send data in your MQTT Broker (latest-dev channel)", "description": "use Enedis Gateway API to send data in your MQTT Broker (latest channel)",
"image": "ghcr.io/alexbelgium/enedisgateway2mqtt_dev-{arch}", "image": "ghcr.io/alexbelgium/enedisgateway2mqtt_dev-{arch}",
"map": [ "map": [
"config:rw" "config:rw"
], ],
"name": "Enedisgateway2mqtt Dev", "name": "MyElectricalData Dev",
"options": { "options": {
"CONFIG_LOCATION": "/config/enedisgateway2mqtt_dev/config.yaml", "CONFIG_LOCATION": "/config/enedisgateway2mqtt_dev/config.yaml",
"TZ": "Europe/Paris" "TZ": "Europe/Paris",
"mqtt_autodiscover": true,
"verbose": true
}, },
"schema": { "schema": {
"CONFIG_LOCATION": "str", "CONFIG_LOCATION": "str",
"TZ": "str?" "TZ": "str?",
"mqtt_autodiscover": "bool",
"verbose": "bool"
}, },
"services": [ "services": [
"mqtt:want" "mqtt:want"

View File

@@ -0,0 +1,26 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
# shellcheck disable=SC2155
#####################
# Autodiscover mqtt #
#####################
if bashio::config.true 'mqtt_autodiscover'; then
bashio::log.info "mqtt_autodiscover is defined in options, attempting autodiscovery..."
# Check if available
if ! bashio::services.available "mqtt"; then bashio::exit.nok "No internal MQTT service found. Please install Mosquitto broker"; fi
# Get variables
bashio::log.info "... MQTT service found, fetching server detail (you can enter those manually in your config file) ..."
export MQTT_HOST=$(bashio::services mqtt "host")
export MQTT_PORT=$(bashio::services mqtt "port")
export MQTT_SSL=$(bashio::services mqtt "ssl")
export MQTT_USERNAME=$(bashio::services mqtt "username")
export MQTT_PASSWORD=$(bashio::services mqtt "password")
# Export variables
for variables in "MQTT_HOST=$MQTT_HOST" "MQTT_PORT=$MQTT_PORT" "MQTT_SSL=$MQTT_SSL" "MQTT_USERNAME=$MQTT_USERNAME" "MQTT_PASSWORD=$MQTT_PASSWORD"; do
sed -i "1a export $variables" /etc/services.d/*/*run* 2>/dev/null
# Log
bashio::log.blue "$variables"
done
fi

View File

@@ -1,9 +1,9 @@
{ {
"github_beta": "true", "github_beta": "true",
"last_update": "26-11-2022", "last_update": "25-11-2021",
"repository": "alexbelgium/hassio-addons", "repository": "alexbelgium/hassio-addons",
"slug": "enedisgateway2mqtt_dev", "slug": "enedisgateway2mqtt_dev",
"source": "dockerhub", "source": "dockerhub",
"upstream_repo": "m4dm4rtig4n/enedisgateway2mqtt", "upstream_repo": "m4dm4rtig4n/myelectricaldata",
"upstream_version": "0.8.2-dev" "upstream_version": "0.8.2-dev"
} }