After the update to MQTT on my arduino Mega with Ethernet shield w5100 i am only getting problems.
Buttons aren´t working, sliders don´t slide data is being processed wrong etc.
This is my 4th clean install in 2 days because nothing works anymore.
Problem 1, Widget doesn’t displays value although it is beeing received
For example my CO sensor:
//CO Channel 1 & Pin A0
CAYENNE_OUT(1)
{
gas_value=analogRead(A0);
Cayenne.virtualWrite(1, gas_value);
}
Works great, this is what cayenne receives:
Screenshot Data
What it displays:
Screenshot Widget Overview
Widget Settings:
Screenshot Widget Settings
How can it be so hard to display a number?
Problem 2, DHT11 Humidity:
when i use my dht11 script outside the cayenne_out function it works (when i apply a delay of 1sec because this old sensor only sends good data when using a delay). it gives me a INT of 44. but when i use it in CAYENNE_OUT (with or without delay) It displays -999.00 all the time. I think because of the interval time cayenne uses but i can’t change that.
Is there somebody who also uses DHT11 on cayenne who can explain me how to fix this?
//Humidity DHT11 Channel 1 & Pin 6
CAYENNE_OUT(1)
{
int chk = DHT.read11(6);
Cayenne.virtualWrite(1, DHT.humidity); <— This works in a void loop but not here!
}
Problem 3, can’t click button on mobile/android:
Now that i am using MQTT i rebuilded my widgets but on pc i can click them and they stay clicked but on my phone they don’t lock they just go on and off.
I fixed this earlier by using “Bring Your Own Thing” but i want to use Arduino instead od the API. so that isn’t a option for me.
Problem 4, slider that can’t slide:
Using a light slider on pc: Can’t slide at all.
Using slider on phone. Can slide but only between 0 and 1 while i set range of 0-255.
When i try to slide i get this error: “cannot remote to remote device” but sensor data is updating well.
So the only thing that works after MQTT is temperature… Great update i would say…hope to hear from somebody soon.