I’m currently in progress of creating connection between Raspberry PI and Arduino MEGA through serial connection. As I asked for help before, I’m seeking for your help once again.
I’m currently connecting everything together and I got stuck, when I was creating Arduino as an item to /etc/openhab2/items ($OPENHAB_CONF/item).
So what is currently configured.
openHABian 2.3.0-1 with PaperUI
Default config
Arduino is connected to RPI and I can see communication through minicom (verified port /dev/ttyACM0 )
I created _ start.sh_ (in /opt/openhabian/) with -Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0 and I even tried EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0
I set sudo usermod -a -G dialout openhabian and sudo usermod -a -G dialout openhab
I created a item called arduino.item with String Arduino "Arduino [%s]" (arduino) {serial="/dev/ttyACM0"}
As a result I should get events logs with arduino outputs, but that’s not happening. Here is arduino code:
int weight = 125;
int temperature = 39;
I know I am a little off topic but, what is your end goal again? It was not clear to me in the first post and now you are basically seeking help on the same issue.
Everything I see looks like you are taking the long way round the block. I don’t know your end goal so I can’t fully comment.
I’m trying to find out, where did I make a mistake. In my previous forum I tried to find out If and how is possible to connect together. I read the forums and tried it… but I somewhere did the mistake.
Where serial.cfg should be saved?.. I can’t find it. I thought that it should be in /etc/openhab2/services or /usr/share/openhab2/addons, but It’s not there. I wanted to reinstall bundle through SSH, but … that’s another issue… I cannot execute feature:list | grep ^openhabian I’m really confused right now…
It should be in etc/openhab2/services
If it is not there then the binding didn’t install properly
I think you can always try to create it manually
Follow the examples in the binding docs
I’m trying to find out, where did I make a mistake.
the question from Danny was, what is your goal with your program.
Finding you rmistake is one thing, if we understand your goal, we might help you with your goal in an simpler way. When it’s simpler, you have less risk in mistakes + might be less stress on your openhab system.
Alright… So … Basically what I’m trying to do is connect RPI to arduino, so I could send values from sensors to RPI through serial (usb) connection. Values should be displayed in Paper UI (or similar GUI) and also from Paper UI I want to be able send values to arduino, where I’m able to work with them. (I have in mind some basic number slider or numeric up down)
Right now, I manually downloaded serial binding to /usr/share/openhab2/addons, but nothing looks differently. (even after restart)
Why I cannot execute command as log::xxxxx , bundle:xxxxx, feature::xxxxxx?
is there a particular reason to use RPI connection?
I’m sending requests to arduino’s using MQTTT
in my case the arduino’s are on the same network around the house.
So no need to have both close to eachother.
I have the same setup as you, did you find your problem yet? I encountered similar problems to the ones your describing, for me it was the rpi going corrupt due to power cuts. A clear sign for me was a problem with the log files.
The solution in my case was to reinstall the rpi completely using openhabian (which is not that much work especially if you’ve done it before) and then putting back the configuration files.
Without log files it’s difficult to check what’s going wrong.