It is currently March 28th, 2024, 1:55 pm

Speaking TextClock6 with Weather

Weather skins
Vivraan
Posts: 3
Joined: August 28th, 2020, 4:57 pm

Re: Speaking TextClock6 with Weather

Post by Vivraan »

This is a cosmetic suggestion, wholly subjective, but twenty-eight degrees Celsius isn't sort of hot for me where I live - it's actually pretty comfortable.

It might be useful to have an option to drop that qualifier or an interactive setting that determines the average temperatures of a reason to normalise qualifiers.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Speaking TextClock6 with Weather

Post by jsmorley »

Vivraan wrote: August 28th, 2020, 5:01 pm This is a cosmetic suggestion, wholly subjective, but twenty-eight degrees Celsius isn't sort of hot for me where I live - it's actually pretty comfortable.

It might be useful to have an option to drop that qualifier or an interactive setting that determines the average temperatures of a reason to normalise qualifiers.
Those can be changed by editing TextClock6.lua and changing the text in this function:

Code: Select all

function TemperatureString()

	tempUnit = measureUnits:GetStringValue()
	tempValue = tonumber(measureTemperature:GetStringValue())
	if not tempValue then
		SKIN:Bang('!SetOption', 'MeterTemperature', 'Text', '')
		return ''
	end

	if tempUnit == 'C' then
		if tempValue > 31.7 then tempDesc = 'really hot'
			elseif tempValue > 26.1 then tempDesc = 'sort of hot'
			elseif tempValue > 15 then tempDesc = 'fairly warm'
			elseif tempValue > 9.4 then tempDesc = 'fairly cool'
			elseif tempValue > 0 then tempDesc = 'sort of chilly'
			else tempDesc = 'really cold'
		end
	end
	
	if tempUnit == 'F' then
		if tempValue > 89 then tempDesc = 'really hot'
			elseif tempValue > 79 then tempDesc = 'sort of hot'
			elseif tempValue > 59 then tempDesc = 'fairly warm'
			elseif tempValue > 49 then tempDesc = 'fairly cool'
			elseif tempValue > 32 then tempDesc = 'sort of chilly'
			else tempDesc = 'really cold'
		end
	end	
Vivraan
Posts: 3
Joined: August 28th, 2020, 4:57 pm

Re: Speaking TextClock6 with Weather

Post by Vivraan »

I guess it's time I finally picked up that online course for Lua 😅Thanks for the tip.

Maybe it'll be possible to interactively set this up?

Plus wouldn't it be better to internally maintain only one temperature and convert between them on demand?
Vivraan
Posts: 3
Joined: August 28th, 2020, 4:57 pm

Re: Speaking TextClock6 with Weather

Post by Vivraan »

I commented out the tempDesc text and added the Unit like so:

Code: Select all

...

	-- if belowZero == 0 then
	-- 	SKIN:Bang('!SetOption', 'MeterTemperature', 'Text', 'it\'s '..tempDesc..' at '..hundredText..tempText..degreesText)
	-- 	return 'it\'s '..tempDesc..' at '..hundredText..tempText..degreesText
	-- else
	-- 	SKIN:Bang('!SetOption', 'MeterTemperature', 'Text', 'it\'s '..tempDesc..' at '..hundredText..tempText..degreesText..' below zero')
	-- 	return 'it\'s '..tempDesc..' at '..hundredText..tempText..degreesText..' below zero'
	-- end

	local displayString = 'it\'s '..hundredText..tempText..degreesText
	if belowZero == 0 then
		displayString = displayString..' '..TemperatureUnitString()
		SKIN:Bang('!SetOption', 'MeterTemperature', 'Text', displayString)
		return displayString
	else
		displayString = displayString..' below zero, '..TemperatureUnitString()
		SKIN:Bang('!SetOption', 'MeterTemperature', 'Text', displayString)
		return displayString
	end
	
end

function TemperatureUnitString()
	if tempUnit == 'C' then return 'Celsius' else return 'Fahrenheit' end
end
DrRoboculous
Posts: 8
Joined: June 7th, 2020, 7:18 pm

Re: Speaking TextClock6 with Weather

Post by DrRoboculous »

ikarus1969 wrote: August 28th, 2020, 5:20 am
Hope that helps a little bit
Thank you. It does help. :thumbup:
Loki
Posts: 3
Joined: November 9th, 2020, 10:37 pm

Re: Speaking TextClock6 with Weather

