Quantcast
Channel: myDevices Cayenne Community - Latest topics
Viewing all 4739 articles
Browse latest View live

LoRa Device Cayenne LPP Integration

$
0
0

@alain.messerli wrote:

Hello All,

I’m currently trying to integrate a custom device into cayenne. Unfortunately I can’t see any data in my cayenne dashboard.

The device is registered in the swisscom-network and added in Cayenne as generic “Cayenne LPP” device. (We’re using the microchip RN2483 module for communication).

For Test reasons, I transmit the payload example 03 67 01 10 05 67 00 FF on channel 1 with the module. I expect 2 Temperature sensor widgets with a temperature of 27.2°C on channel 2 and 25.5°C on channel 5 shown in the dashboard, but nothing happens…

I’ve integrated the device as followed:

  1. Registered the Device in the Swisscom LPN portal (portal.lpn.swisscom.ch)
  2. Added the Application Server with https://lora.mydevices.com/v1/networks/swisscom/uplink as route
  3. Send the example data for checking connectivity (ThingPark Wireless Logger), there I can see some data transmissions
  4. Registered the device in cayenne as “Cayenne LPP” device under the swisscom network and entered the credentials
  5. Send the example data again, checked in the Wireless Logger (success) and the Cayenne dashboard

But the dashboard remains empty…

Where could be the Issue? Maybe a simple format error?

Thanks

Alain

Posts: 3

Participants: 3

Read full topic


Hello!

Data flood NodeMCU with DHT11

$
0
0

@adiflorescu wrote:

Hello to you!

I tried my Hello World project which consist in a NodeMCU ESP8266 (ESP-12) and DHT11 sensor.
I manage to have connection and send the data to Cayenne.
I implemented the Deep sleep function by connecting the Pin D0 to RST. NodeMCU works fine, goes intro Deep Sleep and then came out.
The goal is to send the Temp and the relative humidity once at 1 minute (the code below send at 15 seconds for debugging purposes).
Therefore, the code is run once in the void setup().
In the serial console, all is OK but when checked into the Cayenne Data history, I see that the NodeMCU sensor send the data about 10 times in a second!
So, this are my questions:
Why that if I send the data only once?
How to send the temp and the Hum only once?

Here is the code:

/*

#define CAYENNE_DEBUG
#define CAYENNE_PRINT Serial
#include <CayenneMQTTESP8266.h>

#include “DHT.h”

// WiFi network info.
char ssid[] = “…”;
char wifiPassword[] = “…”;

// DHT defs
#define DHTPIN D1
#define DHTTYPE DHT11 // DHT 22
float h;
float t;
DHT dht(DHTPIN, DHTTYPE); // Create object

// Deep Sleep parameters

#define SLEEP_DELAY_IN_SECONDS 15 // MAX TIME IS 36 MINUTES a.k.a REPORT INTERVAL
/* FOR DEEP SLEEP
ON ADAFRUIT HUZZAH ESP8266 BREAKOUT BOARD, CONNECT RST TO PIN16!!!
ON NODEMCU CONNECT RST TO PIN D0
*/

// define virtual pins
const int temp1 = 0;
const int hum1 = 1;

// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char username[] = “-----------”;
char password[] = “-----------”;
char clientID[] = “-------------”;

            void setup() {
                      Serial.begin(115200);
                    Cayenne.begin(username, password, clientID, ssid, wifiPassword);
                    dht.begin();
                     // we run the code only once per out of sleep
                    //  delay(1500);      // wait for good reading
                         h = dht.readHumidity();
                         t = dht.readTemperature();
                        sendTemp1(temp1);
                        sendHum1(hum1);
                         
                         Cayenne.loop();
                      
                              Serial.println("Entering deep sleep...");
                        //   delay(100);
                            ESP.deepSleep(SLEEP_DELAY_IN_SECONDS * 1000000, WAKE_RF_DEFAULT);
                        //     delay(200);
                    
                     delay(500);
                    }

          void sendTemp1(int temp1)
                      {
                        
                        Cayenne.virtualWrite(temp1, t); //virtual pin
                         Serial.println(t);
                      }
                      
           void sendHum1(int hum1)
                      {
                        
                        Cayenne.virtualWrite(hum1, h); //virtual pin
                         Serial.println(t);
                      }
        

        void loop() {

                      }

