All function and Variables disappear from Raspberry PI

Hi all,
I am running particle IO with raspberry PI 0.5.1-pi13. Yesterday after Raspberry PI reboot all publish variables a function disappeared. I did not change any code. Just reboot.
I use these published functions and variables in the setup section of the code.

 Particle.variable("Akumulacka", tempAku);
 Particle.variable("Boiler", tempBoi);
 Particle.variable("Hrejeme", hrejeme);

But instead of that is shows the only following functions which are not in my code.


Do you know if something has changed in firmware for Raspberry PI? Or any other ideas where the problem could be?
Thank you

It appears as if the firmware on that RPi has reverted to the default/stock Tinker application.

OK thank you. And what can I do with this situation? Re-install partical on Raspberry? Or down-grade firmware?

Nope, you don’t need to reinstall the entire packet. Just update the application firmware.

Since official RPi support is deprecated I’m not entirely sure whether OTA updates are still working as expected, but I’d give it a try via Web IDE.

Unfortunately, the firmware downgrade did not help. So I have tested to upload another code with published variables and functions, and it works without any problem. Then I was training to isolate the problematic part of the code.
I am reading temperature form two DS18B2 sensors. But the output is in text.
So I am converting text to Int. (now //). And this is the part stop working.
Do you have any idea why the code is now not compatible?
Thank you.

strcpy(w2_address, “28-02131ac303aa”); //cteni teploty
strcpy(w1_address, “28-02131ac664aa”); //cteni teploty

DS18B20 w1Device1 (w1_address);
// tempAku = w1Device1.getTemp(); // Issue
DS18B20 w2Device1 (w2_address);
// tempBoi = w2Device1.getTemp(); // Issue

And one more findings. Whenever I click on variables tab in IOS application the application crash.

What library would be doing that?
I’ve never heard of that.

These addresses also look somewhat odd, but to validate that we’d also need to know which library you are using.

I have not found any DS18B2 library for Raspberry. So I compiled my own DS18B20_PI. It works perfectly almost half a year.

#include "DS18B20_Pi.h"

DS18B20::DS18B20(const char* address) {
	address_ = strdup(address);
	unit_ = CELCIUS;
	snprintf(path, 46, "%s%s%s", BUS, address_, TEMPFILE);

DS18B20::~DS18B20() {

float DS18B20::getTemp() {
	FILE *devFile = fopen(path, "r");
	if (devFile == NULL) {
		printf("Count not open %s\n", path);
	float temp = -1;
	if (devFile != NULL) {
		if (!ferror(devFile)) {
			unsigned int tempInt;
			char crcConf[5];
			fscanf(devFile, "%*x %*x %*x %*x %*x %*x %*x %*x %*x : crc=%*x %s", crcConf);
			if (strncmp(crcConf, "YES", 3) == 0) {
				fscanf(devFile, "%*x %*x %*x %*x %*x %*x %*x %*x %*x t=%5d", &tempInt);
				temp = (float) tempInt / 1000.0;

	if (unit_ == CELCIUS) {
		return temp;
	} else
		return CtoF(temp);

uint8_t DS18B20::getUnits() {
	return unit_;

void DS18B20::setUnits(uint8_t u) {
	unit_ = u;

float DS18B20::CtoF(float temp) {
	return temp * 1.8 + 32;

I use that guide

I see.
Can you clarify what you mean with that

Have you tried adding some debug logs to see what’s going on inside your getTemp() and where exectation and actual behaviour diverge?

No, I do not know how to do it. The question is if there is something do debug. If getTemp() is in the code, then all code is not loaded. it looks like empty device.

Can you share your project (via the SHARE THIS REVISION button in Web IDE)?

I got error that the library is not public. So I can not share the project. I sent the code via PM.

Which library is that?
Can you embed the library as separet files in the project and share that?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.