Greenway Projects

This is the home of all Greenway projects

Cadbury Egg Weather station

there is a tiny fan powered by the solar cell that keeps it from cooking in the sun, also the silver paint helps

Currently we have weather, room, power, irrigation and cat flap

Here is an HTML Java Script Angular client for the weather station

https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js
https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js

  <h3>{{x.Name}}</h3>
  
  <table>	
	  <tr ng-repeat="y in x.Results" id="field-{{x.id}}" class="tabcontent-field" >
		  <td style="padding-right:2em;">{{y.Key}}</td> <td>{{y.Value}}</td>
	  </tr>
  </table>

</div>
var app = angular.module('myApp', []);

app.controller(‘myCtrl’, function($scope, $http) {

var things = [];

//WEATHER
things.push({
	"id": "weather",
	"Name": "Weather",
	"Url": 'https://api.thinger.io/v2/users/Greenway/devices/Weather/Weather',
	"Auth": 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkZXYiOiJXZWF0aGVyIiwiaWF0IjoxNTIyNDQ3ODQ3LCJqdGkiOiI1YWJlYjVlN2RkOWRmMDM1ZjFjZDdmZWEiLCJ1c3IiOiJHcmVlbndheSJ9.LN_acReY5S_j_eYcBv-JCMkIXYouuElYcqAe5KN8sSA',
	"Results": ""
});



//devices
$.each(things, function(index,obj){
	
	var thing = things[index];

	$http({
          url: thing.Url,
          headers: {
              'Authorization': 'Bearer ' + thing.Auth
          },
          method: 'GET'
      }).then(function(response) {

	  var items = [];
				  
	  $.each(response['data']['out'], function (key, value)
	  {                  
		  items.push({
			  "Key": key,
			  "Value": value
		  });
	  });
	  
	  things[index].Results = items
	  
	  $scope.Things = things; 
  		
	});
  
  
});

});

Ardu rover

WeMos D1 Thinger and a PTZcamera hacked into a rover