Page 1 of 2

LoRa

Posted: Wednesday 11 November 2015 14:32
by Eduard
Hi all,

Since LoRa is rolling out in some big places in The Netherlands and the biggest telecom provider also has plans to roll out natively, i was wondering if it would be possible to add support LoRa in Domoticz. Has anyone experimented with LoRa in combination with Domoticz?

It is relativly easy to create a LoRa gateway so it seems. See http://www.pi-in-the-sky.com/index.php? ... ra-gateway
and http://ava.upuaut.net/store/index.php?r ... uct_id=121

I see great advantages!!

Re: LoRa

Posted: Saturday 28 November 2015 23:42
by PeterFleur
Sounds cool. Are there already some consumer products available with these?

Peter

Re: LoRa

Posted: Sunday 31 January 2016 22:22
by ivom74
Eduard wrote:Hi all,

Since LoRa is rolling out in some big places in The Netherlands and the biggest telecom provider also has plans to roll out natively, i was wondering if it would be possible to add support LoRa in Domoticz. Has anyone experimented with LoRa in combination with Domoticz?

It is relativly easy to create a LoRa gateway so it seems. See http://www.pi-in-the-sky.com/index.php? ... ra-gateway
and http://ava.upuaut.net/store/index.php?r ... uct_id=121

I see great advantages!!
would be great to make a gateway for the zwave products to the lora/thing network.
Are there lora nodes available in the netherlands? for example sending gps location of an object?

Re: LoRa

Posted: Friday 26 February 2016 22:38
by PeterFleur
I saw a report about probably LoRa in the Netherlands just now on Dutch tv. Looks like Amsterdam is fully covered right now

Re: LoRa

Posted: Friday 26 February 2016 23:42
by Derik
What are the options with a lora network for me?

Re: LoRa

Posted: Tuesday 12 July 2016 13:26
by uppervillage
Consumer products in holland coming in september:
https://shop.thethingsnetwork.com/

Re: LoRa

Posted: Sunday 07 August 2016 12:30
by gizmocuz
Well, there is the problem with the 'fair usage' policy. ....you are not able to transmit a lot of times, and data should be short
But, it also depends on which network you are connected too.
For instance, if you made a Lora node that transmits a temperature, and using The Things Network, then you can use their MQTT broker service to receive it.
As you do not want to transmit a complete MQTT diagram that Domoticz directly supports (because of the fair use policy, and bandwidth),
you might as well code an in between application that pushes this to Domoticz via virtual sensors.

Going out from domoticz to Lora, should not be to hard, but here again, mind the fair usage policy !
You can create an lora gateway (arduino + dragino shield for example), and send data via serial, the serial data is then transmitted via Lora

Hope this makes some sense ?

Re: LoRa and The Things Network (TTN)

Posted: Tuesday 16 January 2018 10:49
by Bernd
gizmocuz wrote: Sunday 07 August 2016 12:30 For instance, if you made a Lora node that transmits a temperature, and using The Things Network, then you can use their MQTT broker service to receive it.
I would like to re-activate this thread.
I have a sensor, working on the LoRa network TTN (The Things Network). I see the data in my Console page and would like to link that to Domoticz.

My weather station is connected over Weather Underground to Domoticz, so a similar solution for connecting LoRa-TTN nodes should be possible as well.

Before I dig into MQTT myself (it is all brand new to me) I was wondering if there are smart people around here who already solved this and would like to share it.

Thanks,
Bernd

https://www.thethingsnetwork.org/docs/applications/

Re: LoRa

Posted: Tuesday 16 January 2018 11:12
by emme
... :oops: :oops: what is LoRa?!

..I see... If I don't know it, then I don't need it!! :lol: :lol: :lol:

Re: LoRa and The Things Network (TTN)

Posted: Friday 19 January 2018 2:09
by costo
Bernd wrote: Tuesday 16 January 2018 10:49
I have a sensor, working on the LoRa network TTN (The Things Network). I see the data in my Console page and would like to link that to Domoticz.
I agree with Bernd,

I would very much like to see a sort of virtual hardware device that bridges between the TTN network and Domoticz.

Re: LoRa

Posted: Sunday 11 February 2018 12:41
by PieterS
Should be nice feature! Most of my sensors do not need high frequence.

If there is any possibility I would use it. :roll:

The Things Network (TTN)

Posted: Friday 23 February 2018 20:42
by Bernd
I have looked into what is needed to link TTN to Domoticz.
It will take me another year to puzzle that all out and build an application.

If anybody on this forum has the time and the plan to create an API, based on one of the tools mentioned here https://www.thethingsnetwork.org/docs/applications/, I would be extremely happy. :D

