CARSTEN

@CARSTEN

Posts made by CARSTEN

Hi
I am using the MYS API 1.5 with Arduino 1.77.
I have the Relay example runing on one node (node id 6) and the Serial Gateway on the other.
Looking at the Serial Gateway node serial monitor everything looks good:

Hi
I finally managed to try out the MySensors v1.5 library. I mainly was looking for the support of the RFM69 radios because of their better range and low power consumption.
The serial gateway worked like a charm out of the box. But then I struggled to get the binary switch example working. I mostly got an error 'Radio Init Fail'.
Looking into the code I also struggled to see where the code says that this should work with an RFM69 radio, like it does in the Serial Gateway code in "MyTransportNRF24 transport(RF24_CE_PIN, RF24_CS_PIN, RF24_PA_LEVEL_GW);"
So I eventually copied a whole bunch of lines from the Serial Gateway example and now it is working perfectly.

I may have copied too many lines and perhaps there is a much smarterway of solving this but as a feedback of what I tried and what worked, herewith the code I eventually used in my Binary Switch node:
/**

The MySensors Arduino library handles the wireless radio link and protocol

between your home built sensors/actuators and HA controller of choice.

The sensors forms a self healing radio network with optional repeaters. Each

repeater and gateway builds a routing tables in EEPROM which keeps track of the

// After setting up the button, setup debouncer
debouncer.attach(BUTTON_PIN);
debouncer.interval(5);

// Register binary input sensor to gw (they will be created as child devices)
// You can use S_DOOR, S_MOTION or S_LIGHT here depending on your usage.
// If S_LIGHT is used, remember to update variable type you send in. See "msg" above.
gw.present(CHILD_ID, S_DOOR);
}

I hope this helps somebody and perhaps somebody wants to advise on how to do this much better.
Anyhow, Big Thank You to the guys (@KOLAF,@YVEAUX, @HEK and a bunch of others) who made the effort to extend the library to RFM69. Much appreciated.

@Damme I tried today the mysensor 1.4.1 library, uploaded with Arduino 1.5.8 to UNO with Ethernet Shield (W5100) and an NRF24L01+pa+lna. Compilation and upload worked fine.
I can ping the IP address defined in the MQTTGateway.ino sketch.
I maintained on my RPI the openhab.cfg file with the url and port number from the gateway.
When starting the openhab it shows:
... - MQTT Service initialization completed.
... - Starting MQTT broker connection 'mysensor'.

I also tried to work with the development library of Mysensors but did not get very far with that. My ultimate goal is to something like a moteino with the RFM69HW radio module in connection with either openhab or pidome.
I have a quite a bit of hardware lying around here so I am happy to do any testing if somebody gives me some guidance.
Thanks.

I used the Mysensors 1.4.1 library and managed to get a UNO with Ethernet shield and NRF24L01+PA+LNA working as an MQTT gateway.
I then changed the library to the latest development library (downloaded on 01.12.2014) and uploaded the MQTT gateway setch to the same hardware -> Also worked fine.
I then changed MyConfig.h to use the RF69 radio instead of NRF24 and just tried to compile. I got a lot of errors:MQTT_Gateway_Compile_errors.txt

I am using Arduino IDE 1.5.8

I am happy to help with testing, but I am afraid my programming skills are not good enough to assist with that.

@TimO Thanks a lot. I will definitely have a look at this. However I realized that I still have to go through quite a bit of a learning curve first. So I decided to first get the MQTT gateway woring and connecting to openhab.
I will definitely come back to your solution later as it would give me a more minimalistic hardware approach.
Thanks again.

I read on the comments for the Openhab Controller page (http://www.mysensors.org/build/openhab) that Tim is working on a serial gateway connection to Openhab. Is anyone else working on something like this?

@bbbio24 Hi
I am running into the same " ISO C++ forbids initialization of member 'radio'" error. Did you manage to solve this issue? am using IDE version 1.0.6. What version should I use?

Update: I managed to get past this error.
By the way I am woring with the latest develpment branch that I downloaded from here https://github.com/mysensors/Arduino/archive/development.zip.
To get past this problem I changed in MyDriverRF69.h the lne 40 to
RFM69 *radio;// = NULL;
This resolved the problem in the arduino IDE 1.0.6. Admittedly I am very new to this whole thing and am not sure what I potentially broe by changing the line bt at least I can explore further.