adrianmihai83
@adrianmihai83
Best posts made by adrianmihai83
Latest posts made by adrianmihai83
-
Info about String Payload
I am intrigued by the following thing, I want to send a string to the controller, tried in many things but I don't seem to get one thing. To be short, I want to send to the controller a string containing 14 bytes, more exactly the ID of the RFID Tag. If I am sending this way:
gw.send(msgRfTag.set("24848484852515754685348483"));
everything goes well.
But if I want to do the following:
String strTag = "24848484852515754685348483";
gw.send(msgRfTag.set(strTag));it does not compile, error: no matching function for call to 'MyMessage::set(String&)'
I use Arduino 1.5.8, on Windows enviroment, latest library.
-
RE: Software serial Library
I get the same error when using the SoftwareSerial library. More specific, it is a known limitation that you cannot use SoftwareSerial.h and PinChangeInt.h together without altering one or another.
Let me give you an example, I was in the same case as you are now, I wanted to use an RF ID reader (125 kHz - RDM6300) on a software serial pin, in my case was A2 (don't ask why, this was the only input pin that I have on an UNO, it is stuffed with keyboard, display, motor actuator for door opening, button for manual door opening, ringer button and NRF24 - this is my all in one entrance sensor ). So, what you have to do:
pin A2 is on Port C
- you have to disable in the SoftwareSerial.h the other intrerupts, except the one associated to PortC, that would be - PCINT1 is for Port C :
PCINT0 is for Port B
PCINT2 is for Port D
PCINT3 - it is not the case of 328P so you can leave it uncommentedso in SoftwareSerial.h comment the following for PCINT0 and 2:
#if defined(PCINT0_vect)
ISR(PCINT0_vect)
{
ReceiveOnlySoftwareSerial::handle_interrupt();
}
#endifThe other thing that you have to do now is to tell PinChangeInt.h that you use Port C for other purpose. To do this, in MyGateway.cpp, ahead of the #include "utility/PinChangeInt.h" you should include the following:
#define NO_PORTC_PINCHANGES
Save, upload, enjoy... And don't forget to modify back what you altered.
This assumes that you don't use intrerupts on pins...
-
RE: HC-SR501 motion sensor
Thank you for your answer. This was not the problem in my case. Long story short, I made a multisensor node for testing on an Arduino Uno and everything went well, the problems started when I moved to Pro Mini 5V version. I only use 3.3V for the radio, all of the other sensors of this node are 5V. The power was not the issue as I used on both Uno and Pro Mini battery power for testing. I moved the sensor back to the Uno setup (used for two weeks for testing) and still was not working. Moved the potentiometer for the Sensibility to the minimum and then I saw random good readings so arrived to the conclusion that there could be some problem with this.
After some searching I found that my Pir had 105 potentiometer both for Sensibility and Time, and in the schematics there is a 104 for Sensibility and 105 for Time, that's why the sensibility worked only the first mm of the rotation. Searched home but unfortunatly the bigest one I had was 10k and not 100k, put it for testing, pump it to the max and is working like a charm. I will try with 100k as soon as I will get some.
This is a picture with the sensor, mine had 105 on both that's why it was so hard to set. Now the multisensor is in a beautifull case, working and looking smart :). -
RE: HC-SR501 motion sensor
@Bandra said:
Does anybody who has bypassed the onboard regulator on the HC-SR501 be able to post up a photo of where you soldered?
I thought it was pretty simple and soldered my 3.3V lead to the leg on the 7133. It seems to power up (at least, so says my voltmeter), but the trigger (output) pin just goes high immediately and never changes. So on my sensors network it is just constantly triggering (even when there's no motion).
I'm doing something wrong, but not sure what it is. Any hints?
@Bandra , have you found any answers to your question? I have exactly the same problem, the output of the sensor goes straight to High, moving the potentiometers sometimes causes it to go Low but not in a stable state, goes low, you trigger it and goes high and stays this way... Maybe the sensor is on his way out... right now I don't have another one to test with.
-
RE: MQTT Broker gateway
Yes, I am talking about node ID, but what I can tell you is that until two days ago I didn't assigned node ID manual and I didn't have 3 NRF's to test with gateway + 2 nodes. Only when I got other RF's and made a couple of sensors saw that the gateway is assigning node ID 0 to all of the sensors, and all sensors worked, for example:
- temp humidity node had Node ID 0 and Child 0 and 1, and from openHAB I could use them at MYMQTT/0/0/V_HUM and MYMQTT/0/1/V_TEMP
- motion sensor at MYMQTT/0/2/V_MOTION
- and do on, other 2 sensors, all I had to take care is that all of them had distinct Child ID
Only when I got other NRF's and could make sensors and use them in paralel saw that the gateway is offering NODE ID 0 to all of my sensors, I don't know why, checked MYMQTT.h and it was set to auto assign Node ID, even in the statemant gateway.begin() assumes that the gateway should auto assign Node ID, and gw.begin(incomingMessage, AUTO, true) states it clear that relay sensor should get Node ID from the gateway.
All I did is manual assigned nodes for every one and workking like a charm. I simply like it this way, it let's more control, it's simply more "my way".
Now I want to combine some of the sensors and use a Mega2560 for this, hoping for a nice outcome.
-
RE: MQTT Broker gateway
Why is the broker offering me the same id for all of the sensors? I start the first one, broker offers me id 0, without disconnecting it I connect the second sensor and the gateway offers me same id, id=0.
I have cleared eeprom to both of them and see the requesting id first time i power them up, but still same id for both...
Edit 1:
Defined static ID and the relay works, didn't modify anything, just static ID 2 to the relay...
Edit 2:
Just tested with ID 0, 1 and 2 and I can confirm that the relay does NOT work with ID 0, it's almost a week now and I have tried everything and the answer was as simple as this: does not work with ID 0.
-
RE: MQTT Broker gateway
Will test it tomorrow morning and come back with result, what i see is exactly the same configuration, the only difference is that your's is on the 3'rd node and mine on 1'st node. Anyway, will see.
Thank you for your answer.
I am still waiting for my other NRF24L01 ( I ordered 30 pcs), they will arive this week. Maybe there is a problem running the sketch on node one, id 0. Tomorrow I will go and buy 2 of the NRF24 from a store even if they are 4 times more expensive, this not working is killing me
-
RE: MQTT Broker gateway
Callback for incomming messages does not occur so I guess that the message does not get to the relay sensor. Is there someone that is using this with MQTT Gateway and openHAB?
-
RE: MQTT Broker gateway
Downloaded from https://github.com/Damme/MQTTGateway latest MQTT Gateway (the one that responds on serial with "Ok!" not "Started!", with the modifications to MySensors.cpp) but no difference, still no sketch name and with the above settings, openHAB cannot control the relay sensor...
I used the same arduino that is working with Temp_Humidity sensor so the setup is good, the relay pins are specified in the sketch. I used the Clean_Eeprom_Config before uploading, I even used other Arduino Uno, no diffrerence, still cannot control the relay sensor from openHAB.
Anyone has a clue, a hint or something? The serial output from both the sensor and the gateway, together with openHAB configuration are two posts up.
Edit: 3 hours later and managed to make many of the sensors (Door, Distance, Dust, Gas, Humidity, Light, Motion) everyone working in conjunction with MQTT Gateway and openHAB except the Relay one...
Any help is appreciated.
Regards,
Adrian