Shelly 3 EM MQTT Tasmota

Allgemeine Fragen zum Thema "Smart Home" und Entscheidungshilfen

Moderator: seppy

Antworten
johann3
Beiträge: 2
Registriert: 10. Nov 2024 10:30
Answers: 0

Shelly 3 EM MQTT Tasmota

Beitrag von johann3 »

Hallo,
ich habe eine Shelly 3EM mit Tasmota geflasht. Verbindung steht. Möchte aus dem Telegramm die einzelnen Werte heraus lesen.
Ich abe eine Problem der "incomming Value Transformation" von dem MQTT-Telegram

Parametrierung:
Channel:

Code: Alles auswählen

UID: mqtt:topic:da28a1b0d5:shelly-em3-schuhschrank9e3e2
label: shelly em3 Schuhschrank
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:da28a1b0d5
location: 
channels:
  - id: Strom_L1_Schuhschrank_SH_EM3
    channelTypeUID: mqtt:number
    label: Strom L1 Schuhschrank SH EM3
    description: ""
    configuration:
      stateTopic: tele/shelly-3em-schuhschrank/SENSOR
      transformationPattern: JSONPATH:$.Current[1]
openhab.log:

Code: Alles auswählen

2024-11-10 03:58:54.724 [WARN ] [t.generic.ChannelStateTransformation] - Executing the JSONPATH-transformation failed: Invalid path '$.Current[1]' in '{"Time":"2024-11-10T10:58:54","ENERGY":{"TotalStartTime":"2024-11-09T15:38:20","Total":1.589,"Yesterday":2.141,"Today":-0.552,"TodaySumImport":0.257,"TodaySumExport":0.809,"ExportActive":[0.000,3.189,0.560],"Period":[0,-1,0],"Power":[91,-187,76],"ApparentPower":[179,245,216],"ReactivePower":[154,159,203],"Factor":[0.51,-0.76,0.35],"Frequency":[50,50,50],"Voltage":[228,227,230],"Current":[0.781,1.079,0.941],"CurrentNeutral":0.011}}'. Pattern: '$.Current[1]'. Value: '{"Time":"2024-11-10T10:58:54","ENERGY":{"TotalStartTime":"2024-11-09T15:38:20","Total":1.589,"Yesterday":2.141,"Today":-0.552,"TodaySumImport":0.257,"TodaySumExport":0.809,"ExportActive":[0.000,3.189,0.560],"Period":[0,-1,0],"Power":[91,-187,76],"ApparentPower":[179,245,216],"ReactivePower":[154,159,203],"Factor":[0.51,-0.76,0.35],"Frequency":[50,50,50],"Voltage":[228,227,230],"Current":[0.781,1.079,0.941],"CurrentNeutral":0.011}}'

Offensichtlich ist die Transformation falsch. Habe da schon unterschiedliches probiert, komme aber nicht zum Ergebnis.
Ich möchte z.B. den Wert Current : 0.781 auslesen.

Vielen für Eure Hilfe.
openHAB 4.2.2 auf einer VM Debian

Harka
Beiträge: 401
Registriert: 30. Apr 2021 13:13
Answers: 15

Re: Shelly 3 EM MQTT Tasmota

Beitrag von Harka »

Moin,
versuch mal transformationPattern: JSONPATH:$.ENERGY.Current[0]

Code: Alles auswählen

{
	"Time": "2024-11-10T10:58:54",
	"ENERGY": {
		"TotalStartTime": "2024-11-09T15:38:20",
		"Total": 1.589,
		"Yesterday": 2.141,
		"Today": -0.552,
		"TodaySumImport": 0.257,
		"TodaySumExport": 0.809,
		"ExportActive": [
			0.0,
			3.189,
			0.56
		],
		"Period": [
			0,
			-1,
			0
		],
		"Power": [
			91,
			-187,
			76
		],
		"ApparentPower": [
			179,
			245,
			216
		],
		"ReactivePower": [
			154,
			159,
			203
		],
		"Factor": [
			0.51,
			-0.76,
			0.35
		],
		"Frequency": [
			50,
			50,
			50
		],
		"Voltage": [
			228,
			227,
			230
		],
		"Current": [
			0.781,
			1.079,
			0.941
		],
		"CurrentNeutral": 0.011
	}
}

johann3
Beiträge: 2
Registriert: 10. Nov 2024 10:30
Answers: 0

Re: Shelly 3 EM MQTT Tasmota

Beitrag von johann3 »

Moin Harka,
das passt ! Funktioniert alles.
Vielen Dank für die schnelle Hilfe
openHAB 4.2.2 auf einer VM Debian

Antworten