I need the Humidity data and the Temperature data but, right now its only outputting %1 where the temperature data is supposed to be, Ive never used Regex before and truthfully I have no clue how it works or if it even is the best option.{"sn":{"Time":"2023-03-06T22:03:06","AM2301":{"Temperature":23.7,"Humidity":37.2,"DewPoint":8.2},"TempUnit":"C"},"ver":1}
Any help would be appreciated its too early in the morning for me to think about this anymore.
Code: Select all
[Rainmeter]
Update=100
[Variables]
mqttStatusColur = 200,52,50
DeskLightColour = 200,52,50
BedLightColour = 200,52,50
ReadingLightColour = 200,52,50
FanColour = 200,52,50
[mqttBroker]
Measure=Plugin
Plugin=MqttClient
Server=192.168.199.15
Port=1883
Username=mqtt_user
Password=**********
OnConnect=[!UpdateMeter mqttStatus][!Redraw]
OnMessage=[!UpdateMeter mqttStatus][!Redraw]
IfMatch=Connected
IfMatchAction=[!SetVariable mqttStatusColur 100,200,100]
IfNotMatchAction=[!SetVariable mqttStatusColur 200,52,50]
IfMatchMode=1
; Topics and ColourConditions
[DeskLight]
Measure=Plugin
Plugin=MqttClient
ParentName=mqttBroker
Topic=stat/tasmotaRelay1F87DEC/POWER
IfMatch=ON
IfMatchAction=[!SetVariable DeskLightColour 100,200,100]
IfNotMatchAction=[!SetVariable DeskLightColour 200,52,50]
IfMatchMode=1
[BedLight]
Measure=Plugin
Plugin=MqttClient
ParentName=mqttBroker
Topic=lightsstat/tasmotaRelay0B6F1F/POWER2
IfMatch=ON
IfMatchAction=[!SetVariable BedLightColour 100,200,100]
IfNotMatchAction=[!SetVariable BedLightColour 200,52,50]
IfMatchMode=1
[ReadingLight]
Measure=Plugin
Plugin=MqttClient
ParentName=mqttBroker
Topic=lightsstat/tasmotaRelay0B6F1F/POWER3
IfMatch=ON
IfMatchAction=[!SetVariable ReadingLightColour 100,200,100]
IfNotMatchAction=[!SetVariable ReadingLightColour 200,52,50]
IfMatchMode=1
[Fan]
Measure=Plugin
Plugin=MqttClient
ParentName=mqttBroker
Topic=lightsstat/tasmotaRelay0B6F1F/POWER1
IfMatch=ON
IfMatchAction=[!SetVariable FanColour 100,200,100]
IfNotMatchAction=[!SetVariable FanColour 200,52,50]
IfMatchMode=1
[Temparature]
Measure=Plugin
Plugin=MqttClient
ParentName=mqttBroker
Topic=tasmota/discovery/C8C9A354C8FA/sensors
; Server connection and topics
[mqttStatus]
Meter=String
MeasureName=MeasureTemperature
FontColor=255,0,0,255
FontSize=18
Text="%1"
DynamicVariables=1
; RegEXP
[MeasureTemperature]
Measure=RegExp
RegExp="Temperature":(\d+(?:\.\d+)?)
Substitute="\1"
String=Temparature
UpdateDivider=-1
[MeasureHumidity]
Measure=RegExp
RegExp="Humidity":(\d+(?:\.\d+)?)
Substitute="\1"
String=Temparature
UpdateDivider=-1
; MQTT Connection Indication
[mqttStatusShape]
X=0
Y=80
Meter=Shape
Shape=Rectangle 0,0,460,25 | Fill Color #mqttStatusColur# ,100 | StrokeWidth 1 | Stroke Color 0, 0, 0
DynamicVariables=1
[mqttStatusLable]
X=228
Y=82
Meter=String
StringAlign=Center
FontColor= 0, 0, 0
FontFace=Rajdhani Light
FontSize=10
Text="MQTT STATUS"
AntiAlias=1
Percentual=1
AutoScale=1
DynamicVariables=1
[mqttStatusShadow]
X=10
Y=90
Meter=Shape
Shape=Rectangle 0,0,460,25 | Fill Color 0, 0, 0, 30 | StrokeWidth 0 | Stroke Color 0, 0, 0
; Buttons
; DeskLight
[DeskLightButtonShape]
X=0
Y=125
Meter=Shape
Shape=Rectangle 0,0,100,50 | Fill Color #DeskLightColour# ,100 | StrokeWidth 1 | Stroke Color 0, 0, 0
LeftMouseUpAction=[&mqttBroker:Publish(cmnd/tasmotaRelay1F87DEC/Power1,TOGGLE)]
DynamicVariables=1
[DeskLightButtonLable]
X=51
Y=140
Meter=String
StringAlign=Center
FontColor= 0, 0, 0
FontFace=Rajdhani Light
FontSize=10
Text="DESK LIGHT"
AntiAlias=1
Percentual=1
AutoScale=1
DynamicVariables=1
[DeskLightButtonShadow]
X=10
Y=135
Meter=Shape
Shape=Rectangle 0,0,100,50 | Fill Color 0, 0, 0, 30 | StrokeWidth 0 | Stroke Color 0, 0, 0
; BedLight
[BedLightButtonShape]
X=120
Y=125
Meter=Shape
Shape=Rectangle 0,0,100,50 | Fill Color #BedLightColour# ,100 | StrokeWidth 1 | Stroke Color 0, 0, 0
LeftMouseUpAction=[&mqttBroker:Publish(lightscmnd/tasmotaRelay0B6F1F/Power2,TOGGLE)]
DynamicVariables=1
[BedLightButtonLable]
X=138
Y=140
Meter=String
StringAlign=left
FontColor= 0, 0, 0
FontFace=Rajdhani Light
FontSize=10
Text="BED LIGHT"
AntiAlias=1
Percentual=1
AutoScale=1
DynamicVariables=1
[BedLightButtonShadow]
X=130
Y=135
Meter=Shape
Shape=Rectangle 0,0,100,50 | Fill Color 0, 0, 0, 30 | StrokeWidth 0 | Stroke Color 0, 0, 0
; ReadingLight
[ReadingLightShape]
X=240
Y=125
Meter=Shape
Shape=Rectangle 0,0,100,50 | Fill Color #ReadingLightColour# ,100 | StrokeWidth 1 | Stroke Color 0, 0, 0
LeftMouseUpAction=[&mqttBroker:Publish(lightscmnd/tasmotaRelay0B6F1F/Power3,TOGGLE)]
DynamicVariables=1
[ReadingLightButtonLable]
X=290
Y=140
Meter=String
StringAlign=Center
FontColor= 0, 0, 0
FontFace=Rajdhani Light
FontSize=10
Text="BED LIGHT 2"
AntiAlias=1
Percentual=1
AutoScale=1
DynamicVariables=1
[ReadingLightShadow]
X=250
Y=135
Meter=Shape
Shape=Rectangle 0,0,100,50 | Fill Color 0, 0, 0, 30 | StrokeWidth 0 | Stroke Color 0, 0, 0
; Fan
[FanShape]
X=360
Y=125
Meter=Shape
Shape=Rectangle 0,0,100,50 | Fill Color #FanColour# ,100 | StrokeWidth 1 | Stroke Color 0, 0, 0
LeftMouseUpAction=[&mqttBroker:Publish(lightscmnd/tasmotaRelay0B6F1F/Power1,TOGGLE)]
DynamicVariables=1
[FanButtonLable]
X=410
Y=140
Meter=String
StringAlign=Center
FontColor= 0, 0, 0
FontFace=Rajdhani Light
FontSize=10
Text="FAN"
AntiAlias=1
Percentual=1
AutoScale=1
DynamicVariables=1
[FanShadow]
X=370
Y=135
Meter=Shape
Shape=Rectangle 0,0,100,50 | Fill Color 0, 0, 0, 30 | StrokeWidth 0 | Stroke Color 0, 0, 0