Hello openHAB users,
i have a new PowerPlug from Gosund SP111 flashed with Tasmota and MQTT ready.
I added the device in my openHAB2 Config and want the data send over to the influxdb for Grafana.
I can see the new device in the PaperUI - so this works fine. There are also already many devices inside my influxdb and my Grafana Dashboard. The problem is that i cant find the items created by the MQTT2 Binding to add to my persitent “gGrafana” group.
Here is the .items file:
Group gGrafana
Switch GosundP01_Switch "Switch" (gGrafana) { channel="mqtt:topic:myAuthentificatedBroker:GosundP01_PowerSwitch" }
Switch GosundP01_State "State" (gGrafana) { channel="mqtt:topic:myAuthentificatedBroker:GosundP01_powerswitchres"}
String GosundP01_WifiAp "Wifi AP [%s]" (gGrafana) { channel="mqtt:topic:myAuthentificatedBroker:GosundP01_ap" }
String GosundP01_WifiSsid "Wifi SSID [%s]" (gGrafana) { channel="mqtt:topic:myAuthentificatedBroker:GosundP01_ssid" }
String GosundP01_WifiChannel "Wifi Channel [%s]" (gGrafana) { channel="mqtt:topic:myAuthentificatedBroker:GosundP01_channel" }
Number GosundP01_WifiRssi "Wifi RSSI [%s]" (gGrafana) { channel="mqtt:topic:myAuthentificatedBroker:GosundP01_rssi" }
String GosundP01_Uptime "Uptime" (gGrafana) { channel="mqtt:topic:myAuthentificatedBroker:GosundP01_uptime" }
String GosundP01_Time "Time" { channel="mqtt:topic:myAuthentificatedBroker:GosundP01_time" }
String GosundP01_DeviceState "Device State" { channel="mqtt:topic:myAuthentificatedBroker:GosundP01_devicestate" }
String GosundP01_SensorTime "Sensor Time" { channel="mqtt:topic:myAuthentificatedBroker:GosundP01_sensortime" }
String GosundP01_startTime "Start Time" { channel="mqtt:topic:myAuthentificatedBroker:GosundP01_starttime" }
Number GosundP01_Total "Total [%.3f kWh]" { channel="mqtt:topic:myAuthentificatedBroker:GosundP01_total" }
Number GosundP01_Yesterday "Yesterday [%.3f kWh]" { channel="mqtt:topic:myAuthentificatedBroker:GosundP01_yesterday" }
Number GosundP01_Today "Today [%.3f kWh]" { channel="mqtt:topic:myAuthentificatedBroker:GosundP01_today" }
Number GosundP01_Period "Period" { channel="mqtt:topic:myAuthentificatedBroker:GosundP01_period" }
Number GosundP01_Apparent "Apparent" { channel="mqtt:topic:myAuthentificatedBroker:GosundP01_apparent" }
Number GosundP01_Reactive "Reactive" { channel="mqtt:topic:myAuthentificatedBroker:GosundP01_reactive" }
Number GosundP01_Factor "Factor [%.1f]" (gGrafana) { channel="mqtt:topic:myAuthentificatedBroker:GosundP01_factor" }
Number GosundP01_Power "Power [%.3f W]" (gGrafana) { channel="mqtt:topic:myAuthentificatedBroker:GosundP01_power" }
Number GosundP01_Voltage "Voltage [%.1f V]" (gGrafana) { channel="mqtt:topic:myAuthentificatedBroker:GosundP01_voltage" }
Number GosundP01_Current "Current [%.3f A]" (gGrafana) { channel="mqtt:topic:myAuthentificatedBroker:GosundP01_current" }
As you can see i added some items to the Group “gGrafana” (but it looks to me that these are the wrong one)
influxdb.persist
Strategies {
everyMinute : "0 * * * * ?"
everyHour : "0 0 * * * ?"
everyDay : "0 0 0 * * ?"
}
Items {
gGrafana* : strategy = everyChange, everyHour
}
Here is the mqtt binding .things file:
Thing topic GosundP01 "GosundP01" @ "MQTT" {
Channels:
Type switch : powerswitch "Power Switch" [ stateTopic="tasmota/GosundP01/POWER", commandTopic="tasmota/GosundP01/cmnd/POWER", on="ON", off="OFF" ]
Type switch : powerswitchres "Switch State" [ stateTopic="tasmota/GosundP01/RESULT", transformationPattern="JSONPATH:$.POWER",on="ON",off="OFF"]
Type string : time "Time" [ stateTopic="tasmota/GosundP01/STATE", transformationPattern="JSONPATH:$.Time" ]
Type string : uptime "Uptime" [ stateTopic="tasmota/GosundP01/STATE", transformationPattern="JSONPATH:$.Uptime" ]
Type string : ap "Wifi AP" [ stateTopic="tasmota/GosundP01/STATE", transformationPattern="JSONPATH:$.Wifi.AP" ]
Type string : ssid "Wifi SSID" [ stateTopic="tasmota/GosundP01/STATE", transformationPattern="JSONPATH:$.Wifi.SSId" ]
Type string : channel "Wifi Channel" [ stateTopic="tasmota/GosundP01/STATE", transformationPattern="JSONPATH:$.Wifi.Channel" ]
Type number : rssi "Wifi RSSI" [ stateTopic="tasmota/GosundP01/STATE", transformationPattern="JSONPATH:$.Wifi.RSSI" ]
Type string : sensortime "Sensor Time" [ stateTopic="tasmota/GosundP01/SENSOR", transformationPattern="JSONPATH:$.Time" ]
Type string : starttime "Start Time" [ stateTopic="tasmota/GosundP01/SENSOR", transformationPattern="JSONPATH:$.ENERGY.TotalStartTime" ]
Type number : total "Total" [ stateTopic="tasmota/GosundP01/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Total" ]
Type number : yesterday "Yesterday" [ stateTopic="tasmota/GosundP01/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Yesterday" ]
Type number : today "Today" [ stateTopic="tasmota/GosundP01/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Today" ]
Type number : period "Period" [ stateTopic="tasmota/GosundP01/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Period" ]
Type number : apparent "Apparent Power" [ stateTopic="tasmota/GosundP01/SENSOR", transformationPattern="JSONPATH:$.ENERGY.ApparentPower" ]
Type number : reactive "Reactive Power" [ stateTopic="tasmota/GosundP01/SENSOR", transformationPattern="JSONPATH:$.ENERGY.ReactivePower" ]
Type number : factor "Factor" [ stateTopic="tasmota/GosundP01/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Factor" ]
Type number : power "Power" [ stateTopic="tasmota/GosundP01/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Power" ]
Type number : voltage "Voltage" [ stateTopic="tasmota/GosundP01/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Voltage" ]
Type number : current "Current" [ stateTopic="tasmota/GosundP01/SENSOR", transformationPattern="JSONPATH:$.ENERGY.Current" ]
Type string : devicestate "Device State" [ stateTopic="tasmota/GosundP01/LWT" ]
}
Only the items begin with “mqtt_topic_myAuthentificatedBroker_GosundP01_” have (correct) values:
Console output:
openhab> smarthome:items list | grep GosundP01
mqtt_topic_myAuthentificatedBroker_GosundP01_channel (Type=StringItem, State=1, Label=Wifi Channel, Category=null)
GosundP01_WifiChannel (Type=StringItem, State=NULL, Label=Wifi Channel, Category=null, Groups=[gGrafana])
mqtt_topic_myAuthentificatedBroker_GosundP01_powerswitch (Type=SwitchItem, State=ON, Label=Power Switch, Category=null)
GosundP01_Power (Type=NumberItem, State=NULL, Label=Power, Category=null, Groups=[gGrafana])
GosundP01_Factor (Type=NumberItem, State=NULL, Label=Factor, Category=null, Groups=[gGrafana])
mqtt_topic_myAuthentificatedBroker_GosundP01_devicestate (Type=StringItem, State=Online, Label=Device State, Category=null)
GosundP01_Total (Type=NumberItem, State=NULL, Label=Total, Category=null)
mqtt_topic_myAuthentificatedBroker_GosundP01_today (Type=NumberItem, State=0.003, Label=Today, Category=null)
GosundP01_Period (Type=NumberItem, State=NULL, Label=Period, Category=null)
mqtt_topic_myAuthentificatedBroker_GosundP01_uptime (Type=StringItem, State=2T01:21:54, Label=Uptime, Category=null)
GosundP01_Yesterday (Type=NumberItem, State=NULL, Label=Yesterday, Category=null)
mqtt_topic_myAuthentificatedBroker_GosundP01_yesterday (Type=NumberItem, State=0.005, Label=Yesterday, Category=null)
mqtt_topic_myAuthentificatedBroker_GosundP01_voltage (Type=NumberItem, State=238, Label=Voltage, Category=null)
GosundP01_Current (Type=NumberItem, State=NULL, Label=Current, Category=null, Groups=[gGrafana])
GosundP01_Time (Type=StringItem, State=NULL, Label=Time, Category=null)
GosundP01_Today (Type=NumberItem, State=NULL, Label=Today, Category=null)
mqtt_topic_myAuthentificatedBroker_GosundP01_total (Type=NumberItem, State=0.013, Label=Total, Category=null)
mqtt_topic_myAuthentificatedBroker_GosundP01_rssi (Type=NumberItem, State=60, Label=Wifi RSSI, Category=null)
GosundP01_Voltage (Type=NumberItem, State=NULL, Label=Voltage, Category=null, Groups=[gGrafana])
mqtt_topic_myAuthentificatedBroker_GosundP01_ssid (Type=StringItem, State=IoT, Label=Wifi SSID, Category=null)
GosundP01_Switch (Type=SwitchItem, State=OFF, Label=Switch, Category=null, Groups=[gGrafana])
mqtt_topic_myAuthentificatedBroker_GosundP01_factor (Type=NumberItem, State=0.0, Label=Factor, Category=null)
GosundP01_WifiSsid (Type=StringItem, State=NULL, Label=Wifi SSID, Category=null, Groups=[gGrafana])
mqtt_topic_myAuthentificatedBroker_GosundP01_powerswitchres (Type=SwitchItem, State=UNDEF, Label=Switch State, Category=null)
mqtt_topic_myAuthentificatedBroker_GosundP01_current (Type=NumberItem, State=0.0, Label=Current, Category=null)
mqtt_topic_myAuthentificatedBroker_GosundP01_power (Type=NumberItem, State=0, Label=Power, Category=null)
mqtt_topic_myAuthentificatedBroker_GosundP01_time (Type=StringItem, State=2019-10-30T12:14:46, Label=Time, Category=null)
GosundP01_SensorTime (Type=StringItem, State=NULL, Label=Sensor Time, Category=null)
GosundP01_WifiRssi (Type=NumberItem, State=NULL, Label=Wifi RSSI, Category=null, Groups=[gGrafana])
mqtt_topic_myAuthentificatedBroker_GosundP01_reactive (Type=NumberItem, State=0, Label=Reactive Power, Category=null)
GosundP01_Uptime (Type=StringItem, State=NULL, Label=Uptime, Category=null, Groups=[gGrafana])
GosundP01_DeviceState (Type=StringItem, State=NULL, Label=Device State, Category=null)
GosundP01_Apparent (Type=NumberItem, State=NULL, Label=Apparent, Category=null)
GosundP01_startTime (Type=StringItem, State=NULL, Label=Start Time, Category=null)
GosundP01_Reactive (Type=NumberItem, State=NULL, Label=Reactive, Category=null)
mqtt_topic_myAuthentificatedBroker_GosundP01_sensortime (Type=StringItem, State=2019-10-30T12:14:46, Label=Sensor Time, Category=null)
GosundP01_State (Type=SwitchItem, State=OFF, Label=State, Category=null, Groups=[gGrafana])
GosundP01_WifiAp (Type=StringItem, State=NULL, Label=Wifi AP, Category=null, Groups=[gGrafana])
mqtt_topic_myAuthentificatedBroker_GosundP01_ap (Type=StringItem, State=1, Label=Wifi AP, Category=null)
But how can i add the MQTT2 Binded devices (mqtt_topic_myAuthentificatedBroker_GosundP01_) to the “gGrafana” Group ? They are not part of my config above. I only created "GosundP01_" Looks like they are auto generated. I don´t use the PaperUI only the text config files.
Here are the links if needed:
Console ouput links
openhab> smarthome:links list | grep GosundP01
mqtt_topic_myAuthentificatedBroker_GosundP01_powerswitch -> mqtt:topic:myAuthentificatedBroker:GosundP01:powerswitch
mqtt_topic_myAuthentificatedBroker_GosundP01_channel -> mqtt:topic:myAuthentificatedBroker:GosundP01:channel
GosundP01_Time -> mqtt:topic:myAuthentificatedBroker:GosundP01_time
mqtt_topic_myAuthentificatedBroker_GosundP01_GosundP01_starttime -> mqtt:topic:myAuthentificatedBroker:GosundP01:GosundP01_starttime
mqtt_topic_myAuthentificatedBroker_GosundP01_GosundP01_rssi -> mqtt:topic:myAuthentificatedBroker:GosundP01:GosundP01_rssi
mqtt_topic_myAuthentificatedBroker_GosundP01_rssi -> mqtt:topic:myAuthentificatedBroker:GosundP01:rssi
mqtt_topic_myAuthentificatedBroker_GosundP01_voltage -> mqtt:topic:myAuthentificatedBroker:GosundP01:voltage
mqtt_topic_myAuthentificatedBroker_GosundP01_power -> mqtt:topic:myAuthentificatedBroker:GosundP01:power
mqtt_topic_myAuthentificatedBroker_GosundP01_uptime -> mqtt:topic:myAuthentificatedBroker:GosundP01:uptime
mqtt_topic_myAuthentificatedBroker_GosundP01_GosundP01_apparent -> mqtt:topic:myAuthentificatedBroker:GosundP01:GosundP01_apparent
mqtt_topic_myAuthentificatedBroker_GosundP01_GosundP01_today -> mqtt:topic:myAuthentificatedBroker:GosundP01:GosundP01_today
mqtt_topic_myAuthentificatedBroker_GosundP01_GosundP01_sensortime -> mqtt:topic:myAuthentificatedBroker:GosundP01:GosundP01_sensortime
mqtt_topic_myAuthentificatedBroker_GosundP01_ap -> mqtt:topic:myAuthentificatedBroker:GosundP01:ap
GosundP01_Power -> mqtt:topic:myAuthentificatedBroker:GosundP01_power
mqtt_topic_myAuthentificatedBroker_GosundP01_GosundP01_time -> mqtt:topic:myAuthentificatedBroker:GosundP01:GosundP01_time
GosundP01_Yesterday -> mqtt:topic:myAuthentificatedBroker:GosundP01_yesterday
mqtt_topic_myAuthentificatedBroker_GosundP01_powerswitchres -> mqtt:topic:myAuthentificatedBroker:GosundP01:powerswitchres
GosundP01_State -> mqtt:topic:myAuthentificatedBroker:GosundP01_powerswitchres
GosundP01_WifiAp -> mqtt:topic:myAuthentificatedBroker:GosundP01_ap
mqtt_topic_myAuthentificatedBroker_GosundP01_GosundP01_channel -> mqtt:topic:myAuthentificatedBroker:GosundP01:GosundP01_channel
mqtt_topic_myAuthentificatedBroker_GosundP01_yesterday -> mqtt:topic:myAuthentificatedBroker:GosundP01:yesterday
GosundP01_WifiSsid -> mqtt:topic:myAuthentificatedBroker:GosundP01_ssid
GosundP01_DeviceState -> mqtt:topic:myAuthentificatedBroker:GosundP01_devicestate
mqtt_topic_myAuthentificatedBroker_GosundP01_GosundP01_reactive -> mqtt:topic:myAuthentificatedBroker:GosundP01:GosundP01_reactive
mqtt_topic_myAuthentificatedBroker_GosundP01_current -> mqtt:topic:myAuthentificatedBroker:GosundP01:current
GosundP01_Total -> mqtt:topic:myAuthentificatedBroker:GosundP01_total
mqtt_topic_myAuthentificatedBroker_GosundP01_factor -> mqtt:topic:myAuthentificatedBroker:GosundP01:factor
GosundP01_SensorTime -> mqtt:topic:myAuthentificatedBroker:GosundP01_sensortime
GosundP01_Apparent -> mqtt:topic:myAuthentificatedBroker:GosundP01_apparent
GosundP01_Factor -> mqtt:topic:myAuthentificatedBroker:GosundP01_factor
mqtt_topic_myAuthentificatedBroker_GosundP01_GosundP01_power -> mqtt:topic:myAuthentificatedBroker:GosundP01:GosundP01_power
mqtt_topic_myAuthentificatedBroker_GosundP01_GosundP01_current -> mqtt:topic:myAuthentificatedBroker:GosundP01:GosundP01_current
mqtt_topic_myAuthentificatedBroker_GosundP01_GosundP01_yesterday -> mqtt:topic:myAuthentificatedBroker:GosundP01:GosundP01_yesterday
mqtt_topic_myAuthentificatedBroker_GosundP01_GosundP01_total -> mqtt:topic:myAuthentificatedBroker:GosundP01:GosundP01_total
mqtt_topic_myAuthentificatedBroker_GosundP01_time -> mqtt:topic:myAuthentificatedBroker:GosundP01:time
mqtt_topic_myAuthentificatedBroker_GosundP01_GosundP01_vcc -> mqtt:topic:myAuthentificatedBroker:GosundP01:GosundP01_vcc
mqtt_topic_myAuthentificatedBroker_GosundP01_GosundP01_uptime -> mqtt:topic:myAuthentificatedBroker:GosundP01:GosundP01_uptime
mqtt_topic_myAuthentificatedBroker_GosundP01_reactive -> mqtt:topic:myAuthentificatedBroker:GosundP01:reactive
GosundP01_startTime -> mqtt:topic:myAuthentificatedBroker:GosundP01_starttime
mqtt_topic_myAuthentificatedBroker_GosundP01_ssid -> mqtt:topic:myAuthentificatedBroker:GosundP01:ssid
GosundP01_Voltage -> mqtt:topic:myAuthentificatedBroker:GosundP01_voltage
mqtt_topic_myAuthentificatedBroker_GosundP01_GosundP01_devicestate -> mqtt:topic:myAuthentificatedBroker:GosundP01:GosundP01_devicestate
mqtt_topic_myAuthentificatedBroker_GosundP01_today -> mqtt:topic:myAuthentificatedBroker:GosundP01:today
GosundP01_Uptime -> mqtt:topic:myAuthentificatedBroker:GosundP01_uptime
GosundP01_WifiRssi -> mqtt:topic:myAuthentificatedBroker:GosundP01_rssi
GosundP01_Reactive -> mqtt:topic:myAuthentificatedBroker:GosundP01_reactive
mqtt_topic_myAuthentificatedBroker_GosundP01_devicestate -> mqtt:topic:myAuthentificatedBroker:GosundP01:devicestate
mqtt_topic_myAuthentificatedBroker_GosundP01_GosundP01_period -> mqtt:topic:myAuthentificatedBroker:GosundP01:GosundP01_period
mqtt_topic_myAuthentificatedBroker_GosundP01_sensortime -> mqtt:topic:myAuthentificatedBroker:GosundP01:sensortime
mqtt_topic_myAuthentificatedBroker_GosundP01_total -> mqtt:topic:myAuthentificatedBroker:GosundP01:total
mqtt_topic_myAuthentificatedBroker_GosundP01_GosundP01_powerswitchres -> mqtt:topic:myAuthentificatedBroker:GosundP01:GosundP01_powerswitchres
GosundP01_Switch -> mqtt:topic:myAuthentificatedBroker:GosundP01_PowerSwitch
mqtt_topic_myAuthentificatedBroker_GosundP01_GosundP01_factor -> mqtt:topic:myAuthentificatedBroker:GosundP01:GosundP01_factor
mqtt_topic_myAuthentificatedBroker_GosundP01_GosundP01_voltage -> mqtt:topic:myAuthentificatedBroker:GosundP01:GosundP01_voltage
GosundP01_WifiChannel -> mqtt:topic:myAuthentificatedBroker:GosundP01_channel
GosundP01_Current -> mqtt:topic:myAuthentificatedBroker:GosundP01_current
mqtt_topic_myAuthentificatedBroker_GosundP01_GosundP01_ssid -> mqtt:topic:myAuthentificatedBroker:GosundP01:GosundP01_ssid
GosundP01_Period -> mqtt:topic:myAuthentificatedBroker:GosundP01_period
mqtt_topic_myAuthentificatedBroker_GosundP01_GosundP01_PowerSwitch -> mqtt:topic:myAuthentificatedBroker:GosundP01:GosundP01_PowerSwitch
mqtt_topic_myAuthentificatedBroker_GosundP01_GosundP01_ap -> mqtt:topic:myAuthentificatedBroker:GosundP01:GosundP01_ap
GosundP01_Today -> mqtt:topic:myAuthentificatedBroker:GosundP01_today
Maybe someone out there has a hint for me to get the correct items into the perstistent influxdb.
Thank you.
OpenHAB 2.4 Stable
OS: Ubuntu
Hardware: Proxmox VM (LXC Container)