Why are you using a usb to serial adapter to connect the arduino to the raspberry? The raspberry has an onboard uart at /dev/ttyAMA0. I am using the internal uart and cannot reproduce this kind of error.
Jan Gatzke
Posts
-
Serial Gateway connection to Openhab -
Your workshop :)
I am especially proud of my 20 years old analog soldering station. :D
-
MySensors controlled heatingI have made a node which measures the temperature using a DS18b20 and controls an electric heating valve (http://www.ebay.de/itm/350991304709?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT) using a MOC3023 optocoupler with triac output (little white chip, works like a solid state relay. Only for small currents, but very cheap). The power supply is the pcb of a usb power supply.
Pictures:





The code is a simple combination of the ds18b20 and the relay actuator examples.
Using openHAB I can set a target temperature. When the temperature is below the target temperature the valve is opened. Else the valve is closed. Since I am using a NC (normally closed) valve, the valve opens when connected to power.

-
[Tutorial] openHAB with serial gatewayNice tutorial. I discarded my own incoming rules and am now using this solution. I have extended the rule by a few additional sub types:
if (subType == V_LIGHT_LEVEL){ postUpdate(sensorToItemsMap.get( nodeId + ";" + childId + ";"), msg) println ("Light item: " + sensorToItemsMap.get( nodeId + ";" + childId + ";") + " light: " + msg ) } if (subType == V_VOLTAGE){ postUpdate(sensorToItemsMap.get( nodeId + ";" + childId + ";"), msg) println ("Voltage item: " + sensorToItemsMap.get( nodeId + ";" + childId + ";") + " voltage: " + msg ) } if (subType == V_LOCK_STATUS){ var String lockstatus="OPEN" if (msg=="1"){ lockstatus="CLOSED" } postUpdate(sensorToItemsMap.get( nodeId + ";" + childId + ";"), lockstatus) println ("Door/Window item: " + sensorToItemsMap.get( nodeId + ";" + childId + ";") + " Status: " + lockstatus ) } if (subType == V_TRIPPED){ var String tripped="OFF" if (msg=="1"){ tripped="ON" } postUpdate(sensorToItemsMap.get( nodeId + ";" + childId + ";"), tripped) println ("Button/Contact item: " + sensorToItemsMap.get( nodeId + ";" + childId + ";") + " Status: " + tripped ) } if (subType == V_LIGHT){ var String light="OFF" if (msg=="1"){ light="ON" } postUpdat(sensorToItemsMap.get( nodeId + ";" + childId + ";"), light) println ("Light item: " + sensorToItemsMap.get( nodeId + ";" + childId + ";") + " Light: " + light ) } -
Newbie - Do not succeed to startI think the generic board does not work because the default settings are not sufficient for ms. Be sure the settings match your actual esp8266 module.
Did you pull down gpio0 when you powered on the module? This activates the programming mode.
If you want to go the easy way just get a node mcu compatible board like wemos d1 mini. It has an onboard USB port and you don't have to manually put it in programming mode.
Mqtt adds complexity. If you don't need it you should choose plain ms. -
Sketch works on Uno, but not pro miniThis could be a power problem. The UNO has a much better voltage regulator circuit. Did you connect a capacitor to the nrf24?
-
Minding the robotAnd how do you know where your wife is and whether she got stuck? :D
-
Serial Gateway connection to Openhab@jemish This is to basic to earn an answer. I suggest you start reading at http://www.mysensors.org .
-
Radio FAIL after ~3 weeks [SOLVED]@Reza
Which NRF Modules do you use? 50 meter with a wall in between wont function properly with the cheap ones. You need something like this for the Job: -
Install kicad mysensor componentsThx, this definitly saves some Google time. ;)
-
Connect raspberry and arduino nano with USBThe USB connection between the RPi and the Nano is known to make problems. Just use the Pi's UART. Connect RX of the Pi with TX of the Arduino and vice versa. See https://github.com/openhab/openhab/wiki/Serial-Binding for using the Pi's UART with openHAB. Rock stable and easy.
-
[Tutorial] openHAB with serial gatewayI don't understand why everybody is using an USB connection for the serial gateway when openHAB is running on a raspberry pi. The pi has a rock stable uart with 3.3V logic. There is no need to convert the arduinos uart to USB. Just connect RX to TX and TX to RX. Connect ground to ground and VCC of the arduino to the 3.3V pin of the pi and you are done. The official openHAB wiki contains instructions on how to use the onboard uart of the pi: https://github.com/openhab/openhab/wiki/Serial-Binding
-
Radio FAIL after ~3 weeks [SOLVED]Great analysis. I will surely send you my code for review next time. :D
-
Need working example battery powered sensor@Jan-Gatzke said:
I have never done this before. But basically you need the c code of the bootloader for your Arduino. Then open it with a text editor and change the f_cpu value. Then compile and flash it using avrdude.
I googled and found this:
http://angryelectron.com/how-to-update-the-bootloader-on-arduino-pro-mini-328/I would use Atmel studio for these low level tasks if you are running in Windows.
Edit: Found already compiled bootloaders here: http://forum.arduino.cc/index.php?topic=160647.15
-
[Tutorial] openHAB with serial gatewayWould you mind to share the solution?
-
Radio FAIL after ~3 weeks [SOLVED]The Problem is most likely a problem with your hardware. Try to lower the distance and see if the problem still exists. If not you should replace your radios. Look for radios with pa / lna.
-
How to best set up a bigger mysensors installationThere can be only one gateway in one network. Auto fallback does not exist afaik. You can have one network per floor. This means you have to choose another channel/frequency.
I have used one repeater in a similar scenario. Problems occur when the node occasionally can reach the gateway directly. I had to specify the parent node/repeater. Now it works well. -
New version of the MySensors adapterI have just commited some changes to the iobroker MySensors Adapter on github. All set command are send with ack flag now and the states in iobroker get an ack on successful transmission, too. The new version is not being published via the iobroker admin, yet. You have to download it from github and copy it to your iobroker directory. Please test and report any problems you are facing.
-
💬 OH MySensors RGBW ControllerI got my v1.3 pcbs from Smart Prototyping. Quality is good. The controller works fine BUT the sketch version in your github repo is broken. Seems like the non linear fading part never got finished. I am now using linear fading and the sketch is working. :)
-
light and relay turn on automatically !He only wrote about a blinking led not about the whole node failing.