Comments (7)
Try to remove dash from the variable name, e.g. rename humidity-1 to humidity1 .
from thingsboard.
It's same result. I got result as { "humidity1":$humidity1.valueAsString}.
from thingsboard.
Strange that it happens just from time to time. Here is my Kafka plugin template:
{"geoZone" : "TEMP-001", "windSpeed" : "$temperature.valueAsString"}
The only difference with your case is that I have "$temperature.valueAsString" in double quotation marks. Hopefully that helps!
from thingsboard.
@soupim Is it possible that sometimes you are sending message from device that does not have humidity, and in this case we don't know how to map the value to the expression?
from thingsboard.
@ashvayka @setevik00 Thank you! I found my problem. My device sends temperature as well as humidity. Two values are sent in each message. When sending temperature, the humidity value is not included. The device send humidity once every 3 seconds and temperature once every minute. This seems to have caused problems. How do I set a rule to check if telemetry contains humidity?
from thingsboard.
I think you have to create two rules. First rule will check that both temperature and humidity are present and send them out via kafka plugin. Second rule will check that only temperature is present.
First rule:
typeof temperature != 'undefined' && typeof humidity != 'undefined'
Second rule
typeof temperature != 'undefined' && typeof humidity == 'undefined'
I'm not sure, but think that in second rule you have to check specifically that humidity is undefined, otherwise you will have duplicated data as both rules will apply for the same telemetry data.
from thingsboard.
@setevik00 Thank you!
from thingsboard.
Related Issues (20)
- Challenge with Displaying Data from Multiple Devices in Custom HTML Widget using Aliases HOT 2
- Data keys for related entities in widgets.
- Select for which data keys show tooltip and aggregated data in timeseries graphs
- How can I grant a user group permissions to only view a single dashboard group? HOT 1
- Map marker images not displaying HOT 1
- Alarm audit
- Huge growing latency in message processing
- Export data from entity table: aggregation not taken into account HOT 1
- Alarm duration sometimes does not work
- [VCS] Another default device profile is present in scope of current tenant
- Subscribe to a device telemetry HOT 2
- Implementing similar data from two devices in a rule chain for summing and averaging
- Cannot edit 'Navigate to other dashboard' action of widget of dashboard imported from another tenant (not VCS)
- Dinamically update action button icon color using device attribute value HOT 3
- How to use Notification rule node? HOT 1
- Failed to send message via FCM: SenderId mismatch and User doesn't use the mobile app
- Mystified by Sum aggregation HOT 1
- SMS provider settings:The drop-down menu cannot be selected and the page will get stuck!!! HOT 1
- OAuth2 Cannot save after adding HOT 1
- Errors, after upgrade from 3.6.2 CE to PE
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thingsboard.