I have printscreen from the Data History but no option to ad it.

Thanks
Adrian

Posts: 1

Participants: 1

Read full topic

Sliders wrong on mobile app

$
0
0

@tecnopatiasevera wrote:

Thank you for taking the time to submit your bug/issue! Please use the points below as a guide when submitting.

  • Device & model you are using (Ex: Pi 2 Model B or Arduino Uno with W5100 ethernet shield)
    ESP8266 wifi
  • What dashboard are you using? (Web, iOS, Android)
    both web and android
  • Please describe the bug / issue as detailed as possible. Attaching the code and any relevant screenshots would be very helpful!

whena slider is added on web looks like this (good):

but on andoid app the slider shows different and it could not be changed¡¡

looks like this ( bad only from 0 to 1):

just only for notify the bug.

Posts: 1

Participants: 1

Read full topic

Better precision on flow metter

$
0
0

@Skeleton84 wrote:

Hi i use this code, and this code working, but i have flow in range 1 - 2 L/min, and in this range i need better precision for flowrate, now flowrate metter show me only 1; 1,2 ; 1,4 ; 1,6 ; 1,8 ; 2 L/min this only 0,2l/min precission, but i need precission 0,05 L/min. Any idea for this code.

Code

/*
Liquid flow rate sensor -DIYhacking.com Arvind Sanjeev

Measure the liquid/water flow rate using this code.
Connect Vcc and Gnd of sensor to arduino, and the
signal line to arduino digital pin 2.

*/
#define CAYENNE_PRINT Serial
#include <CayenneMQTTESP8266.h>
#define VIRTUAL_PIN0 V0
#define VIRTUAL_PIN3 V1
#define VIRTUAL_PIN3 V2
// Your network name and password.
char ssid[] = “AndroidAP”;
char wifiPassword[] = “bamboocha”;

char username[] = “24215630-28e0-11e8-aeac-8375e928efd4”;
char password[] = “310d584371f324cfb82be6259716213c89d3fc76”;
char clientID[] = “2ee1b790-28e0-11e8-b6d4-35a0ad51f849”;

byte statusLed = 13;

byte sensorInterrupt = 0; // 0 = digital pin 2
byte sensorPin = 0;

// The hall-effect flow sensor outputs approximately 4.5 pulses per second per
// litre/minute of flow.
float calibrationFactor = 5;

volatile byte pulseCount;

float flowRate;
unsigned int flowMilliLitres;
unsigned long totalMilliLitres;
unsigned long totalLitres;
unsigned long oldTime;

void setup()
{

// Initialize a serial connection for reporting values to the host
Serial.begin(9600);
Cayenne.begin(username, password, clientID, ssid, wifiPassword);

// Set up the status LED line as an output
pinMode(statusLed, OUTPUT);
digitalWrite(statusLed, HIGH); // We have an active-low LED attached

pinMode(sensorPin, INPUT);
digitalWrite(sensorPin, HIGH);

pulseCount = 0;
flowRate = 0.0;
flowMilliLitres = 0;
totalMilliLitres = 0;
totalLitres = 0;
oldTime = 0;

// The Hall-effect sensor is connected to pin 2 which uses interrupt 0.
// Configured to trigger on a FALLING state change (transition from HIGH
// state to LOW state)
attachInterrupt(sensorInterrupt, pulseCounter, FALLING);
}

