@hek ...so to clarify , I can use the VCC and Ground of the ISP portion to power the sensor?
( my pir already modded for 3.3 )
Posts made by alexeinz
-
RE: Sensebender Micro
-
RE: Sensebender Micro
Is it possible to use the ftdi or isp vcc / gnd to connect a pir ?
or do i need to source separate power and gnd for pir ? -
RE: IR sender & Repeater combined help
yes I am
I also replaced libs to Iremote and have same problem
basically as long as there is sendRaw command and incomingMessage in the same sketch, it will not work....
this seems like something wrong with incommingMessage, because send raw on itself works and I have tried both IRlibraries
any suggestion?// Example sketch showing how to control physical relays.
// This example will remember relay state even after power failure.#include <MySensor.h>
#include <SPI.h>
#include <IRLib.h>#define RELAY_1 3 // Arduino Digital I/O pin number for first relay (second on pin+1 etc)
unsigned int Signal_0_0[] = {4372,4416,528,1636,528,1640,524,1640,528,1640,524,560,524,556,524,1640,528,556,524,556,524,560,524,556,524,556,528,1636,528,1640,528,556,524,1640,528,556,524,556,524,556,528,556,524,556,528,552,528,1636,528,1640,528,1636,528,1640,528,1640,524,1640,528,1640,524,1640,528,556,524,556,528,556,524,556,524,560,524,556,528,552,528,552,528,556,524,1640,528,1636,528,1644,524,556,524,556,528,556,524,556,524,556,528,556,524,556,524,560,524,556,524,556,528,556,524,1640,524,1640,528,1640,528,556,524,556,524,560,524,556,524,556,528,556,524,556,524,556,528,1636,528,1640,528,556,524,556,528,552,528,1640,524,1640,528,556,524,5288,4376,4412,528,1640,524,1640,528,1640,524,1640,528,556,524,556,528,1636,528,556,524,560,524,556,524,556,528,556,524,1636,528,1640,528,556,524,1640,528,556,524,556,528,556,524,556,524,556,528,556,524,1640,528,1636,528,1640,528,1640,524,1640,528,1636,528,1640,528,1640,524,556,528,556,524,556,524,556,528,556,524,556,528,552,528,556,524,556,528,1636,528,1640,528,1636,528,556,528,556,524,556,524,556,528,556,524,556,528,556,524,556,524,556,528,556,524,556,528,1636,528,1640,528,1636,528,556,524,556,528,556,524,556,528,552,528,556,524,556,528,556,524,1640,528,1636,532,552,528,556,524,556,524,1640,528,1640,524,556,528}; //AnalysIR Batch Export (IRremote) - RAW
unsigned int Signal_1_1[] = {4372,4416,524,1640,528,1640,528,1636,528,1640,528,556,524,556,524,1640,528,556,528,552,528,556,524,556,524,556,528,1636,528,1640,528,560,520,1640,528,556,524,556,524,556,528,556,524,556,524,560,524,1640,524,1640,528,1636,528,1640,528,1640,524,1640,528,1640,524,1640,528,556,524,556,532,552,524,556,524,556,528,556,524,556,528,552,528,556,524,1640,528,1640,524,1640,528,556,524,556,528,556,524,556,528,552,528,556,524,556,528,556,524,556,524,556,528,556,524,556,528,1636,528,1640,528,556,524,556,524,556,528,556,524,556,528,552,528,556,524,556,528,1636,528,1640,528,556,524,556,524,556,528,556,524,1640,528,556,524,5404,4372,4412,528,1640,528,1636,528,1640,528,1636,528,556,528,556,524,1640,524,556,528,556,524,556,528,556,524,556,524,1640,528,1636,528,556,528,1636,528,556,528,556,524,556,524,556,528,556,524,556,528,1636,528,1640,528,1636,528,1640,528,1636,528,1640,528,1636,528,1640,528,556,524,556,524,556,528,556,524,556,528,552,528,556,524,556,528,556,524,1640,528,1636,528,1640,528,552,528,556,524,556,528,556,524,556,528,556,524,556,524,556,528,556,524,556,528,552,528,556,524,1640,528,1636,528,556,528,552,528,556,524,556,528,556,524,556,528,552,528,556,524,1640,528,1640,524,556,528,556,524,556,528,552,528,1636,528,556,528}; //AnalysIR Batch Export (IRremote) - RAW
int khz=38;
int longs=295;IRsend irsend;
MySensor gw;
void setup()
{
// Initialize library and add callback for incoming messages
gw.begin( incomingMessage , 30, true);
// Send the sketch version information to the gateway and Controller
gw.sendSketchInfo("IR Sensor", "1.0");gw.present(RELAY_1, S_LIGHT);
}void loop()
{
// Alway process incoming messages whenever possible
gw.process();
}void incomingMessage(const MyMessage &message) {
// We only expect one type of message from controller. But we better check anyway.
if (message.type==V_LIGHT && message.sensor == 3) {
int incomingRelayStatus = message.getInt();
if (incomingRelayStatus == 1) {
irsend.IRsendRaw::send(Signal_1_1, longs, khz); // Vol up yamaha ysp-900
} else {
irsend.IRsendRaw::send(Signal_0_0, longs, khz); // Vol down yamaha ysp-900
}}
} -
RE: IR sender & Repeater combined help
hmmm
any sketch in dev gets me these
/Volumes/1TB Audio/Users/audio/Documents/Arduino/libraries/MySensors/MySensor.cpp:81: error: 'eeprom_update_byte' was not declared in this scope
/Volumes/1TB Audio/Users/audio/Documents/Arduino/libraries/MySensors/MySensor.cpp:94: error: 'eeprom_update_byte' was not declared in this scope
/Volumes/1TB Audio/Users/audio/Documents/Arduino/libraries/MySensors/MySensor.cpp: In member function 'boolean MySensor::process()': -
RE: IR sender & Repeater combined help
yea.. as long as this is there it will totally fail
gw.begin(incommingmessage,AUTO, true)i will try with the dev branch and let know result
-
RE: IR sender & Repeater combined help
reflash eprom and i can verify
gw.begin(incommingmessage,AUTO, true); will always result in sensor not starting at all( no serial out)
but
gw.begin(NULL,AUTO, true); will work and will receive messagesrepeater started, id 24
send: 24-24-0-0 s=255,c=0,t=18,pt=0,l=5,st=ok:1.4.1
send: 24-24-0-0 s=255,c=3,t=6,pt=1,l=1,st=ok:0
read: 0-0-24 s=255,c=3,t=6,pt=0,l=1:M
send: 24-24-0-0 s=255,c=3,t=11,pt=0,l=13,st=ok:Repeater Node
send: 24-24-0-0 s=255,c=3,t=12,pt=0,l=3,st=ok:1.0
send: 24-24-0-0 s=3,c=0,t=3,pt=0,l=5,st=ok:1.4.1
read: 22-22-255 s=255,c=3,t=7,pt=0,l=0:
send: 24-24-22-22 s=255,c=3,t=8,pt=1,l=1,st=ok:1
read: 22-22-0 s=255,c=0,t=17,pt=0,l=5:1.4.1
send: 22-24-0-0 s=255,c=0,t=17,pt=0,l=5,st=ok:1.4.1
read: 22-22-0 s=255,c=3,t=6,pt=1,l=1:24 -
RE: IR sender & Repeater combined help
@celonunes
if this is specified, then there is no output for some reason
gw.begin(incomingMessage,30, true);if I specify NULL then i get this
repeater started, id 30
send: 30-30-128-0 s=255,c=0,t=18,pt=0,l=5,st=fail:1.4.1
send: 30-30-128-0 s=255,c=3,t=6,pt=1,l=1,st=fail:128
send: 30-30-128-0 s=255,c=3,t=11,pt=0,l=13,st=fail:Repeater Node
send: 30-30-128-0 s=255,c=3,t=12,pt=0,l=3,st=fail:1.0
send: 30-30-128-0 s=3,c=0,t=3,pt=0,l=5,st=fail:1.4.1It does seem to receive ( I send using mqtt )
command on mosquitto :
mosquitto_pub -t sensor/30/3/V_LIGHT -m 0 -dI can see its received on serial
read: 0-0-30 s=3,c=1,t=2,pt=0,l=1:0..... any help appreciated
-
IR sender & Repeater combined help
Hi , I am trying to combine IR sender with Repeater node ( usb powered ) on a Nano
but anytime I add gw.begin it will not start at all
gw.begin(incomingMessage,30, true);
when i change to NULL
gw.begin(NULL,30, true);it will start, but then it will not respond to the gw commands ( I can see it receives the command )
// Example sketch showing how to create a node thay repeates messages
// from nodes far from gateway back to gateway.
// It is important that nodes that has enabled repeater mode calls
// gw.preocess() frequently. This node should never sleep.#include <MySensor.h>
#include <SPI.h>
#include <IRremote.h>IRsend irsend;
unsigned int Signal_0_0[] = {4372,4416,528,1636,528,1640,524,1640,528,1640,524,560,524,556,524,1640,528,556,524,556,524,560,524,556,524,556,528,1636,528,}; //AnalysIR Batch Export (IRremote) - RAW
unsigned int Signal_1_1[] = {4372,4416,524,1640,528,1640,528,1636,528,1640,528,556,524,556,524,1640,528,556,528,552,528,556,524,556,524,556,528}; //AnalysIR Batch Export (IRremote) - RAW
int khz=38;#define CHILD_1 3 // childId
MySensor gw;
MyMessage msg(CHILD_1, V_VAR1);void setup()
{
// The third argument enables repeater mode.
gw.begin(incomingMessage,30, true);//Send the sensor node sketch version information to the gateway
gw.sendSketchInfo("Repeater Node& IR", "1.0");
gw.present(CHILD_1, S_LIGHT);
}void loop()
{
// By calling process() you route messages in the background
gw.process();
}void incomingMessage(const MyMessage &message) {
// We only expect one type of message from controller. But we better check anyway.if (message.type==V_LIGHT) {
int incomingRelayStatus = message.getInt();
if (incomingRelayStatus == 1) {irsend.sendRaw(Signal_1_1, sizeof(Signal_1_1)/sizeof(int), khz); // Vol up yamaha ysp-900 } else { irsend.sendRaw(Signal_0_0, sizeof(Signal_0_0)/sizeof(int), khz);// Vol down yamaha ysp-900 }
}
} -
RE: MQTT Broker gateway
@celonunes actually, i figured a way around it using mosquitto bridge
that way its much more robust too, so I am good
can post my conf if anyone interested. -
RE: MQTT gateway - Openhab & Mosquitto
@alexeinz figured it out, apparently had to add experimental and get latest mosquitto for the conf file to work correctly , now the bridge is working perfectly
--- broker.conf file in /etc/mosquitto/conf.d
the topics coming from gw will appear under sensor/# on mosquittoconnection MMQTTtoSensor
address 192.168.1.234 <-gw ip
clientid MyMQTT
cleansession true
notifications true
topic # in 2 sensor/ MyMQTT/ -
RE: MQTT gateway - Openhab & Mosquitto
Do you know what would I need to configure for this to work automatically ?
Does mosquitto automatically re publish topics its subscribed to ? -
RE: MQTT Broker gateway
@mwhansen Hi, I am also struggling with this, seems it can only handle one connection now which makes it extremely hard to debug or check node ids
-
MQTT gateway - Openhab & Mosquitto
Hi guys, I am running 1.4 version of mqtt gateway with some sensors.
What I found that in my case if I subscribe to MQTT gateway directly using mosquitto ( to check sensors communication ) , it will disconnect OpenHab client and will never reconnect until I restart Openhab mqtt bundle or the gateway. I wonder if there any workaround to this .. or is it maybe possible to somehow subscribe to mqtt using mosquitto and forward these under different topic to openhab ? That would make it easier instead of configuring 2 different brokers in Openhab.
Appreciate any suggestions..... -
RE: No debug data from sensors or gateway. Bad radios?
Ha, have a bag of same ones - luckily only about 5 of em and reordered proper ones after failing all attempts to make these work.. I just wonder.. is there any use for these? they obviously transmit and receive data
-
Help with communication and debug output
Hi people, I would appreciate some help maybe , spent couple days trying to solve this but it proves beyond me:
I am using UNO and Nano boards ( have few )
I am trying first to see / achieve communication between 2 nodes ( serial gateway and a motion sensor )
I have tried using all versions of the library, but only have debug output with 1.3 - others produce nothing except "gateway started" and nothing on node( I did enable debug as specified)
I have also tried the pingpair examples and they work fine and both nodes see and talk to each other just fine.
Sensor produces following "
Started sensor.
Open ping reading pipe: 255
Tx: fr=255,to=255,la=255,ne=255,ci=255,mt=4,ty=9,cr=184:
No relay nodes was found. Trying again in 10 seconds.
Tx: fr=255,to=255,la=255,ne=255,ci=255,mt=4,ty=9,cr=184: "and gateway:
"
0;0;4;11;No route... try sending direct.
0;0;4;11;Tx: fr=0,to=0,la=0,ne=0,ci=0,mt=0,ty=0,cr=195:
0;0;4;11;Ack: receive timeout"1.4 or the dev branch produces no messages at all except gateway started...
I would think that because ping pair working, the radio seem to be functioning well?
Could anyone point me to the issue ?