Skip to content

Troubleshooting

Common problems, what they usually mean, and how to fix them. Still stuck? Contact us.

The platform rejected the device’s credentials. The SDKs stop trying when this happens, because retrying won’t help: the Node.js SDK emits error, and the Embedded C SDK raises ESPOIRNET_EVENT_REJECTED.

Check, in this order:

  1. The keys in your code. Account, project and device keys must match the device’s page exactly. Use the SDK config copy button (see Find your keys).
  2. The device’s key or certificate in the console. It may have been revoked or rotated, or it was never registered. A rotated key keeps working for 10 days, unless it was revoked at the same time.
  3. The key pair. Use Test Authentication on the device’s page to confirm the private key matches the registered public key.
  4. A key registered moments ago. Wait a minute and try again.

After fixing the cause, restart the device or call connect() (Node.js) or espoirnet_start() (embedded) again.

The Node.js SDK says the private key is in the wrong format

Section titled “The Node.js SDK says the private key is in the wrong format”

The SDK needs a PKCS#8 key (-----BEGIN PRIVATE KEY-----). If yours starts with -----BEGIN EC PRIVATE KEY-----, convert it:

Terminal window
openssl pkcs8 -topk8 -nocrypt -in key.pem -out private.pem

The key also has to be EC P-256. Other types can’t be registered.

The device keeps retrying and never connects

Section titled “The device keeps retrying and never connects”

This points to a network problem rather than a credentials problem.

  • Check the device has internet access and can reach rayon.espoirnet.io on port 8883.
  • Check you’re connecting with mqtts://rayon.espoirnet.io:8883. With the Node.js SDK, the default address isn’t the hosted platform.
  • On a firewalled network, make sure outbound port 8883 is allowed.

An embedded device waits and doesn’t log in

Section titled “An embedded device waits and doesn’t log in”

It’s waiting for the clock. Login and readings both need the current time, and send() returns ESPOIRNET_ERR_CLOCK_NOT_SET until it’s set. Check the device has Wi-Fi and that configTime() can reach a time server.

  • Your own CA’s certificates must carry the right identity and the device must already exist (see Requirements).
  • Check the certificate hasn’t expired, and that the device or its CA hasn’t been revoked.
  • Send any intermediate certificates along with the device certificate.

A device shows as Never connected or Offline

Section titled “A device shows as Never connected or Offline”

See Device Status. Never connected means it hasn’t logged in yet, so start with the sections above. On the device list, use Refresh to get the latest status.

Readings don’t appear on the sensor’s page

Section titled “Readings don’t appear on the sensor’s page”
  • Check the sensor key. A reading sent with a key that doesn’t match a sensor won’t appear on any sensor’s page. A single-sensor device’s key is default, and a generated key is usually short, such as tempe for “Temperature”.
  • Check the device was connected. With the Node.js SDK, publish returns false when offline, and that reading is lost.
  • Give it a moment. A new reading can take a short while to appear in the chart.

With the Embedded C SDK, the queue holds a fixed number of readings and drops the oldest when full, raising ESPOIRNET_EVENT_TELEMETRY_DROPPED. Readings more than 7 days old are discarded. Increase ESPOIRNET_QUEUE_RECORDS if your outages are longer than the queue can cover.

Readings show up at the wrong time, or not at all

Section titled “Readings show up at the wrong time, or not at all”

Readings sent with a measurement time are stored at that time, so a device with a wrong clock stores them at the wrong point in the chart. Readings dated more than 1 minute ahead of the platform’s clock, or more than 7 days old, are discarded. Check the device’s time source.

Readings measured more than 5 minutes before they arrive don’t fire automations. Also check the automation is Enabled, and look through its execution history.

The platform knows the device isn’t connected, so it refused the command straight away. Commands aren’t held for offline devices, including those in deep sleep. Send it when the device is back online.

The device didn’t confirm in time. This isn’t always the final word, because the device may still apply it and the platform records the confirmation shortly after. Revisit the sensor’s page to check.

If it happens every time, check that your code calls ack() (Node.js) or device.ack() (embedded) after applying the command.

The device reported that it couldn’t apply the command. Check your command handler and the value it was sent.

Send sensors are report-only and can’t receive commands. A sensor’s data direction is fixed when it’s created, so a sensor that needs commands has to be created with Receive or Exchange.

“Your plan includes N users” or another limit error

Section titled ““Your plan includes N users” or another limit error”

You’ve reached a plan limit. See Plans & Limits. Removing a member frees a user place, but deactivating one doesn’t.

“Subscription inactive” or “Account blocked”

Section titled ““Subscription inactive” or “Account blocked””
  • Subscription inactive: your account has no active subscription, so devices, sensors and automations are paused. Contact your account admin.
  • Account blocked: contact support.

See If your subscription lapses.