/**

  • Main program loop
    */
    void loop()
    {
    Cayenne.loop();
    if((millis() - oldTime) > 1000) // Only process counters once per second
    {
    // Disable the interrupt while calculating flow rate and sending the value to
    // the host
    detachInterrupt(sensorInterrupt);

    // Because this loop may not complete in exactly 1 second intervals we calculate
    // the number of milliseconds that have passed since the last execution and use
    // that to scale the output. We also apply the calibrationFactor to scale the output
    // based on the number of pulses per second per units of measure (litres/minute in
    // this case) coming from the sensor.
    flowRate = ((1000.0 / (millis() - oldTime)) * pulseCount) / calibrationFactor;

    // Note the time this processing pass was executed. Note that because we’ve
    // disabled interrupts the millis() function won’t actually be incrementing right
    // at this point, but it will still return the value it was set to just before
    // interrupts went away.
    oldTime = millis();

    // Divide the flow rate in litres/minute by 60 to determine how many litres have
    // passed through the sensor in this 1 second interval, then multiply by 1000 to
    // convert to millilitres.
    flowMilliLitres = (flowRate / 60) * 1000;

    // Add the millilitres passed in this second to the cumulative total
    totalMilliLitres += flowMilliLitres;
    totalLitres = totalMilliLitres / 1000;

    unsigned int frac;

    // Print the flow rate for this second in litres / minute
    Serial.print(“Flow rate: “);
    Serial.print(int(flowRate)); // Print the integer part of the variable
    Serial.print(”.”); // Print the decimal point
    // Determine the fractional part. The 10 multiplier gives us 1 decimal place.
    frac = (flowRate - int(flowRate)) * 10;
    Serial.print(frac, DEC) ; // Print the fractional part of the variable
    Serial.print(“L/min”);
    // Print the number of litres flowed in this second
    Serial.print(" Current Liquid Flowing: "); // Output separator
    Serial.print(flowMilliLitres);
    Serial.print(“mL/Sec”);

    // Print the cumulative total of litres flowed since starting
    Serial.print(" Output Liquid Quantity: "); // Output separator
    Serial.print(totalLitres);
    Serial.println(“L”);

    // Reset the pulse counter so we can start incrementing again
    pulseCount = 0;

    // Enable the interrupt again now that we’ve finished sending output
    attachInterrupt(sensorInterrupt, pulseCounter, FALLING);
    }
    }

/*
Insterrupt Service Routine
*/
void pulseCounter()
{
// Increment the pulse counter
pulseCount++;
}

CAYENNE_OUT(V0) //Flow rate:
{
Cayenne.virtualWrite(V0, flowRate);
}

CAYENNE_OUT(V1) //Current Liquid Flowing:
{
Cayenne.virtualWrite(V1, flowMilliLitres);
}

CAYENNE_OUT(V2) //Output Liquid Quantity:
{
Cayenne.virtualWrite(V2, totalLitres);
}

Posts: 1

Participants: 1

Read full topic

DHT12 - temperature and humidity sensor

$
0
0

@tad.dvor wrote:

Codes for different boards and shields.
All codes only work with MQTT.

ArduinoYun.txt (1.6 KB)
ESP8266.txt (1.9 KB)
ESP8266Shield.txt (3.1 KB)
EthernetShieldW5100.txt (2.1 KB)
EthernetShieldW5500.txt (2.3 KB)
EthernetShieldW5200.txt (2.4 KB)
ManualConnection.txt (3.0 KB)
MKR1000.txt (2.4 KB)
SerialUSBConnection.txt (3.8 KB)
WiFi101Shield.txt (2.4 KB)
WiFiShield.txt (2.3 KB)

Sample from the Cayenne Dashboard.

Posts: 1

Participants: 1

Read full topic

Ports 8442? 8181?

$
0
0

@wmontg5988 wrote:

I am going to try to get my daughter in the philippines to get my Rpi back online since I believe either the modem or provider blocked it. Can’t remember which port needs to be open and if this is something I can change in the modem or get a technician to come out and fix. The Rpi worked for about 15 minutes after she powered it up and then nothing since last year. Any tips, tricks?

William

Posts: 1

Participants: 1

Read full topic

Counter and Tank Level Widgets

$
0
0

@paulminize wrote:

