Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added support for conrad rsl switches #104

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

thejatom
Copy link

No description provided.

@thejatom
Copy link
Author

thejatom commented Jul 26, 2016

yeah, the weather station - the sample code to send DHT11 sensor data from arduino to pimatic is:

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {
  Serial.begin(9600);
  mySwitch.enableTransmit(3);
}

void loop() {
  char os[37];
  prepareMsg(265,61,os);
  char *o = os;
  mySwitch.send(o);
  delay(5000);
}

void prepareMsg(int temp, int hum, char\* buf) {
  String tempstr=String(temp,BIN);
  int len=tempstr.length();
  for (int i=0; i<(12-len); i++) { tempstr="0"+tempstr; }
  String humstr=String(hum,BIN);
  len=humstr.length();
  for (int i=0; i<(8-len); i++) { humstr="0"+humstr; }
  String outstr=String("0101100011011100"+tempstr+humstr);
  outstr.toCharArray(buf,37);
}

@mwittig
Copy link
Contributor

mwittig commented Jul 28, 2016

Can you please add a few links to the products you have been using. Would also be noce if can describe the setup for temperature/humidity sensor in some more detail. If I understand this correctly your setup sends temperature/humidity from homeduino to a RSL device?!

@thejatom
Copy link
Author

thejatom commented Sep 3, 2016

No, in fact I have arduino with rf transmitter and dht-11 sensor.
And just wanted to transmit temp/humidity to pimatic but I could not find any predefined protocol that can be transmitted by arduino

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants