8000 Live data from Testo Smart probes · Issue #18 · testo/tjf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Live data from Testo Smart probes #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
andreasharbo opened this issue Aug 30, 2022 · 14 comments
Open

Live data from Testo Smart probes #18

andreasharbo opened this issue Aug 30, 2022 · 14 comments

Comments

@andreasharbo
Copy link
andreasharbo commented Aug 30, 2022

Hi

I have a question regarding the acquisition of live data from Testo Smart Probes.

Is it possible to retrieve data via either of the protocols (WIFI or Bluetooth) without the need for user acknowledgement?
Either via the app or from the device directly.

The devices in question are specifically:
Testo 115i
Testo 549i

I cannot seem to find a lot of documentation on these devices, in regard to custom data acquisition :)

Thank you in advance..

@gwaldvogel
Copy link
Contributor

Hi @andreasharbo

Is it possible to retrieve data via either of the protocols (WIFI or Bluetooth) without the need for user acknowledgement?
Either via the app or from the device directly.

Yes, this is possible via the testo Smart using WIFI. There is a currently undocumented endpoint GET /api/data/live which will give you the current values displayed on screen as JSON, this will work with all testo devices compatible with the testo Smart. The testo Smart API is available on port 54000.

We are currently working on completely redoing this documentation, it will be available here in the next few weeks.

@andreasharbo
Copy link
Author

Thank you for quick response.

So having the app on my phone connected to WIFI, I should be able to hit this API with something like:

´http://192.168.xx.xx:54000/api/data/live´

and get a JSON response?

@gwaldvogel
Copy link
Contributor
8000

Yes, that should work.

@andreasharbo
Copy link
Author
andreasharbo commented Aug 30, 2022

If I try with Python on my computer, I get a connection error:

urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x0000020401334E10>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it

Could it be my phone rejecting the request?

My computer is running Windows 10 and phone is Android 11.

@gwaldvogel
Copy link
Contributor

You can first try to verify that the API is working properly by calling http://localhost:54000/api/data/live in your phones web browser while the app is in the background. If that doesn't work please provide your exact phone model and the app version you are using.

@roefy
Copy link
roefy commented Aug 30, 2022

Is "Enable UDP online values" enabled?
Maybe the developer mode is therefore necessary? I don't know if I may share that info.

@gwaldvogel
Copy link
Contributor

Is "Enable UDP online values" enabled? Maybe the developer mode is therefore necessary? I don't know if I may share that info.

In earlier versions of the testo Smart this was still required, as of a few months ago these two features have been decoupled and you do not need to enable this feature anymore.

@andreasharbo
Copy link
Author

I get a ERR_CONNECTION_REFUSED in my phones webbrowser.

My phone: OnePlus Nord2 5G, Android 11, OxygenOS V11.3
My testo Smart app: 6.19.0.5861

I should say that currently no devices are connected to the app, and no measurements are being made.
I'm just investigating the possibilities.

Is it necessary to have devices connected, before the API is exposed?

@gwaldvogel
Copy link
Contributor

My testo Smart app: 6.19.0.5861

Ah, this is the problem. You are using the old testo Smart Probes app. For this API you need to install the successor app which is just called testo Smart. This is the recommended app to use for most testo devices now. You can download it from Google Play: https://play.google.com/store/apps/details?id=de.testo.smartprobesappgen2&hl=en&gl=US

@andreasharbo
Copy link
Author

I am sure this will help me a lot, thank you.

I will let you know what I come up with :)

@andreasharbo
Copy link
Author
andreasharbo commented Sep 1, 2022

Hello again

I got some probes now, and it works very well. Very smooth probe/app experience so far.

{'46266212': {'DeviceId': 'T410i',
              'Serial': '46266212',
              'Temperature': '26,7°C',
              'Velocity': '0,00m/s'},
 '46323539': {'AbsHumidity': '21,42g/m³',
              'AirTemperature': '28,2°C',
              'DeviceId': 'T605i',
              'DewPointTemperature': '23,9°C',
              'Humidity': '77,8%RH',
              'Serial': '46323539',
              'WetBulbTemperature': '25,0°C'},
 'AppVersion': '15.7.13.63980'}

Now I have configured, in the app, a measurement of temperature difference between the two probes.
Can I somehow retrieve this measurement with the live data as well?

Cheers

@gwaldvogel
Copy link
Contributor

Can I somehow retrieve this measurement with the live data as well?

Currently the live endpoint only exports device data, no measurement application specific data (e.g. differential temperature, etc.) is available. Is this something you need for your application? If you give me bit more context (relevant data, measurement application, etc. - the more info the better) I can file a feature request for you and we can check if we can include this feature in a future release.

@andreasharbo
Copy link
Author

Alright, I'm not exactly sure what the application is at the moment, so I cant relay more information.

We can solve the problem on our end for now, but when I know more I will make a new issue here :)

Thank you for the help so far!

@andreasharbo
Copy link
Author

Hi

Coming back to this issue, due to updates in the Testo Smart app. The JSON keys have changed between versions.

So my question is how is it going with documentation of the returned data for the different porbes :)
That way i can keep my app supporting your probes.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0