Ambient Weather Network Support for Weather Networks Block
-
- Advisor
- Posts: 60
- Joined: Sun Dec 24, 2017 2:22 pm
- Station model: AW WS-2000ish
- Software: Meteobridge/OIP/GW-1000
- Contact:
Ambient Weather Network Support for Weather Networks Block
Now that Ambient Weather has added public access to their dashboards, I am attempting to add the functionality to the Weather Networks block. I can get it to work by modifying the weatherNetworksBlock.php to add the url directly, but am trying to take it a step further. I am trying to add the public station code directly to settings.php (& createConfig.php) so that I add the code on the settings page by where the Weather Underground, CWOP and others is, and have that carried over to the block. I thought I had the editing correct, however instead of giving me the URL to AW, it gives me the URL back to my site. Can someone take a look and give me a hint what I am doing wrong? Attached are the files, createConfig.php and settings.php from the Install directory, and then setup,php, weatherNetworksBlock.php and weatherNetworksConfig.txt from the weatherNetworks block directly, plus the icon I created that goes in the icons directory.
Thanks
Mike
Thanks
Mike
- Jachym
- Site Admin
- Posts: 1686
- Joined: Fri Aug 18, 2017 10:12 pm
- Location: Brno, Czech Republic
- Station model: WH1080
- Software: Meteobridge
- Contact:
Re: Ambient Weather Network Support for Weather Networks Block
If you give me more info I can add it.
I would need the URL + the unique ID in it and some link to a logo to use
I would need the URL + the unique ID in it and some link to a logo to use
- LOBWX
- Forecaster
- Posts: 104
- Joined: Sun Mar 11, 2018 6:43 pm
- Location: Los Osos, CA
- Station model: Ambient WS 1401-IP
- Software: MeteoBridge
- Contact:
Re: Ambient Weather Network Support for Weather Networks Block
For what it's worth. You'll need a application key and a api key. Then it will spit something like this out. As you can see i have two devices listed.
https://api.ambientweather.net/v1/devic ... UR-API-KEY
https://api.ambientweather.net/v1/devic ... UR-API-KEY
Code: Select all
[{"macAddress":"xx:xx:xx:xx:xx","lastData":{"dateutc":1533352740000,"winddir":211,"windspeedmph":1.8,"windgustmph":4.9,"maxdailygust":17.4,"windgustdir":237,"winddir_avg2m":189,"windspdmph_avg2m":2.4,"winddir_avg10m":225,"windspdmph_avg10m":1.3,"tempf":55.2,"humidity":99,"uv":0,"solarradiation":0,"baromrelin":29.91,"baromabsin":29.81,"tempinf":76.8,"humidityin":50,"hourlyrainin":0,"dailyrainin":0,"monthlyrainin":0,"yearlyrainin":12.62,"feelsLike":55.2,"dewPoint":54.92,"lastRain":"2018-07-22T12:06:00.000Z","date":"2018-08-04T03:19:00.000Z"},"info":{"location":"LOBWX.com","name":"WEATHERBRIDGE"}},{"macAddress":"xx:xx:xx:xx:xx","lastData":{"dateutc":1533352680000,"winddir":211,"windspeedmph":1.79,"windgustmph":2.46,"maxdailygust":17.45,"tempf":55.2,"humidity":99,"hourlyrainin":0,"dailyrainin":0,"weeklyrainin":0,"monthlyrainin":0,"yearlyrainin":12.61,"totalrainin":12.61,"tempinf":76.8,"humidityin":50,"baromrelin":30.01,"baromabsin":29.87,"uv":0,"solarradiation":0,"feelsLike":55.2,"dewPoint":54.92,"lastRain":"2018-07-22T11:15:00.000Z","date":"2018-08-04T03:18:00.000Z"},"info":{"location":"6-12-2018","name":"OIP attached to WB"}}]
Just BE NICE! That's all it takes to be a decent human...
- Dehatter
- Professional
- Posts: 349
- Joined: Sun Jan 07, 2018 5:11 am
- Location: Matthews, NC, USA
- Station model: Ecowitt WH80
- Software: Ecowitt GW1000
- Contact:
Re: Ambient Weather Network Support for Weather Networks Block
Thanks for the AW.net update. I too added it to my weather networks. Nice work!
When you select your data to be public, the site provides you the link.
The url is constant except for the last part. you could create a setup once you know the last part.
url is https://dashboard.ambientweather.net/devices/public/
id is f59317e1b28567800a30bb3035ece913 for me.
So... Complete url is https://dashboard.ambientweather.net/de ... 3035ece913
No api applied for, or given. Just made my data public under the "Devices" tab.
Created logo in B/W that works well for dark and light at http://www.tempestasvigilate.com/templa ... ark/aw.png
Tom
When you select your data to be public, the site provides you the link.
The url is constant except for the last part. you could create a setup once you know the last part.
url is https://dashboard.ambientweather.net/devices/public/
id is f59317e1b28567800a30bb3035ece913 for me.
So... Complete url is https://dashboard.ambientweather.net/de ... 3035ece913
No api applied for, or given. Just made my data public under the "Devices" tab.
Created logo in B/W that works well for dark and light at http://www.tempestasvigilate.com/templa ... ark/aw.png
Tom
-
- Advisor
- Posts: 60
- Joined: Sun Dec 24, 2017 2:22 pm
- Station model: AW WS-2000ish
- Software: Meteobridge/OIP/GW-1000
- Contact:
Re: Ambient Weather Network Support for Weather Networks Block
Pulling the data via api would be a very nice addition overall, but that is not what I was trying to do. Like Dehatter (Tom) said and I explained in my first post, I have my weather networks block manually linking to the public portion of my AW dashboard, I am just trying to replicate how WU is added via settings.php so that it can be automatically linked to in the weather networks block without the manual editing we have to do now. I tried as best I could, but never could get it to work. The zip I attached have the php files I modified, that show what I am trying to do, but don't work.
thx
Mike
thx
Mike
LOBWX wrote: ↑Sat Aug 04, 2018 3:24 am For what it's worth. You'll need a application key and a api key. Then it will spit something like this out. As you can see i have two devices listed.
https://api.ambientweather.net/v1/devic ... UR-API-KEY
- Dehatter
- Professional
- Posts: 349
- Joined: Sun Jan 07, 2018 5:11 am
- Location: Matthews, NC, USA
- Station model: Ecowitt WH80
- Software: Ecowitt GW1000
- Contact:
Re: Ambient Weather Network Support for Weather Networks Block
Well some success....
And I can get the icon to open the AW dashboard using the variable by adding this to weatherNetworksBlock:
But I cannot get setup to automatically add $awStationID to the config file when you click 'Save'...so I ended up having to manually add it.
I am close!!
Tom
I can get Main Setup to ask for AW Station Id by adding this to setup:
Code: Select all
<tr>
<td>
AW
</td>
<td>
<input id="awStationID" size="35" name="awStationID" value="<?php echo $awStationID?>">
</td>
</tr>
Code: Select all
if($showAW){
?>
<div class="networkDivWeather">
<a href="https://dashboard.ambientweather.net/devices/public/<?php echo $awStationID?>" target="_blank">
<img src="homepage/blocks/weatherNetworks/icons/<?php echo $theme?>/aw.png" class="logo tooltip" style="border-radius:5px" alt="" title="Ambient Weather">
</a>
</div>
Code: Select all
$awIcon = true;
$awStationID = 'f59317e1b28567800a30bb3035ece913';
Tom
- Dehatter
- Professional
- Posts: 349
- Joined: Sun Jan 07, 2018 5:11 am
- Location: Matthews, NC, USA
- Station model: Ecowitt WH80
- Software: Ecowitt GW1000
- Contact:
Re: Ambient Weather Network Support for Weather Networks Block
I got it.
The complete solution is rather complex to explain but simple to deploy, so If anyone wants it just PM me.
Tom
The complete solution is rather complex to explain but simple to deploy, so If anyone wants it just PM me.
Tom
-
- Professional
- Posts: 431
- Joined: Tue Feb 27, 2018 10:56 pm
- Location: OKLAHOMA, USA
- Station model: Ecowitt WS90
- Software: Meteobridge/GW2000B
- Contact:
Re: Ambient Weather Network Support for Weather Networks Block
Yes I saw this when they opened up the public link. It did seem simple when I read it as they provided a simple link such as
https://dashboard.ambientweather.net/de ... 90aacbfef7 for my station and then a more complex method that seemed simple enough but I haven't got around to adding it yet myself.
Sure Tom I'm all ears...
Andy
https://dashboard.ambientweather.net/de ... 90aacbfef7 for my station and then a more complex method that seemed simple enough but I haven't got around to adding it yet myself.
Sure Tom I'm all ears...
Andy
- Dehatter
- Professional
- Posts: 349
- Joined: Sun Jan 07, 2018 5:11 am
- Location: Matthews, NC, USA
- Station model: Ecowitt WH80
- Software: Ecowitt GW1000
- Contact:
Re: Ambient Weather Network Support for Weather Networks Block
Booo on me. I just saw your post. I will set it up tomorrow night when I get home for you to download.
Tom
Tom
- Dehatter
- Professional
- Posts: 349
- Joined: Sun Jan 07, 2018 5:11 am
- Location: Matthews, NC, USA
- Station model: Ecowitt WH80
- Software: Ecowitt GW1000
- Contact:
Re: Ambient Weather Network Support for Weather Networks Block
Andy has successfully added AW and you can too! Just send me a PM and I will get you set up!andyk1 wrote: ↑Wed Aug 22, 2018 4:10 am Yes I saw this when they opened up the public link. It did seem simple when I read it as they provided a simple link such as
https://dashboard.ambientweather.net/de ... 90aacbfef7 for my station and then a more complex method that seemed simple enough but I haven't got around to adding it yet myself.
Sure Tom I'm all ears...
Tom
-
- Professional
- Posts: 431
- Joined: Tue Feb 27, 2018 10:56 pm
- Location: OKLAHOMA, USA
- Station model: Ecowitt WS90
- Software: Meteobridge/GW2000B
- Contact:
Re: Ambient Weather Network Support for Weather Networks Block
Yep sure did. It was actually painless as Tom's direction where spot on and he actually did most of the work for me. Again Thank you Tom.