[Solved] No data/payload with connected device

Yes I followed the guide very closely I also deleted and started afresh to make sure I didnt miss anything:

Sorry for the late reply on this! I’m going to run this myself now to double check the firmware.

Also, are you seeing data come up in the communication logs? You can view this on your application main page.

No data in communication logs but showing device as connected. Serial monitor shows the data being sent through on serial port.

I have also been checking using request data export but no data there either.

Huzzah! I think I know what it is. Check this out:

The underlying MQTT library doesn’t have configurable memory limits yet. The payload has tons of data. I’m going to update the article with this information too.

Taron, I am using a NodeMCU so it is the same controller as in your getting started example. Everything is setup as per your blog. Has the MQTT library or something changed since you wrote the blog, if so, can we use the same version as you used when writing your blog?

There is one thing different is that I am using a DHT11 not DHT22 - could that be the cause of the different packet size. I do not have a DHT22 to check against, on the serial monitor the data looks like:
“Humidity: 64.00 % Temperature: 25.00 *C 77.00 *F Heat index: 25.23 *C 77.41 *F

The two sensors look the same ( in terms of configuration ). However, this is a problem with a library the firmware is using. So, it’s not a problem with the code you have, just the library.

Here is the problem: MQTT has a payload memory limit. You are sending humidity, tempC, tempF, heatIndexC, and heatIndexF. The default memory limit is not enough to support all of these values. The error is also not apparent, which makes it hard to track.

You can fix this in two ways:

  1. So, you can only send the data you need. You can edit the void report function to seen one or two values.

  2. Or you can increase the memory limit:

@anaptfox In deed that resolved the issue. Thank you, but please put a note for this in your article https://www.losant.com/blog/getting-started-with-the-esp8266-and-dht22-sensor it took me so much time debugging, i am luck to find this article. I almost gave up on this great losant.com!

Hi Everyone!

I edited the PubSubClient.h and increased from 128 to 256 the parameter:

Now I am getting events in the “Device Log” but it has a orange triangle exclamation mark saying:
One or more of your payload properties was rejected.
A provided attribute is not defined on the device, or the data type is incorrect.
Received Payload

When I setup the device attributes for the DHT22 I set them all to “Number” which was the default. Should I change it to “String” or ??

But the data IS getting through so not sure what is wrong…


Can you please paste a screenshot of the actual device log?

1 Like

I’m thinking I probably setup my account wrong… Is there a way I can show you how I setup my account?
Also here are the particulars of the IDE: Windows 7 laptop, ArdIDE 1.8.5,


That error indicates the attributes are not currently configured on the device. Can you open your device page and confirm that attributes are configured for each of those entries?

For example, the screenshot below has attributes for temperature and humidity. You’ll need to add attributes that exactly match the fields you’re reporting (humidity, tempC, tempF, heatIndexC, and heatIndexF). These are also case-sensitive, so make sure the capitalization also matches.

OK hang on… Going to grab a snapshot…

OOOHHH! I think I got it. I just typed in the names but did not pay attention to exact spelling and capitalization. lemme try that…

So these should be the actual variable names in the source code, right?


Timestamp ISO Date humidity tempC tempF heatIndexC heatIndexF
1522080434826 2018-03-26T16:07:14.826Z 55.7 23.8 74.84 23.68971 74.6419
1522080437218 2018-03-26T16:07:17.218Z 55 24 75.2 23.89143 75.005
1522080439581 2018-03-26T16:07:19.581Z 54 24.1 75.38 23.97532 75.156
1522080441964 2018-03-26T16:07:21.964Z 53.3 24.2 75.56 24.06704 75.3211
1522080444350 2018-03-26T16:07:24.350Z 52.7 24.2 75.56 24.05137 75.2929
1522080446729 2018-03-26T16:07:26.729Z 52.2 24.3 75.74 24.14831 75.4674
1522080449118 2018-03-26T16:07:29.118Z 51.8 24.4 75.92 24.24787 75.6466
1522080451499 2018-03-26T16:07:31.499Z 51.4 24.4 75.92 24.23742 75.6278
1522080453883 2018-03-26T16:07:33.883Z 51.1 24.5 76.1 24.33959 75.8117
1522080456268 2018-03-26T16:07:36.268Z 50.8 24.5 76.1 24.33176 75.7976
1522080458653 2018-03-26T16:07:38.653Z 50.6 24.5 76.1 24.32653 75.7882
1522080466867 2018-03-26T16:07:46.867Z 50.9 24.6 76.28 24.44436 76.0003
1522080469243 2018-03-26T16:07:49.243Z 53.9 24.7 76.46 24.6327 76.3393
1522080471648 2018-03-26T16:07:51.648Z 53.2 24.7 76.46 24.61442 76.3064
1522080474001 2018-03-26T16:07:54.001Z 52.5 24.8 76.64 24.70614 76.4715

Awesome! Typos and capitalization is a common issue. We might be able to detect some of these and be more helpful in the device log. We’ll brainstorm on that. Anyway, glad you got it working!

1 Like

Yes! I suggest saying something to the effect that these device attribute names should be the actual names found in the JsonObject used for the reporting of the data.

Hi I just started to use Losan and am having the same issue were I get the " A provided attribute is not defined on the device, or the data type is incorrect." error. It appears that I am only getting variables set as Boolean are working, variables set as Numbers all report errors. Does anyone have any ideas why the “Number” variables do not work?

Below are sceen shots and code snippets from my project.

Code in my function were is set variables;

payload.data.body.statusUpsBatOverV	=	(Status2 & 0x04)>>2;
payload.data.body.status12V	 =	(Status2 & 0x02)>>1;
payload.data.body.statusCharging		=	(Status2 & 0x01);
payload.data.body.systemV           = (Data1+1000)/100;
payload.data.body.battV             = (Data2+500)/100;
payload.data.body.charge12V         = Data3;
payload.data.body.analogue4         =	Data4;
payload.data.body.analogue5         = Data5;
payload.data.body.airPressure       = Data6;
payload.data.body.tempAir           = (Data7-200)/10;
payload.data.body.tempWater         = (Data8-200)/10;

payload.data.body.rssi_Int          = rssi_Int;
payload.data.body.snr_Float         = snr_Float;
payload.data.body.avgSnr_Float      = avgSnr_Float;
payload.data.body.seqNumber_Int     = seqNumber_Int;

Screen shot from my "Device State Node " were the states are saved

You’re very close, but you’ll need to tweak the Device State node a little. Most text fields in the workflow editor support what we call “templates”, which allow you to pull values from the payload using double-curly braces. Each Value field in the Device State node should be updated to use templates. For example:

{{ data.body.airPressure }}

You’ll also noticed I removed payload from the start of that template. The payload variable is only used in the function node. This is because we had to put the payload on some variable so you can access it using JavaScript. All other places in the workflow engine don’t need that extra variable and can just reference the path directly.

So the reason you’re receiving the error is that the value you’re trying to store in the number attributes is the literal string “payload.data.body.airPressure” instead of the evaluated value at that payload location. Swapping each of those with a template should resolve your issue.

Even if you’re not using Sigfox, this is a helpful guide that looks to be pretty similar to your scenario:

Thanks for the prompt response. That sorted my problem.


On a related note, the other type of text field is usually labeled “Payload Path”, which would just be a path and not use the curly braces. In those examples, it would just be data.body.airPressure. The major difference is that templates give you quite a bit of power when it comes to formatting your data. Payload Paths are simply asking for a pointer to your payload somewhere.