Post by Loki »

Hi,
at first i appologize for my bad english.
I have a problem with the clock. It refuses to show up after loading.
I don't know why cause i didn't change anything to my setup. But i found 4 errors in the log.

Invalid TimeStampFormat: %Y-%m-%dT%H:%M:%S (TextClock6\TextClock6.ini - [@CurrentObservationTime])
Invalid TimeStampFormat: %Y-%m-%dT%H:%M:%S (TextClock6\TextClock6.ini - [@CurrentObservationDate])
Invalid TimeStampFormat: %Y-%m-%dT%H:%M:%S (TextClock6\TextClock6.ini - [@CurrentSunsetTime])
Invalid TimeStampFormat: %Y-%m-%dT%H:%M:%S (TextClock6\TextClock6.ini - [@CurrentSunriseTime])

Could this errors lead to my problem or is there somthing else?
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Speaking TextClock6 with Weather

Post by jsmorley »

Loki wrote: November 9th, 2020, 10:48 pm Hi,
at first i appologize for my bad english.
I have a problem with the clock. It refuses to show up after loading.
I don't know why cause i didn't change anything to my setup. But i found 4 errors in the log.

Invalid TimeStampFormat: %Y-%m-%dT%H:%M:%S (TextClock6\TextClock6.ini - [@CurrentObservationTime])
Invalid TimeStampFormat: %Y-%m-%dT%H:%M:%S (TextClock6\TextClock6.ini - [@CurrentObservationDate])
Invalid TimeStampFormat: %Y-%m-%dT%H:%M:%S (TextClock6\TextClock6.ini - [@CurrentSunsetTime])
Invalid TimeStampFormat: %Y-%m-%dT%H:%M:%S (TextClock6\TextClock6.ini - [@CurrentSunriseTime])

Could this errors lead to my problem or is there somthing else?
Try restarting Rainmeter and see if that helps.
Loki
Posts: 3
Joined: November 9th, 2020, 10:37 pm

Re: Speaking TextClock6 with Weather

Post by Loki »

jsmorley wrote: November 9th, 2020, 10:57 pm Try restarting Rainmeter and see if that helps.
Hello,
unfortunately it doesn't help.
Interestingly version 5 and even version 2.1 from 2016 work. Of cause without weather information.
But I have provoke another error by start and stop it a few times in a row.

(Fetch error) Das Zeitlimit für den Vorgang wurde erreicht. (ErrorCode=12002) (TextClock6\TextClock6.ini - [@EntireSiteSuperParent])

I don't know if it corelate with my problem or it's just caused by my start/stop procedure.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5380
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA
Contact:

Re: Speaking TextClock6 with Weather

Post by eclectic-tech »

Loki wrote: November 10th, 2020, 7:12 pm Hello,
unfortunately it doesn't help.
Interestingly version 5 and even version 2.1 from 2016 work. Of cause without weather information.
But I have provoke another error by start and stop it a few times in a row.

(Fetch error) Das Zeitlimit für den Vorgang wurde erreicht. (ErrorCode=12002) (TextClock6\TextClock6.ini - [@EntireSiteSuperParent])

I don't know if it corelate with my problem or it's just caused by my start/stop procedure.
That is prossibly caused by continual refreshing. You may want to restart Rainmeter again, or even restart your PC.

What are your values for the Latitude and Longitude variables? This may help someone in testing your issue.
Loki
Posts: 3
Joined: November 9th, 2020, 10:37 pm

Re: Speaking TextClock6 with Weather

Post by Loki »

eclectic-tech wrote: November 10th, 2020, 7:37 pm That is prossibly caused by continual refreshing. You may want to restart Rainmeter again, or even restart your PC.

What are your values for the Latitude and Longitude variables? This may help someone in testing your issue.
Now I get it.
I am such a fool! :oops:
Your question for coordinates made me suspicious. I couldn't remember to enter somewhere coordinates.
I checked the WeatherComJSONVariables.inc and get the confirmation that I had never entered coordinates.
So i start to dig in this topic and found my mistake. My fault was that I have read just the last page and the first post of this topic and so I didn't realise that the start post said V6 May 2020 but the download link goes to V6 August 2020.
I get the updatet .inc from August and now it work again. The only thing that confuses me is the question why it stoped working just recently and not in the end of July? But i think thats nothing to care about.

Long story short.
I have to apologize twice. First to cause trouble because i didn't read carefully enough. And for my bad english.
Post Reply