Hey,
I've just started experimenting with the local (HTTP) API. First of all, the documentation for it sucks. I can't understand how the documentation can be nearly non-existent. I have to bounce around testing the Live API, reading the documentation of old C API etc. Without being used to the old C API found in Tellstick Duo, I would have been totally lost.
But once I got around the issues with documentation, I ran into an interesting issue... There is no information about the last update of sensor value in the local API at all. This information is fairly critical to estimate if the sensor value should be trusted or not, especially when using the values to set the state of heating etc.
Is there any workaround to get the last update time of a sensor?
-Kipe
Sensor last update in local API
Moderator: Telldus
Re: Sensor last update in local API
I think this is "by design".
Re: Sensor last update in local API
Are you refering to the fact that there's missing a keypair for time in the JSON object i agree. If that's not what you refer to, please explain further.
I've build functions for Node Red to access the local API and a Python script. You can have them booth if that helps.
This is sample output from my python script.
I've build functions for Node Red to access the local API and a Python script. You can have them booth if that helps.
This is sample output from my python script.
Code: Select all
{
"battery": 100,
"id": 77,
"model": "n/a",
"name": "MoSens.Ute.Frontdoor",
"novalues": true,
"protocol": "zwave",
"sensorId": 77
},
Re: Sensor last update in local API
Might not be the easiest way to solve the issue but you could always simply listen in on the eventListener on the Tellstick. That will provide you with all the sensor data the telldus hears.
The syntax is not as easy to read as a JSON object but it's fully possible.
The syntax is not as easy to read as a JSON object but it's fully possible.
Re: Sensor last update in local API
I have had a discussion with the support about this. The problem is that the last update value is not exported in the local api. The value exists. They say that they have no plan when it can be fixed.
I have tried to implement it my self, I do not think that it is that much work. Just a few lines of code. The problem is how to test it?
I have installed a local tellstick server on a Ubuntu machine and deployed my changes, but I do not have any sensors that reports values to it. I have tried to install the yr plugin localy but with no success.
If somebody has a working testenvironment please tell me! I can send my changes and maybe somebody can test them.
I have tried to implement it my self, I do not think that it is that much work. Just a few lines of code. The problem is how to test it?
I have installed a local tellstick server on a Ubuntu machine and deployed my changes, but I do not have any sensors that reports values to it. I have tried to install the yr plugin localy but with no success.
If somebody has a working testenvironment please tell me! I can send my changes and maybe somebody can test them.