I have these working on the webpage but they don’t seem to be on the Android app - the channels show up, but they still look unconfirmed (Still green boxes) does anyone have any ideas?

Also the tank widget (even on the webpage) seems to have the colour ranges upside down, meaning my full values show up with the empty colours and vice versa?

Thanks

Posts: 1

Participants: 1

Read full topic


Actuators Are Showing up as Sensors

$
0
0

@lubkin.ben wrote:

When I try to create a button under custom widgets it is showing up as a sensor (fields: data (digital actuator), units(digital I/0) as opposed to actuator.

In the tutorial posted, when you create a button it shows up as a actuator and allows you to set up a virtual channel to post info to.

What am I doing wrong? Thanks.

Posts: 2

Participants: 2

Read full topic

DHT21/AM2301 - temperature and humidity sensor

$
0
0

@tad.dvor wrote:

Codes for different boards and shields.
All codes only work with MQTT.

ArduinoYun.txt (1.6 KB)
ESP8266.txt (1.9 KB)
EthernetShieldW5200.txt (2.4 KB)
EthernetShieldW5100.txt (2.1 KB)
ESP8266Shield.txt (3.1 KB)
EthernetShieldW5500.txt (2.3 KB)
SerialUSBConnection.txt (3.8 KB)
WiFi101Shield.txt (2.4 KB)
ManualConnection.txt (3.0 KB)
MKR1000.txt (2.4 KB)
WiFiShield.txt (2.3 KB)

Sample from the Cayenne Dashboard.

Posts: 1

Participants: 1

Read full topic

Relays Synchronisation

$
0
0

@ufrtgr wrote:

Hello, I hace noticed now with the MQTT transition that actuators do not behave as before. For example when i press a button widget to activate a motor or a lamp, the change in the button state do not appear in all devices i.e phone, tablet, dashboard. Also sometimes i have enable/disable the button twice in order to activate the relay. I dont know if this problem has any relation with the connection rate limit, messages and millis function.

Regards

Posts: 1

Participants: 1

Read full topic

Seeing data from Adeunis Field Test device on TTN

$
0
0

@alanb wrote:

I have an Adeunis Field Test Device (FTD) registered operating on The Things Network (TTN).
I can see that it is connected and to TTN via the gateway and I can see its data on the TTN Console.

However, no data is showing up on the myDevices dashboard.

I have confirmed the DevEUI (copied and pasted from TTN Console to the myDevices Dashboard).

Any thoughts on what else might be preventing the data from being viewed on the myDevices dashboard?

Posts: 1

Participants: 1

Read full topic

Triggers won't run

Android -> Cayenne -> 8266 problem

$
0
0

@jameszahary wrote:

Followup on my previous problem sending commands to Cayenne from Android.

I was using Cayenne API to send a number from Android to Cayenne, which in turn would be sent from Cayenne to my 8266 to command the 8266 to do something. I was sending 0, 1, 3.14, but the numbers showed as random 5 digit integers. While experimenting, I discovered that my number sometimes displayed on the Dashboard, and sometimes the 5 digit. In the data history, you often get two numbers sent at the same second – sometimes my number sent first, then the 5 digit integer, and I see the 5 digit on the dashboard. Sometimes the other way.

My discovery is that both numbers are sent to the 8266, or in this experiment a Raspberry PI running the cayenne-node.js program and subscribing to the channel. In the red circle, you see I sent the number 137.0357, but Cayenne wrote that plus this other number 14497 into the history. On the pi-cayenne-node it showed this both numbers in the payload

{ path: ‘v1/971da7b0-fd21-11e6-ac86-a9a56e70acce/things/bd7309e0-2e04-11e8-822e-bbf389efce87/cmd/86’,
payload: '14497,137.03597’,
meta:
{ username: ‘971da7b0-fd21-11e6-ac86-a9a56e70acce’,
thingId: ‘bd7309e0-2e04-11e8-822e-bbf389efce87’,
channel: ‘86’ },
splats: [] }

So this 14497 number must be some kind of internal number, that should not be in the history, and not display on the dashboard.

Here is the curl, just for the record – it does not contain 14497

curl -X POST https://platform.mydevices.com/v1.1/things/bd7309e0-2e04-11e8-822e-bbf389efce87/cmd -H 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImphbWVzemFoYXJ5QGdtYWlsLmNvbSIsImZpcnN0X25hbWUiOiJKQU1FUyIsImxhc3RfbmFtZSI6IlpBSEFSWSIsInNjb3BlIjpbInNlbGYiXSwidXNlcl9pZCI6IjEwMDEyMDk1IiwiaWF0IjoxNTIyMzYxNTgwLCJleHAiOjE1MjM2NTc1ODAsImF1ZCI6Im15ZGV2aWNlcy5jYXllbm5lLnByb2QiLCJpc3MiOiJteWRldmljZXMuYXNnYXJkLnByb2QiLCJqdGkiOiI3YzJhOThjYi0zZTQwLTQyNGMtYmI0MS05YjBhNWY2MjFkZjEifQ.UTTkRdjRHdDItr8XdQHxxxxxxxxxxxxxxxxxxxxBkoo' -H 'content-type: application/json; charset=UTF-8' -d '{"channel":86,"value":137.03597}' {"success":true}pi@raspberrypi:~/node_modules

Posts: 1

Participants: 1

Read full topic

Sending text to Cayenne Dashboard

$
0
0

@jameszahary wrote:

Discussion here somewhere about sending text to dashbaord. How about this:

cayenneClient.rawWrite(101, 1, “type”, “Cheese Sandwich”);
cayenneClient.rawWrite(101, 2, “type”, “Calabasas”);
cayenneClient.rawWrite(101, 3, “type”, “Kim Kardashian”);
cayenneClient.rawWrite(101, 4, “type”, “I_have_just_picked_up_a_fault_in_the_AE-35_unit.”);
cayenneClient.rawWrite(101, 5, “type”, “If you aint’t winning, your losing.”);

Some issues with dashboard display :grinning:

Posts: 1

Participants: 1

Read full topic


Cayenne doesn't show GPIO pins

$
0
0

@petermerchant wrote:

I had webIOPi working on Raspbian Wheezy and updated and upgraded raspbian so now WebIOPi doesn’t work. So I installed Cayenne. I am connected and the services started, but on the Dashboard the GPIO tab is blank excpet for the header.

Is this becasue Cayenne didn’t cleanup the old WebIOPi during installation, or becasue I am using an old Raspberry Pi

IP Address (wlan0) 192.168.1.8
Agent Version 1.0.0.20838
Computer Make Element14/Premier Farnell
Computer Model Model B
OS Name raspbian
OS Version 8
OS Build debian
OS Architecture 0002

Thanks for any help.

Posts: 1

Participants: 1

Read full topic

Cayenne and R-Pi without Internet access

$
0
0

@petermerchant wrote:

With MyIOPi I was able to run the system with just the R-Pi and an Android Browser and a standalone WiFi Access Point. I was intending to try and set up the Tablet and R-Pi as a peer-to-peer or Ad-hoc network when I was forced on to Cayenne.

Can Cayenne work in a peer-to-peer mode?

Thanks,
Peter M.

Posts: 1

Participants: 1

Read full topic

Looking for a simple MQTT example with Multiple relays/lights

$
0
0

@mitch1 wrote:

So I am trying to hook up an Arduino with a 4 relay board
I can (almost) copy and past the example for a single relay…
but it seems that something is missing for adding more than 1
any chance of getting a sample for 2-4 relays?

Posts: 3

Participants: 2

Read full topic

Help on sending data and classifying (type celsiuswrite)

$
0
0

@Massimotruglio83 wrote:

hi, who can tell me how and if to identify the types of data?
example, I have to send current and voltage, power, phase angle. type celsiuswrite, does the function exist?

Posts: 1

Participants: 1

Read full topic

Ghost buttons and problems in installing them

Viewing all 4739 articles
Browse latest View live