Temperature with Moteino?

Moderator: leecollings

Post Reply
ehlen000
Posts: 1
Joined: Friday 24 July 2020 10:17
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Temperature with Moteino?

Post by ehlen000 »

Hi Guys, I am trying to get a Moteino talk to RFlink on 433Mhz to the raspberry which runs Domoticz.
I can get the Moteino reading the temp sensor and serial print this to serial monitor.

Sending it to the RFlink is failing. Domoticz does not see the device. I am not a good coder, so I am just trying all kinds of examples but all work on the Moteino side, but none get recognized as a device in Domoticz through RFlink.

I tried to make my own really easy example, but I cannot get the temperature into a variable and then use that with a radio.sendWithRetry command.

Is there anyone who knows how to deal with this, or is there anyone who has an example in which moteino actually communicates with Domoticz? In that case i could learn how to adjust that example to my case.

any help is appriciated!

The sketch I have now:

Code: Select all

#include <OneWire.h>
#include <DallasTemperature.h>
#include <RFM69.h>

#define PIN 14
OneWire oneWire(PIN);
DallasTemperature sensors(&oneWire);
RFM69 radio;
#define NODEID      100
#define NETWORKID   10
#define GATEWAYID   1


void setup(void)
{
  Serial.begin(9600);
  sensors.begin();
  radio.initialize(RF69_433MHZ, NODEID, NETWORKID);
  radio.setPowerLevel(25);
}
 
void loop(void)
{ 
  sensors.requestTemperatures();
  Serial.print(sensors.getTempCByIndex(0));
  radio.sendWithRetry(GATEWAYID, 21 , 16); // Cant get this to work. The 21 should be the actual read temp. But probably all radio parameters are wrong.
  Serial.print(GATEWAYID);  
}
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest