Jump to content

Polyglot NodeServer for Wireless Sensor Tags?


Chioti

Recommended Posts

Posted

Here is a simple KumoApp that sends a JSON POST from the Tag Manager (no need for firewall holes) to a specified IP (in this case 192.168.1.2 on port 5001):

var tags = <#tags_[12|13|21|26|32|62|72]_N#>;

tags.forEach(
	function (tag) {
		tag.updated = function () {
			var cur_name = tag.name
			var cur_rssi = tag.rssi;
			var cur_batt = tag.batteryVolt;
			var tag_moisture = Math.round(tag.moisture);
			var cur_temp = tag.temperature;
			var cur_temp_c = Math.round(cur_temp * 10) / 10;
			var cur_temp_f = Math.round((cur_temp * 9 / 5 + 32) * 10) / 10;
			KumoApp.Log("Temp F for "+cur_name+" updated to "+cur_temp_f);
			KumoApp.Log("Temp C for "+cur_name+" updated to "+cur_temp_c);
			KumoApp.Log("Humidity for "+cur_name+" updated to "+tag_moisture);
			KumoApp.httpCall("http://192.168.1.2:5001/", "POST", "{\"tag\": \""+cur_name+"\",\"humidity\":"+tag_moisture+",\"temp_c\":"+cur_temp_c+",\"temp_f\":"+cur_temp_f+",\"rssi\":"+cur_rssi+",\"battery\":"+cur_batt+"}");
		};
	}
);

The idea would be for a NodeServer to receive these - and expose tags as nodes to ISY. 

 

I'm currently using this to get tag data into my ElasticSearch database, from where I can graph them...

 

It would need fleshing out to modify the specific properties based on the type of tag....

Posted

Had a few mins this morning, and updated my ISY Kibana dashboard.

 

I now have my zwave Thermostat, couple of Aeotec multi-sensors and 3 CAO tags all reporting temperature and humidity on the same set of graphs...

 

dd6983daab9a364c80692d661ca40130.jpg

 

It’s also interesting to compare what my Brultech GEM sees as total power usage vs the Zigbee ISY that is getting data from my ComEd meter.... they are pretty close to each other (within rounding errors)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...