The Things Network (TTN) - new adapter for v3

Ah okay, thanks very much… still a newbie! :smile:

Working perfectly now… thanks for your help angelnu!
Best wishes from Scotland
Tommy

1 Like

Hi Folks, I cant seem to find the integration in HACS? Any idea what I am doing wrong?

You need to add the repo first. I was planning to try a pr in core first and only add to hacs if not accepted there.

You know what they say… you learn something new every day. Many thanks for your help. Working perfectly with Elsys ERS sensors

Great job. Thank you very much!
At first, I tried to integrate the sensor by using MQTT. But HA can only handle one server, and the TTN integration only provides its own. So your updated TTN integration is very appreciated.

Hi,

I have three sensors configured in TTN as 3 separate Applications in TTN v3
(Australian servers except for the identity server which is in EU).
They are also working fine in Cayenne dashboards.

I’ve installed your integration through HACS and can see it installed.
In TTN console, I’ve added the Storage integration for each of my sensors and created API keys for each of them for this TTN adapter integration to use.

I cannot see any device or entity for the sensors in HA.

I have created an issue in github but have not received any response so thought I would see if it is still active.

Thanks in advance for any help or advice.

I’ve got the same issue, do you it still?

Yes, unfortunately.

I suspect that this add-on is no longer being supported as there has been no contact.

working for me, I used the wrong API key…

Is it possible to add/monitor the gateway in HA?

Hi, I have install integration TTN via HACS… ok, but where found “Access Key” in my application console v.3 ??? Thanks for help me…

that’s the API key in TTNv3

Perfect, all ok now, thank you very much.
Kind regards

1 Like

Hi @angelnu

I have been using the TTN v3 addon for a few months. It worked straight away and I can see my 2x TTN devices in home assistant.
I am having an issue with some metrics not updating.

So. My device has been configured with a first fetch time of 1 hour and a refresh period of 3600 seconds (1 hour)
My device has 4x entities. Each hour I can see 1x of the entities is updated automatically. But 3x of the entities don’t get updated and only seem to be updated every few weeks!

If I reload home assistant or the things addon then they all correctly update.
I actually have 2 devices configured (a GPS and a soil moisture sensor) both devices are exhibiting the same issue with only 1x of the entities on each device being updated each hour.

Can you think if there is anything I am doing wrong?
Whats the best way to debug the addon?
Is anyone else seeing this issue?

Regards
Ben

Great adapter, it works perfectly with “The Things Node” and the CayenneLPP. Due to the way it works (storage engine & polling) it is of course not real-time.

Has anyone tried to use the MQTT gateway to get the sensor data into home assistant?

Great add-on. I have it working with more than 4 devices. I have now a GPS device that sends the GPS location, but I don’t see that back in in HA. This is a part of JSON message (that is parsed on TTN with the payload formatters):

decoded_payload": {
“batteryLevel”: 251,
“containsGps”: true,
“containsOnboardSensors”: true,
“containsSpecial”: false,
“crc”: 207,
“gps”: {
“altRef”: 21.5,
“cog”: 333,
“hAcc”: 27,
“hdop”: 2.8,
“latitude”: 52.0951231,
“longitude”: 5.2775035,
“navStat”: 3,
“numSvs”: 5,
“sog”: 0.1,
“vAcc”: 48
}’

I see battery level and others, but GPS not. Any idea?

Is it that, you are looking for?

I don’t see the lat and long back in HA (GPS unkown as entity of the sensor in HA). I understand that I see it in the JSON parser on TTN.

2022-11-16_19-24-03

Just installed this and it pulled in my sensors just fine.

One problem: For two temperature measurements, I was able to override the device_class (to temperature) and the unit_of_measurement one to °C

The problem: Now it displays the sensor in Celsius while the system is set to imperial.
According to the Sensor Entity Developer Docs, I guess usually one would just set the native_unit_of_measurement to °C and then let home assistant handle the conversion.

Sadly, that doesn’t seem to be possible. Not matter what I do, best I get is the celsius value as “°F”.
I was not successful with ‘customize’ entries.
Without manually creating a template sensor, has anyone be able to get Fahrenheit out of a Celsius sensor?

I think the current integration allowing to set unit_of_measurement rather than native_unit_of_measurement might interfering with overrides?