It is currently April 25th, 2024, 9:14 am

Help Making a String More Readable

Get help with creating, editing & fixing problems with skins
User avatar
Civ
Posts: 7
Joined: July 16th, 2022, 11:28 pm
Location: Netherlands, Enschede

Help Making a String More Readable

Post by Civ »

Im working on a rainmeter skin for controling some MQTT devices on my network however my specific problem is that I want to read some temperature and humidity data from a really messing string
{"sn":{"Time":"2023-03-06T22:03:06","AM2301":{"Temperature":23.7,"Humidity":37.2,"DewPoint":8.2},"TempUnit":"C"},"ver":1}
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.
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
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Help Making a String More Readable

Post by eclectic-tech »

Depending on how you are getting that "messy" string, the answer may be slightly different.

The RegExpSubstitute usually use double quotation marks to define what is found and what is substituted, but since there are double quotation marks in your string, single quote marks must be use in some of the substitutions and then the double quotation marks are removed. In a Webparser RegExp you do not have this issue (explanation linked below).

Here is one example that uses RegExpSubstitute=1 on a string measure.

Code: Select all

    [MeasureTemperature]
    Measure=String
    String={"sn":{"Time":"2023-03-06T22:03:06","AM2301":{"Temperature":23.7,"Humidity":37.2,"DewPoint":8.2},"TempUnit":"C"},"ver":1}
    RegExpSubstitute=1
    Substitute='.*Temperature(.*),':'\1',".:":"",",.*$":""
    UpdateDivider=-1

    [MeasureHumidity]
    Measure=String
    String={"sn":{"Time":"2023-03-06T22:03:06","AM2301":{"Temperature":23.7,"Humidity":37.2,"DewPoint":8.2},"TempUnit":"C"},"ver":1}
    RegExpSubstitute=1
    Substitute='.*Humidity(.*),':'\1',".:":"",",.*$":""
    UpdateDivider=-1

What is happening in these Substitution=:
The temp measure substitute first captures everything from ":23.7... to the end of the string '.*Temperature(.*),':'\1', then having that as the remaining string, any character followed by a colon ".:":"" is removed, and the final substitute removes everything from the comma to the end of the string ",.*$":""... Leaving just the temperature.

The Humidity string measure works the same way.

regexptemphumid.png

NOTE: If this string is being returned in a Webparser measure the process is slightly different, the RegExp in a Webparser measure can capture the values of Temperature, Humidity, DewPoint, and TempUnit and set them as separate child Stringindexes for use in your skin.

Let us know how this string gets into your skin and we can probably suggest the best way to capture the data.
You do not have the required permissions to view the files attached to this post.
User avatar
Civ
Posts: 7
Joined: July 16th, 2022, 11:28 pm
Location: Netherlands, Enschede

Re: Help Making a String More Readable

Post by Civ »

yes the string is created in the [Temperature] measure. The string itself is a captured message that was send over MQTT, Here is the logs:
Capture.PNG
Ive tried inseting your code and getting it working myself but ultimatly it didnt work which is why both [MeasureTemperature]and [MeasureHumidity]have values in the log

Heres the code again (it hasnt really changed much). I'm not sure how to get the string into the regexp

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=Sup3r.Tig3r
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

    [ReadingStatus]
    Y=40
    Meter=String
    MeasureName=Temparature
    FontColor=255,0,0,255
    FontSize=18
    Text="%1"
    DynamicVariables=1

    [TemperatureStatus]
    Meter=String
    MeasureName=MeasureTemperature
    FontColor=255,0,0,255
    FontSize=18
    Text="%1"
    DynamicVariables=1

    [HumidityStatus]
    Y=20
    Meter=String
    MeasureName=MeasureHumidity
    FontColor=255,0,0,255
    FontSize=18
    Text="%1"
    DynamicVariables=1

;   RegExp


    [MeasureTemperature]
    Measure=String
    String={"sn":{"Time":"2023-03-06T22:03:06","AM2301":{"Temperature":23.7,"Humidity":37.2,"DewPoint":8.2},"TempUnit":"C"},"ver":1}
    RegExpSubstitute=1
    Substitute='.*Temperature(.*),':'\1',".:":"",",.*$":""
    

    [MeasureHumidity]
    Measure=String
    String={"sn":{"Time":"2023-03-06T22:03:06","AM2301":{"Temperature":23.7,"Humidity":37.2,"DewPoint":8.2},"TempUnit":"C"},"ver":1}
    RegExpSubstitute=1
    Substitute='.*Humidity(.*),':'\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
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Help Making a String More Readable

Post by eclectic-tech »

This should work. Note that your measure name is 'Temparature' not 'Temperature', just make sure you use the same name in your STRING measues.

This partial code change to the String=[Temparature] values should work:

Code: Select all

