Platform Integration Works, but Telemetry doesn't get displayed Thingsboard PE 3.2.2 - thingsboard

I successfully setup a Platform Integration, as you can see from the attached screenshot everything seems working fine, but in the device telemetry view nothing gets display.
No telemetry is added to the device, despite the fact that Integration works as expected

The output of the Integration does not automatically save the anything. All it does is transform the data into a format that can be processed by the Rule Chain. Do you have a Device Profile set up for pHMeter? If you do, does that go to a specific Rule Chain? If it does, are you saving the telemetry in the Rule Chain? If yes to all, turn on debug mode and check each node to see where the problem is.

Related

"Cached element do not exists in DOM" when run Appium with Robot Framework

I'm working on automated test using Appium with Robot framework on Android device. I create schedule run on Jenkins. My test flow is entering some data in page A and submit, then switch to page B to check the result and switch to page A to enter a new data. I repeat this loop for around 10+ time. Everything works fine in around 4-5 rounds but after that there show up an error :
StaleElementReferenceException: Message: Cached element 'By.xpath:
//android.widget.TextView[#text='Limit']' do not exists in DOM anymore
The TextView is in the page A. I monitored the robot and saw that the TextView was shown up but the robot did not see it. I tried restart the device but the problem is not solved. I search through the internet and found some who facing the same issue but they use different programming language like Java or Python. I have no idea what I have to do next.
Development Tools :
Appium version: 1.21.0
Robot Framework version: 4.1.2 (Python 3.10.0 on win32)
First I do not use Robot Framework, but the code should be similar according to this https://robocorp.com/docs/languages-and-frameworks/robot-framework/try-except-finally-exception-catching-and-handling.
Second, I'm not sure if this is the best way to get around this. I think there is something you can do with the expected conditions class to get around this in a "cleaner way" but I'm not quite familiar with it enough to show/tell you. Instead what I've done is something like this...
from selenium.common.exceptions import StaleElementReferenceException
while some_limiting_factor:
try:
# logic for submitting page A, assertions for page B
except StaleElementReferenceException:
element = driver.find_element('By.xpath: //android.widget.TextView[#text='Limit']' )
As much as I want to cache elements in appium, it seems that the service itself does NOT want you to, at least not in my experience. Getting a fresh element(s) every time seems to ensure a "slow but steady" test. Hopefully someone can show me the deep appium secrets one day.

Difference in manual execution of running app in background and runAppInBackground() using appium

While executing runAppInBackground() for Android application through Appium the app gets restarted but when executed the same manually couldn't be able to reproduce the same. I Would like to deep dive into implementation of a runAppInBackground() method to reproduce the same issue in a manual way.
You need to look behind the code of runAppInBackground
From java client side (your test code) perspective, it is a single call to Appium server:
POST "/session/:sessionId/appium/app/background"
If you continue looking into where its implemented on server side, you finish with appium-android-driver function.
In short what it does:
Get current activity and package
Press physical Home button
Wait for time you provided as argument (seconds)
Bring up back in focus based on different conditions; from the code you can understand what activity is being started
Basically its a sequence of adb shell commands, that you can run from terminal.
My guess is that step 4 you did manually may differ from what Appium is doing: different activities/arguments for activity been called

view iphone console logs without a mac

Is there a way to view the iphone console logs without having a mac ?
It used to be possible using the iPhone Configuration Utility but it does not seem to be available any longer.
I saw a tool called iTools but it seems to require a 32bit version of itunes which is also not available any more.
Given an iPhone device + windows + linux, Is there any workaround / tool to view the iphone console logs?
Realizing it is over half a year ago you asked this, but since it does not have an accepted answer yet:
I ran into this very same issue over and over, and got fed up with it, so I decided to have a go at writing a script that displays console messages in HTML, so you can just view everything in the webpage itself, without having to resort to a console-replacement or a tedious remote debugger (for which you, indeed, require a Mac), without having to modify each console call in existing code.
The key lies in 'replacing' the four main functions in window.console: log, warn, error and trace. This is done by redifining each method, adding own code to that, and calling the original method in the end. Jakub Fiala wrote the basic script for that, on which I built the rest: https://gist.github.com/jakubfiala/8fe3461ab6508f46003d
I dubbed it 'MobileConsole'. It is quite unobtrusive and will 'catch' all console.log (or .warn, .error or .trace) events, and even bind to window.onerror.
I have created a separate page for this script with an elaborate explanation on how it works, including a demo, over here.
Download this from the app store onto the iphone, you can then view logs directly on the phone:
https://itunes.apple.com/us/app/console/id317676250?mt=8
Please note, this is an old app, it will crash when launched, then on reopening it will show you the device logs.
If that fails, here is a link to the iPhone configuration utility for windows:
http://download.cnet.com/iPhone-Configuration-Utility-for-Windows/3000-20432_4-10969175.html

How to prevent load of meteor.local (when building ios app with phonegap)

This is an extension of a question I asked here, which went unanswered. I am attempting to use the Meteor app on my iPad that I'm hosting on my own remote server. The issue is that when I run the following command, the app builds successfully:
sudo meteor run ios-device --mobile-server=XXXX:XXXX
The problem begins when I click the build button in Xcode to deploy the app to my device. It seems to build everything OK and even load the data from my remote server. But after a few seconds, it reverts back to a local database/build. When I check the Xcode log, it says "Finished load of http://meteor.local/" so it seems to be overwriting the remote data with new, local data. I'm not sure if I have something enabled that's causing Xcode to load a local database or if there's something that I have to turn off to prevent it from loading.
UPDATE:
I've resolved the issue using the suggestion from Jey DWork to apply the missing environment variables in the Meteor server startup.
The ones I added were:
Meteor.absoluteUrl.defaultOptions.rootUrl
process.env.ROOT_URL
process.env.MOBILE_ROOT_URL
process.env.MOBILE_DDP_URL
Without setting these, the ROOT_URL seemed to be getting overwritten after the initial load. As these environment variables do not seem to be documented, I'm still going to search and see if there is a different solution to this issue (as it seems strange that the app would have to re-load itself multiple times before it's usable). For now though, this is a temporary solution.
Have a look at this post :
I've understood my problem, maybe your problem is the same, all explanations here : stackoverflow.com/questions/34658956/
Your app for smartphone must be built with --server=http://IP:PORT parameters
And
Your app for server must be started with --mobile-server http://IP:PORT parameters

UIAutomation bringing iOS app to a consistent state

I writing JavaScript test for my iOS app. I am hoping of using Apples Profiler and UIAutomation.
1) I was wondering how can I reset the app every time I run the test. I would like to reset my app to a consistent state every time before I run a new test. Have separated my tests into few groups. Every test of the first group should start on the first screen containing a tableView and filters for sorting elements in that table should be set to a consistent state. Second group of tests should start on the Settings screen and some options/switches should be pressed in particular order for me to test the UI.
2) Also first time the app starts there is a tutorial. How can I make the app think it is freshly installed and test the tutorial feature.
Thanks for the answers
How can I make the app think it is freshly installed ?
As the iOS applications are sandboxed, the only way is to delete and re-install the app every time.
In the Illuminator framework that I wrote (which extends UIAutomation), we provide an automation bridge that allows us to send "reset" commands to the app, putting it into a known state before each test is run. This makes the testing very repeatable, even if some tests fail.
Additionally, the command line scripts can recover the test run even if the app crashes.

Resources