Just to share with you.
A couple of days ago an interesting for the people and by the people project opened on Kickstarter: TheThingsNetwork.
It uses the long range LoRaWan technology. Potentially this is an interesting complementary technology to Zway, but also other home automation solutions. It can help you connect to sensors too far away for Z-Wave. It typically deploys low power remote battery driven sensors that can last for a couple of years.
This citizen maintained network is completely free and open source. Not only the software, but also the hatdware. No controlling companies. For example citizens and small comapnies set up a network covering Amsterdam in a matter of 6 weeks. The major focus of the Kickstarter project is to make a very low cost (~200 EURO) gateway. These gateways have a range in the order of 10km.
Do not confuse this network with internet. Some people do call in Internet 3. I think that is wrong. It is a slow but reliable and safe data network. It does interface using for example with http, so perfectly usable with ZWay.
For more detail see for yourself at the links I provided.
Additional usefull links
LoraWAN - The Things Network
Re: LoraWAN - The Things Network
It think I got the concept of TTH and I think that the project is really really interesting.
Unfortunately, I don't have the knowledge necessary to try it...
Unfortunately, I don't have the knowledge necessary to try it...
Re: LoraWAN - The Things Network
Neither have I yet.albertov wrote:I don't have the knowledge necessary to try it...
IMHO the real importance of TTN is not so much in the technology, but in the fact that in principle it is a completely free and open network setup by users for the users. Still, as a gateway owner, you have the means to make your node and your sensors as open as you want.
I have ordered the gateway hardware, but it will take some time before it arrives here. For brave people there are some DIY projects like this
Re: LoraWAN - The Things Network
I am in the proces of making a TTNLoraWAN module. I have successfully managed to get temperature readings with OpenRemote. On the ZWay side I do have problems (due to may lack of knowledge) to parse the JSON data I receive from the Demo handler service. The JSON looks like this:
With OpenRemote (JAVA application) I can retrieve the temperature value of the first record with JSONPath expression:
I have tried several variations on this but all end in JS errors or no returned values. Below a snippet of the relevant code that is derived from the OpenWeather module:
Code: Select all
[
{
"node_eui": "02013101",
"data_plain": "{\"node\":\"THINGSIO_1\",\"temperature\":18.32}",
"data_json": {
"temperature": 18.32,
"node": "THINGSIO_1"
},
"data": "eyJub2RlIjoiVEhJTkdTSU9fMSIsInRlbXBlcmF0dXJlIjoxOC4zMn0=",
"time": "2015-11-11T11:31:05.555634146Z",
"data_raw": "gAExAQIAAQAGYm6YGoug2hMN1MuDh/Sz8KF0sNeKLDNfA9vgRhtFdn5hfGuGw/dAd08ZGu2n",
"gateway_eui": "1DEE15E85FA7DCEF"
},
<multiple similar records
]
Code: Select all
$..data_json.temperature[0]
Code: Select all
erroneous code removed
Re: LoraWAN - The Things Network
Probably something like
Code: Select all
http.request({
url: "http://thethingsnetwork.org/api/v0/nodes/02013101/?format=json",
method: "GET",
async: true,
success: function(res) {
var data = res.data;
if (data instanceof Array) {
var first_entry = data[0];
debugPrint(first_entry.time, first_entry.node_eui, first_entry.data_json.temperature);
}
else
throw "Invalid data format";
}
})
Re: LoraWAN - The Things Network
@pofs
Thanks it works
Thanks it works
Re: LoraWAN - The Things Network
I tried to get the path to the data(data_json.temperature) from the module's configuration screen.pofs wrote:Code: Select all
// fragment of your code var data = res.data; if (data instanceof Array) { var first_entry = data[0]; debugPrint(first_entry.data_json.temperature);
Therefor I changed my module's code from:
Code: Select all
self.vDev.set("metrics:level", first_entry.data_json.temperature);
Code: Select all
self.vDev.set("metrics:level", "first_entry." + self.config.sensor);
but it is treated as just a string value and not as a "pointer" into the array.
How do I get that right?
Re: LoraWAN - The Things Network
This is solvable using eval(), but eval is evil
first_entry.data_json[self.config.sensor] can be used is self.config.sensor contains "temperature"
first_entry.data_json[self.config.sensor] can be used is self.config.sensor contains "temperature"
Re: LoraWAN - The Things Network
You made my day! Thanks