In the meantime I will try to give it a start, but it is not my peace of cake .... :(

Re: LoRa

Posted: Friday 23 February 2018 21:21
by kiddigital
I already started a bit on this topic a few weeks back but time is sparse :)
Not rocket science so I hope to get something out over the coming months...


Verzonden vanaf mijn iPhone met Tapatalk

Re: LoRa

Posted: Monday 26 February 2018 16:15
by Bernd
Sounds great.
Which of the API-tools are you considering? Than I can start walking the same road.

It surely isn't rocket science for people, familiair with coding etc.
I have my footsteps in radio engineering, RF, etc. A whole new area at my door, this interfacing issue ... 8-)

Re: LoRa

Posted: Friday 23 March 2018 10:18
by dude
Hi,

Have my lora gw up and running here. Sensors are reporting. Commands can be send via Lora.
I assume MQTT connection is the way forward to integrate into Domoticz ?

Code: Select all

mosquitto_sub -h <Region>.thethings.network -t '+/devices/+/up' -u '<AppID>' -P '<AppKey>' -v
This works on my domoticz pi, i get the sensor data on the pi.
I'm now looking into how to integrate this with the MQTT gateway of Domoticz, anybody experience with this ?

thx Gerard

Re: LoRa

Posted: Tuesday 27 March 2018 13:56
by costo
I am getting TTN data into my Domoticz in the following way:

First I added the “data storage” integration to my TTN application.
In the integration overview the link: "go to platform " leads you to a customized Swagger page. There I choose “query/{device-ID}” filled in device ID and a time (5 to 15 minutes)
Click “try it out!”.
That gives you a CURL string. This string is the key that you enter in a LUA script running in Domoticz.

In Domoticz I use a LUA script like this:

Code: Select all

    local idxVolt = 643 -- virtual sensor for monitoring battary of node 
    local idxT_H  = 642 -- virtual temp/humidity sensor

    commandArray = {} 

    time = os.date("*t")
    if  ((time.min % 5)==0)  then         -- Run every 5 minutes.

        json = (loadfile "/home/pi/domoticz/scripts/lua/JSON.lua")()
	    local config =     assert(io.popen("curl -X GET etc-etc... between brackets the exact curl string from swagger page..."))
        local devices = config:read('*all') 
        config:close()

        local dataLoRa = json:decode(devices) 
        if (dataLoRa == nil) then                      -- if no data available then
            print ("dataLoRa-1 string is empty  ")     -- prints this text in the logfile when no data
        else                                           -- if data available extract json results from it 
            local hum  = dataLoRa[1].hum               -- the [1] selects the first dataset from data storage, this does not need to be the
            local temp = dataLoRa[1].temp              -- last dataset received in TTN, if ?last=5m selects the time period for the TTN data
            local volt = dataLoRa[1].volt / 1000       -- converts millivolt to volt
            commandArray[1] = {['UpdateDevice'] = idxVolt .. '|0|' .. volt}
            commandArray[2] = {['UpdateDevice'] = idxT_H .. "|0|" .. temp .. ";" .. hum .. ";0"}
            print ("data from TTN imported")           -- prints this line in log if succesfull
       end
    end

return commandArray
result in domoticz like this:
https://drive.google.com/file/d/0B8byxN ... p=sharing

Re: LoRa

Posted: Sunday 02 August 2020 21:12
by kiddigital
kiddigital wrote: Friday 23 February 2018 21:21 I already started a bit on this topic a few weeks back but time is sparse :)
Not rocket science so I hope to get something out over the coming months...


Verzonden vanaf mijn iPhone met Tapatalk
This topic is relative old but maybe relevant again as it is only one of a few topics on Lora and LoraWAN (and The Things Network aka TTN).

From Domoticz 2020.2 the TTNMQTT module is greatly improved and it is now easy to get your Lora TTN data into Domoticz.

See this Wiki page for more details.

Re: LoRa

Posted: Monday 03 August 2020 0:58
by timberwolf
Are there any plans to implement sending commands to the Things Network? I would love to be able to set switches in my device from Domoticz.

/Magnus

Re: LoRa

Posted: Monday 03 August 2020 21:02
by kiddigital
timberwolf wrote:Are there any plans to implement sending commands to the Things Network? I would love to be able to set switches in my device from Domoticz.

/Magnus
No plans yet, but if you can provide a good example case (preferably including an example data exchange), I can have a look to see if it is easy or not..

Re: LoRa

Posted: Wednesday 10 November 2021 17:39
by kiddigital
Since Beta build 13871 (or higher), the TTNMQTT module now connects to the Community Edition (v3) of The Things Network and handles the new message format of v3.

@bernd, @dude, @costo, @timberwolf, stil using LoRa/TTN? Wondering if this v3 works for you as well. Thx for any feedback.