[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=[MeasureTemperature]
    DynamicVariables=1

;   RegEXP


; You spelled 'Temperature' as 'Temparature' as the measure name, so just make sure the measurenames match your String=[{meaurename}]
[MeasureTemperature]
    Measure=String
    String=[Temparature]
    RegExpSubstitute=1
    Substitute='.*Temperature(.*),':'\1',".:":"",",.*$":""
    UpdateDivider=-1

[MeasureHumidity]
    Measure=String
    String=[Temparature]
    RegExpSubstitute=1
    Substitute='.*Humidity(.*),':'\1',".:":"",",.*$":""
    UpdateDivider=-1

User avatar
Civ
Posts: 7
Joined: July 16th, 2022, 11:28 pm
Location: Netherlands, Enschede

Re: Help Making a String More Readable

Post by Civ »

Unfortunatly still no luck, I've removed the typo in temperature and implemented it in the same way you did but im not getting any values out of the [MeasureTemperature] [MeasureHumidity]
Capture.PNG
Thanks for your help and patience so far

Code: Select all

  
    [Temperature]
    Measure=Plugin
    Plugin=MqttClient
    ParentName=mqttBroker
    Topic=tasmota/discovery/C8C9A354C8FA/sensors

;   RegExp


    [MeasureTemperature]
    Measure=String
    String=[Temperature]
    RegExpSubstitute=1
    Substitute='.*Temperature(.*),':'\1',".:":"",",.*$":""
    UpdateDivider=-1

    [MeasureHumidity]
    Measure=String
    String=[Temperature]
    RegExpSubstitute=1
    Substitute='.*Humidity(.*),':'\1',".:":"",",.*$":""
    UpdateDivider=-1
    

;   Server connection and topics

    [ReadingStatus]
    Y=40
    Meter=String
    MeasureName=Temperature
    FontColor=255,0,0,255
    FontSize=18
    Text="%1"
    DynamicVariables=1

    [TemperatureStatus]
    Meter=String
    MeasureName=MeasureTemperature
    FontColor=255,0,0,255
    FontSize=18
    Text=[MeasureTemperature]
    DynamicVariables=1

    [HumidityStatus]
    Y=20
    Meter=String
    MeasureName=MeasureHumidity
    FontColor=255,0,0,255
    FontSize=18
    Text=[MeasureHumidity]
    DynamicVariables=1


You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Help Making a String More Readable

Post by eclectic-tech »

When your skin loads. the [Temperature] measure will not have a value until the MqttClient reads the information.

You have UpdateDivider=-1 on [MeasureTemperature] and [MeasureHumidity] so they will see a blank string at first and never see [Temperature] value which is populated on the first update.

Try adding an OnUpdateAction to the [Temperature] measure.

Code: Select all

    [Temperature]
    Measure=Plugin
    Plugin=MqttClient
    ParentName=mqttBroker
    Topic=tasmota/discovery/C8C9A354C8FA/sensors
    OnUpdateAction=[!UpdateMeasure MeasureTemperature][!UpdateMeasure MeasureHumidity]
    
User avatar
Civ
Posts: 7
Joined: July 16th, 2022, 11:28 pm
Location: Netherlands, Enschede

Re: Help Making a String More Readable

Post by Civ »

Yeah still nothing unfortunatly, the log looks the exact same as the pervious one.
If you're out of ideas I can try help you replicate the issue on your end otherwise I think I'm going to scrap the tempearature and humidity readings it's not super nessasary anyways

Code: Select all

    
    [Temperature]
    Measure=Plugin
    Plugin=MqttClient
    ParentName=mqttBroker
    Topic=tasmota/discovery/C8C9A354C8FA/sensors
    OnUpdateAction=[!UpdateMeasure MeasureTemperature][!UpdateMeasure MeasureHumidity]

;   RegExp


    [MeasureTemperature]
    Measure=String
    String=[Temperature]
    RegExpSubstitute=1
    Substitute='.*Temperature(.*),':'\1',".:":"",",.*$":""
    UpdateDivider=-1

    [MeasureHumidity]
    Measure=String
    String=[Temperature]
    RegExpSubstitute=1
    Substitute='.*Humidity(.*),':'\1',".:":"",",.*$":""
    UpdateDivider=-1
    

;   Server connection and topics

    [ReadingStatus]
    Y=40
    Meter=String
    MeasureName=Temperature
    FontColor=255,0,0,255
    FontSize=18
    Text="%1"
    DynamicVariables=1

    [TemperatureStatus]
    Meter=String
    MeasureName=MeasureTemperature
    FontColor=255,0,0,255
    FontSize=18
    Text=[MeasureTemperature]
    DynamicVariables=1

    [HumidityStatus]
    Y=20
    Meter=String
    MeasureName=MeasureHumidity
    FontColor=255,0,0,255
    FontSize=18
    Text=[MeasureHumidity]
    DynamicVariables=1
    
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Help Making a String More Readable

Post by eclectic-tech »

Okay, it is up to you to decide.

My only other thought would be to remove the UpdateDivider=-1 on the temp and humidity measures and try that. If it still does not populate then add DynamicVariables=1 to them. This should force them to read the [Temperature] measure value on every update.

That's about all I can think of without having access to that plugin operation. :???:
User avatar
Civ
Posts: 7
Joined: July 16th, 2022, 11:28 pm
Location: Netherlands, Enschede

Re: Help Making a String More Readable

Post by Civ »

Yep it worked! thanks for your help throughout this, have a great day!
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Help Making a String More Readable

Post by eclectic-tech »

Happy to help :welcome: