As TTN v2 has been replaced with v3 I have rewritten the adapter to support the new protocol. I have been using for over a year (started in v2) with over 50 adapters.
Some highlights:
Supports setup from the UI
Devices and channels can be renamed using the adapter extra settings
Can be installed/updated with HACS - add as extra repository
Great that you made a new adapter for TTN V3 .
Installed it and it works .
I have one problem and maybe you can help me .
I have a Lora node (The things node) which provides 4 different values
1 Battery level
2 Event ( shows a value ''button" when the button on the node is pressed )
3. Light
4.Temperature
only the event works correct
Now with Temperature i get as a value in HA āNaNā
and for battery i get ā1026ā (its has 4.5 volt power
and for light i get ā465ā
I saw that your integrations has ā'fieldsā settings , how do i put these right?
Or is there something in my TTN Applications settings which is not correct ?
The integration just displays the states as parsed by TTN - from the values you have it looks like those are raw values and not human readable. You can set parsers in TTN to convert what your Node sends to Volts or Ā°C.
The fields setting allow you to define the mapping from fields (the different values parsed by TTN) to Home Assistant states. I use the Cayenne format in my Nodes so the fields in TTN are called <measurement type such as digital, analog, temperature>_<channel> so in my integration I renamed those to what they represent in the sensor such as version or inside_temperature
You can also use the fields setting to assign info missing in TTN but useful in HA such as icon and unit name.
Check the payload formaters. If your device uses Cayene then you can select it and you are done. If you mix devices or your device has its own format for the payloads either the javascript (what I use) or the (new with TTN3) Repository formaters will be needed.
You need to ensure that when you receive an uplink the formarter adds a decoded_payload that has the different sensors and their human readable values into them. Example:
The raw is what TTN received from the device and the other values are added by the payload formater. The TTN consode allows to test your formater until it looks good. In case you need help with this part they have a forum where if you post your device they might point you to existing/recomended formarters.
I mostly use my own built PCBs so I am not so familiar with commercial Lorawan devices and their payloads. And in my devices I ensure to use Cayene as format to keep it simple so I mostly do not have to touch anything in TTN when I add new devices. Kind of like esphome but for lorawan devices
Great with your help it works now like i want.
I just needed to put a uplink payload formatter javascript.
and they had a thingsnode example file at their website
And now all my sensors show the correct value.
and i can go further, and put my mailbox notifier in my letterbox to see when mail is dropped (8 floors down.
I connected a reedswith to the button on my node, so when the lid goes open i get notified.
However, unlike the Dragino sensor, I can not configure the adapter in Homeassistant: It simply does not appear in the overview of the plugin => Devices. I only see the Dragino Sensor:
Cannot find it in the integrations as described though - can you please advice if the above repository is the correct one? Thanks
Update: Now I have it: It did not show up as I used Home Assistant with the German user interface.
After I changed the language to English it showed up and all is fine.
Let me know if (and how) I can help with translation to German if you like.
I should be able to register it HACS to make it easier to find if enough people want to use it. The other option would be replacing the default core integration as it will not longer work (TTN v2 only).
I assume you had to manually tweak the URL for the TTN backend - I still have to add the option to change it in the adapter endpoint. Maybe next weekend
Thanks angelnu for providing this integration! I noticed that your were just working on it these days. I have just entered the world of LoRaWAN & TTN and I thought adding the first sensor to my HA installation would be easy going. Not only is LoRa & TTN confusing enough (itās CB radio of 70s combined with internet) but the installation of your adapter was a nightmare of user experience. I am not blaming you for this. It is what it is. Needed to upgrade HA docker image on my QNAP NAS. SSH dive into it and install HACS with shell script. Create GitHub account for verification. Enable persistance in TTN and create mile long IDsā¦ But finally I got my first LoRa sensor result in HA. I am happy and thanks for it!
Yep, it would benefit from a good Getting Started tutorialā¦ As you say configuring the devices, attaching them to TTN, configure the storage plugin and then finally deploy the adapter to HA is a lot to learn before you get the first data to play with.
But afterwards is a lot of fun and, with devices ready with low battery usage, a very low maintenance cost.
All up to date and running on a proxmox vm. Got other repositories installed. Going to try adding another repository to see if it is a generic issue with my new installation.
Home Assistant Core 2022.5.5
Home Assistant Supervisor 2022.05.3
Home Assistant OS 8.1
Logger: homeassistant.components.hassio
Source: components/hassio/websocket_api.py:120
Integration: Home Assistant Supervisor (documentation, issues)
First occurred: May 24, 2022, 9:29:37 PM (14 occurrences)
Last logged: 6:53:08 AM
Failed to to call /ingress/validate_session -
Failed to to call /supervisor/options - Invalid Add-on repository!
Failed to to call /supervisor/options - expected a URL @ data[āaddons_repositoriesā][4]. Got āGitHub - angelnu/home_assistant_thethingsnetworkā
Failed to to call /supervisor/options - expected a URL @ data[āaddons_repositoriesā][4]. Got āhacsā
Thanks for getting back to me. I was doing it the same way as the other add-ons. From the latest version, it is settings > add-ons > ADD-ON STORE > repositories then paste the github address into the Add field. I was surprised by the mention of supervisor in the logs but thought that was a legacy thing.