SAIC-API direkt ansteuern (iSmart App Alternative)
Re: SAIC-API direkt ansteuern (iSmart App Alternative)
- Profil
- Beiträge: 231
- Registriert: Di 8. Nov 2022, 17:27
- Hat sich bedankt: 7 Mal
- Danke erhalten: 71 Mal
Re: SAIC-API direkt ansteuern (iSmart App Alternative)
- Profil
- Beiträge: 162
- Registriert: So 16. Jan 2022, 23:10
- Wohnort: Friesenhagen
- Hat sich bedankt: 20 Mal
- Danke erhalten: 30 Mal
Ich hab das Gateway als Add-on laufen und nutze die MG2mqtt integration bei evcc. Man muss dann nur einstellen das der Fahrzeugzustand nach dem Einstecken regelmäßig abgefragt wird, sonst kann evcc den soc nicht abrufen und auch dir Vorwärmung nicht erkennen
Schaut mal hier, ist aber noch nicht fertig. Hab momentan keine Zeit irgendwas zu machen..
Wiki
Schaut mal hier, ist aber noch nicht fertig. Hab momentan keine Zeit irgendwas zu machen..
Wiki
PV: SMA Sunny Tripower 8.0 mit 9,92kWp
WB: Easee Charge Lite 11kW
Steuerung: Home Assistant + EVCC + Tibber (ab 01.03.2023)
Fahrzeug: MG5 SR Luxury Black
WB: Easee Charge Lite 11kW
Steuerung: Home Assistant + EVCC + Tibber (ab 01.03.2023)
Fahrzeug: MG5 SR Luxury Black
Re: SAIC-API direkt ansteuern (iSmart App Alternative)
- Profil
- Beiträge: 248
- Registriert: Mi 3. Aug 2022, 09:10
- Hat sich bedankt: 115 Mal
- Danke erhalten: 36 Mal
Re: SAIC-API direkt ansteuern (iSmart App Alternative)
- Profil
- Beiträge: 231
- Registriert: Di 8. Nov 2022, 17:27
- Hat sich bedankt: 7 Mal
- Danke erhalten: 71 Mal
Hallo,
das der Java Gateway ja obsolet ist, versuche ich gerade den Python Gateway auf meinem Raspberry Pi zum Laufen zu bekommen, aber das klappt nicht wirklich.
Python ist drauf, Respority ist geclont.
Wenn ich dann starten will kommt das:
statt saic stehen dort die Zugangsdaten. Was mache ich falsch?
das der Java Gateway ja obsolet ist, versuche ich gerade den Python Gateway auf meinem Raspberry Pi zum Laufen zu bekommen, aber das klappt nicht wirklich.
Python ist drauf, Respority ist geclont.
Wenn ich dann starten will kommt das:
Code: Alles auswählen
pi@raspberrypi:~ $ python saic-python-mqtt-gateway/mqtt_gateway.py -m tcp://192.168.178.115:1884 -u saic -p saic
File "/home/pi/saic-python-mqtt-gateway/mqtt_gateway.py", line 164
match topic:
^
SyntaxError: invalid syntax
Gruß
Olli
MG 4 Comfort - Diamond Red
Olli
MG 4 Comfort - Diamond Red
Re: SAIC-API direkt ansteuern (iSmart App Alternative)
- Profil
- Beiträge: 15
- Registriert: Di 30. Aug 2022, 13:18
- Hat sich bedankt: 5 Mal
- Danke erhalten: 5 Mal
Hallo Andi,
Erstmal danke für das Bereitstellen des Dashboards. Ich bin leider ein kompletter Home Assistant Anfänger und bekomme es absolut nicht so kopiert, dass es funktioniert.
Könntest du mir eventuell Stichpunktartig beschreiben, wie ich den Code richtig in einem neuen Dashboard einfüge?
Vielen Dank
Erstmal danke für das Bereitstellen des Dashboards. Ich bin leider ein kompletter Home Assistant Anfänger und bekomme es absolut nicht so kopiert, dass es funktioniert.
Könntest du mir eventuell Stichpunktartig beschreiben, wie ich den Code richtig in einem neuen Dashboard einfüge?
Vielen Dank
MasterAndi0815 hat geschrieben: ↑ Hallo zusammen,
zunächst mal vielen Dank an die Entwickler von dem Gateway und dem Home Assistant AddOn, Klasse Arbeit !!
Ich möchte im Gegenzug mein mobiles Dashboard für Home Assistant mit euch teilen.
Das Auto und der Kofferaum können geöffnet bzw. verschlossen werden.
Die Klimatisierung inkl. Sitzheizung, Batterie und Belüftung der Frontscheibe können gesteuert werden.
LadeLimit anpassen und auch das Laden beenden und starten ist möglich.
MG4 Dashboard Mobil.pngMG4 Dashboard Mobil 2.pngMG4 Dashboard Mobil 3.png
Es werden folgende Frontend Module im HACS benötigt:
- button-card
- Simple Thermostat
- Tabbed Card
Code für das Dashboard:Button Templates über den Dashboard RAW-Konfigurationseditor am Anfang einfügen:Code: Alles auswählen
type: horizontal-stack cards: - type: vertical-stack cards: - type: horizontal-stack cards: - type: custom:button-card template: infobar entity: sensor.lsjwhxxxxxxxxxxxx_soc icon: mdi:ev-station label: Ladezustand tap_action: action: none hold_action: action: none show_label: true name: | [[[ return (entity.state + ' %') ]]] - type: custom:button-card template: info entity: sensor.lsjwhxxxxxxxxxxxx_range icon: null name: Reichweite tap_action: action: none hold_action: action: none numeric_precision: 0 - type: custom:tabbed-card options: {} tabs: - card: type: grid columns: 2 square: false cards: - type: custom:button-card template: info entity: sensor.lsjwhxxxxxxxxxxxx_mileage icon: null name: Gesamtkilometer tap_action: action: none hold_action: action: none numeric_precision: 0 - type: custom:button-card template: info entity: binary_sensor.lsjwhxxxxxxxxxxxx_lights_dipped_beam icon: null name: Licht tap_action: action: none hold_action: action: none - type: custom:button-card template: info entity: lock.lsjwhxxxxxxxxxxxx_doors_lock icon: null name: Türen state: - value: unlocked icon: mdi:car-door-lock-open tap_action: action: call-service service: | [[[ return (entity.state === 'locked')?'lock.unlock':'lock.lock'; ]]] service_data: entity_id: lock.lsjwhxxxxxxxxxxxx_doors_lock hold_action: action: none - type: custom:button-card template: info entity: lock.lsjwhxxxxxxxxxxxx_boot_lock icon: null name: Kofferraum state: - value: unlocked icon: mdi:car-door-lock-open tap_action: action: call-service service: | [[[ return (entity.state === 'locked')?'lock.unlock':'lock.lock'; ]]] service_data: entity_id: lock.lsjwhxxxxxxxxxxxx_boot_lock hold_action: action: none - type: custom:button-card template: info entity: sensor.lsjwhxxxxxxxxxxxx_auxiliary_battery_voltage icon: null name: 12V Batterie tap_action: action: none hold_action: action: none state: - value: 12 operator: < color: red - type: custom:button-card template: info entity: sensor.lsjwhxxxxxxxxxxxx_voltage icon: null name: HV Batterie tap_action: action: none hold_action: action: none - type: custom:button-card template: info entity: sensor.lsjwhxxxxxxxxxxxx_tyres_front_left_pressure icon: null name: Reifendruck Vorne Links tap_action: action: none hold_action: action: none - type: custom:button-card template: info entity: sensor.lsjwhxxxxxxxxxxxx_tyres_front_right_pressure icon: null name: Reifendruck Vorne Rechts tap_action: action: none hold_action: action: none - type: custom:button-card template: info entity: sensor.lsjwhxxxxxxxxxxxx_tyres_rear_left_pressure icon: null name: Reifendruck Hinten Links tap_action: action: none hold_action: action: none - type: custom:button-card template: info entity: sensor.lsjwhxxxxxxxxxxxx_tyres_rear_right_pressure icon: null name: Reifendruck Hinten Rechts tap_action: action: none hold_action: action: none attributes: label: Info - card: type: grid columns: 1 square: false cards: - type: custom:simple-thermostat entity: climate.lsjwhxxxxxxxxxxxx_vehicle_climate header: false layout: mode: names: true icons: true headings: false - type: grid columns: 2 square: false cards: - type: custom:button-card template: info entity: select.lsjwhxxxxxxxxxxxx_heated_seat_front_left_level icon: null name: Sitzheizung Fahrer tap_action: action: call-service service: select.select_option target: entity_id: >- select.lsjwhxxxxxxxxxxxx_heated_seat_front_left_level service_data: option: | [[[ return (entity.state === 'OFF')?'HIGH':'OFF'; ]]] hold_action: action: none - type: custom:button-card template: info entity: select.lsjwhxxxxxxxxxxxx_heated_seat_front_right_level icon: null name: Sitzheizung Beifahrer tap_action: action: call-service service: select.select_option target: entity_id: >- select.lsjwhxxxxxxxxxxxx_heated_seat_front_right_level service_data: option: | [[[ return (entity.state === 'OFF')?'HIGH':'OFF'; ]]] hold_action: action: none - type: custom:button-card template: info entity: switch.lsjwhxxxxxxxxxxxx_battery_heating icon: null name: Batterieheizung tap_action: action: toggle hold_action: action: none - type: custom:button-card template: info entity: switch.lsjwhxxxxxxxxxxxx_front_window_defroster_heating icon: null name: Frontscheibe auftauen tap_action: action: toggle hold_action: action: none attributes: label: Klimatisierung - card: type: grid columns: 2 square: false cards: - type: custom:button-card template: info entity: switch.lsjwhxxxxxxxxxxxx_charging icon: null name: Laden beenden tap_action: action: toggle hold_action: action: none - type: custom:button-card template: info entity: binary_sensor.lsjwhxxxxxxxxxxxx_battery_charging icon: null name: Ladevorgang tap_action: action: none hold_action: action: none - type: custom:button-card template: info entity: binary_sensor.lsjwhxxxxxxxxxxxx_charger_connected icon: null name: Ladekabel tap_action: action: none hold_action: action: none - type: custom:button-card template: info entity: sensor.lsjwhxxxxxxxxxxxx_remaining_charging_time icon: null name: Verbleibende Ladezeit tap_action: action: none hold_action: action: none - type: custom:button-card template: info entity: sensor.lsjwhxxxxxxxxxxxx_soc_kwh icon: null name: Ladestand in kWh tap_action: action: none hold_action: action: none - type: custom:button-card template: info entity: sensor.lsjwhxxxxxxxxxxxx_power icon: null name: Leistung tap_action: action: none hold_action: action: none - type: grid columns: 2 square: false cards: - type: custom:button-card entity: number.lsjwhxxxxxxxxxxxx_target_soc name: 70% tap_action: action: call-service service: number.set_value target: entity_id: number.lsjwhxxxxxxxxxxxx_target_soc data: value: 70 hold_action: action: none state: - value: 70 color: green - type: custom:button-card entity: number.lsjwhxxxxxxxxxxxx_target_soc name: 80% tap_action: action: call-service service: number.set_value target: entity_id: number.lsjwhxxxxxxxxxxxx_target_soc data: value: 80 hold_action: action: none state: - value: 80 color: green - type: grid columns: 2 square: false cards: - type: custom:button-card entity: number.lsjwhxxxxxxxxxxxx_target_soc name: 90% tap_action: action: call-service service: number.set_value target: entity_id: number.lsjwhxxxxxxxxxxxx_target_soc data: value: 90 hold_action: action: none state: - value: 90 color: green - type: custom:button-card entity: number.lsjwhxxxxxxxxxxxx_target_soc name: 100% tap_action: action: call-service service: number.set_value target: entity_id: number.lsjwhxxxxxxxxxxxx_target_soc data: value: 100 hold_action: action: none state: - value: 100 color: green attributes: label: Laden
Viel Spass damitCode: Alles auswählen
button_card_templates: infobar: custom_fields: bar: | [[[ var color = "red"; var state = entity.state; if (state > 40) color = "green"; else if (state > 15) color = "orange"; return ` <div> <div style="background:${color}; height: 12px; width:${state}%"> </div> </div> ` ]]] styles: custom_fields: bar: - justify-self: start - width: 100% - height: 12px - background: '#cccccc' grid: - grid-template-areas: '"i n" "bar bar" "l l"' card: - padding: 20px img_cell: - justify-self: start - width: 24px - height: 24px - padding-bottom: 0px - margin-left: '-3px' icon: - width: 24px - color: black label: - justify-self: start - font-size: 16px - padding: 2px 0 name: - justify-self: end - font-size: 16px - font-weight: 500 info: show_state: true layout: icon_state styles: card: - padding: 20px img_cell: - justify-self: start - width: 24px - height: 24px - padding-bottom: 14px - margin-left: '-3px' icon: - width: 24px name: - justify-self: start - font-size: 16px - padding: 2px 0 state: - justify-self: end - font-size: 16px - font-weight: 500
Grüße
MasterAndi
Re: SAIC-API direkt ansteuern (iSmart App Alternative)
- Profil
- Beiträge: 15
- Registriert: Di 30. Aug 2022, 13:18
- Hat sich bedankt: 5 Mal
- Danke erhalten: 5 Mal
@OliverE
was genau hast du gemacht, damit das Dashboard funktioniert?
Ich habe probiert den Code einzufügen und die Fahrgestellnummer anzupassen aber leider bleibt die Seite leer.
was genau hast du gemacht, damit das Dashboard funktioniert?
Ich habe probiert den Code einzufügen und die Fahrgestellnummer anzupassen aber leider bleibt die Seite leer.
Re: SAIC-API direkt ansteuern (iSmart App Alternative)
- Profil
- Beiträge: 25
- Registriert: Di 19. Jan 2021, 17:28
- Hat sich bedankt: 58 Mal
- Danke erhalten: 26 Mal
@lucas2350d
Wird dein MG normal unter Einstellungen/Geräte/MQTT angezeigt ?
Dann dort z.B. mal die SOC Entität aufrufen und dann oben auf das Zahnrad klicken. Nun werden die Details angezeigt und auch die Entitäts-ID.
Diese nun kopieren und dann im Dashboard an der entsprechenden Stelle einfügen.
Nun kannst du sehen, ob es ausreicht die VIN anzupassen oder ob deine ID anders aufgebaut ist, in diesem Fall müssten alle Entitäten auf diesem Weg angepasst werden.
Für das Dashboard werden ein paar weitere Erweiterungen benötigt, sind diese installiert ?
Es werden folgende Frontend Module im HACS benötigt:
button-card
Simple Thermostat
Tabbed Card
Das Template für das Button Design muss mit dem RAW Editor ganz am Anfang vor das Dashboard eingefügt werden.
Wird dein MG normal unter Einstellungen/Geräte/MQTT angezeigt ?
Dann dort z.B. mal die SOC Entität aufrufen und dann oben auf das Zahnrad klicken. Nun werden die Details angezeigt und auch die Entitäts-ID.
Diese nun kopieren und dann im Dashboard an der entsprechenden Stelle einfügen.
Nun kannst du sehen, ob es ausreicht die VIN anzupassen oder ob deine ID anders aufgebaut ist, in diesem Fall müssten alle Entitäten auf diesem Weg angepasst werden.
Für das Dashboard werden ein paar weitere Erweiterungen benötigt, sind diese installiert ?
Es werden folgende Frontend Module im HACS benötigt:
button-card
Simple Thermostat
Tabbed Card
Das Template für das Button Design muss mit dem RAW Editor ganz am Anfang vor das Dashboard eingefügt werden.
Skoda Enyaq iV80 09/2021 / Quarz-Grau Metallic / Loft / 19"er / AHK / keine WP.
SAIC MG4 02/2023 / Luxury / Medal Silver.
SAIC MG4 02/2023 / Luxury / Medal Silver.
Re: SAIC-API direkt ansteuern (iSmart App Alternative)
- Profil
- Beiträge: 25
- Registriert: Di 19. Jan 2021, 17:28
- Hat sich bedankt: 58 Mal
- Danke erhalten: 26 Mal
Es gibt in der API Config zwei Werte für das HomeAssistant AutoDiscovery:
--ha-discovery HA_DISCOVERY_ENABLED Home Assistant auto-discovery is enabled (True) by default. It can be disabled (False) with this parameter.
--ha-discovery-prefix HA_DISCOVERY_PREFIX The default MQTT prefix for Home Assistant auto-discovery is 'homeassistant'. Another prefix can be configured with this parameter
Damit wird der MG eigentlich automatisch hinzugefügt.
--ha-discovery HA_DISCOVERY_ENABLED Home Assistant auto-discovery is enabled (True) by default. It can be disabled (False) with this parameter.
--ha-discovery-prefix HA_DISCOVERY_PREFIX The default MQTT prefix for Home Assistant auto-discovery is 'homeassistant'. Another prefix can be configured with this parameter
Damit wird der MG eigentlich automatisch hinzugefügt.
Skoda Enyaq iV80 09/2021 / Quarz-Grau Metallic / Loft / 19"er / AHK / keine WP.
SAIC MG4 02/2023 / Luxury / Medal Silver.
SAIC MG4 02/2023 / Luxury / Medal Silver.
-
- Vergleichbare Themen
-
-
iSmart App Telefonnummer hinzufügen?
von GodzillasTodespranke » Do 29. Jun 2023, 14:15 » in MG4 Electric - Allgemeine Themen -
Letzter Beitrag von Lusumi
Di 22. Aug 2023, 23:33
-
iSmart App Telefonnummer hinzufügen?
-
-
MG iSmart Android app update
von maschenazi » Fr 11. Aug 2023, 17:02 » in Marvel R Electric - Allgemeine Themen -
Letzter Beitrag von ranw
Fr 13. Okt 2023, 19:18
-
MG iSmart Android app update
-
-
iSmart App keine Anmeldung mehr möglich
von Hardy1966 » Mi 23. Aug 2023, 20:05 » in MG4 Electric - Infotainment -
Letzter Beitrag von krebs8
Sa 30. Dez 2023, 23:12
-
iSmart App keine Anmeldung mehr möglich
-
-
iSmart App startet seit letztem Update nicht mehr (Android)
von frostman » Mo 16. Okt 2023, 21:58 » in MG - modellübergreifend -
Letzter Beitrag von Zp3o
Do 1. Feb 2024, 18:19
-
iSmart App startet seit letztem Update nicht mehr (Android)
-
-
iSmart App Update funktioniert nicht
von Hardix » Mo 18. Dez 2023, 13:09 » in MG4 Electric - Allgemeine Themen -
Letzter Beitrag von Holte
So 31. Dez 2023, 15:39
-
iSmart App Update funktioniert nicht