...
To transition from using the old WSI to the new TWC you need to:
Get a new API key from: “The Weather Company, an IBM Business”
email them at TWCDigitalSupport@us.ibm.com
Confirm all your WSI locations have latitude and longitude values assigned by viewing the location list in the WSI Reader 3.x or greater. See below for details…
Check if you are using an Extra Data fields and if you are figure out if you have an equivalent field available in the TWC reader.
Download and install the latest TWC Reader while the WSI reader continues on
Add test locations in the TWC reader – that won’t affect your existing weather uses
Map the TWC API icons to your existing icons in Flow
See below for details…
Confirm data is available and looks good
Test the output in a test show if you can
Pause the WSI and TWC Readers.
Remove the test locations from the TWC Reader.
Switch existing WSI locations to be updated by the TWC reader
See below for details…
Restart the TWC reader.
Shut down the WSI reader
it has nothing to do now anyway since we just gave all its locations to TWC
In Flow - Weather - Configuration - Codes module set TWC as your new default
Data Source
.
Confirm WSI Locations have Latitude and Longitude
...
Map The TWC Icons to your Icon Set
Using the Weather - Configuration - Codes module
Select the TWC - The Weather Company
Data Source
Select your existing
Weather Set
(assuming you’ll continue to use your existing weather icons)Assign a
Weather Type Icon
to eachSource Icon Code
in the Import Code Grid
You may want to view the icons in the official guide to know how to best assign your icons to match.
...
Code Block | ||
---|---|---|
| ||
SET NAMES 'utf8mb4' COLLATE 'utf8mb4_unicode_ci';
-- look at the data_source table for confimation we are grabbing the correct ID values
SET @WsiAppID = 'FE73EA94-0166-4DCC-B272-2AE3B58CD9F9'
, @TwcAppID = 'DC8E9FD3-21A0-4403-BC7B-A0F1016BBBF3';
SELECT * FROM `data_source` WHERE `app_guid` = @WsiAppID
UNION
SELECT * FROM `data_source` WHERE `app_guid` = @TwcAppID;
-- get the sourceID values for WSI and TWC readers
SET @WSIID = 0, @TWCID = 0;
SELECT `ID` INTO @WSIID FROM `data_source` WHERE `app_guid` = @WsiAppID;
SELECT `ID` INTO @TWCID FROM `data_source` WHERE `app_guid` = @TwcAppID;
SELECT @WSIID, @TWCID;
-- optional - check for code translations for TWC - should be 48 total (0 - 47)
SELECT `iconCode`, `weatherId`, `shortText` FROM `weather_wsi_codes` WHERE `sourceID` = @TWCID;
/* switch the locations from WSI to TWC reader
update wsi_city
set sourceID = @TWCID
WHERE sourceID = @WSIID
;
update weather_city
set sourceID = @TWCID
WHERE sourceID = @WSIID
;
*/ |
Switch TWC Locations to Baron Weather
Code Block | ||
---|---|---|
| ||
SET NAMES 'utf8mb4' COLLATE 'utf8mb4_unicode_ci';
-- look at the data_source table for confimation we are grabbing the correct ID values
SET @BaronAppID = 'B500D9B2-1864-49E6-B446-A0AC70F90FEA'
, @TwcAppID = 'DC8E9FD3-21A0-4403-BC7B-A0F1016BBBF3';
SELECT 'Baron:', d.* FROM `data_source` d WHERE `app_guid` = @BaronAppID
UNION
SELECT 'TWC:', d.* FROM `data_source` d WHERE `app_guid` = @TwcAppID;
-- get the sourceID values for Baron and TWC readers
-- the customID is null phrase is used to select the specific instance if there is more than one - but could be a non-null value too
SET @BaronID = 0, @TWCID = 0;
SELECT `ID` INTO @BaronID FROM `data_source` WHERE `app_guid` = @BaronAppID and customID is null;
SELECT `ID` INTO @TWCID FROM `data_source` WHERE `app_guid` = @TwcAppID and customID is null;
SELECT @BaronID, @TWCID;
-- optional - check for code translations for Baron - should be 59 total
SELECT `iconCode`, `weatherId`, `shortText` FROM `weather_wsi_codes` WHERE `sourceID` = @BaronID;
/* switch the locations from TWC to Baron reader
update wsi_city
set sourceID = @BaronID
WHERE sourceID = @TWCID
;
update weather_city
set sourceID = @BaronID
WHERE sourceID = @TWCID
;
*/ |