Can I connect arduino to OpenHab?

Thanks for ALL the answers!!! :slight_smile:

 still, I find extremely hard to pull out some details from you :stuck_out_tongue:

So, if I understand you right:

  • You have a PLC. (But it’s a secret what kind of
 :male_detective: )

  • OH is not running on that, but somewhere elsewhere. (It’s probably a secret too? :shushing_face:)

  • There is one cable starting from the PLC >> running around your place and there are 5 Arduino boards attacked to that bus. (Or is it a star topoligy width 5 cable running in 5 direction?) :arrows_clockwise: 
 this remains a mistery forewer.

  • I guess they are connected with these pins: RX0=30 + TX1=31 ? :atom_symbol:

  • and the sensors (which type and brand can not be ever reviled :face_with_hand_over_mouth: ) are attacked to those Ardu boards in a short distance.

  • Or i2c ? :thinking: Well 
 if you don’t like sarcastic humour > you won’t ever answer to these question and we’ll never know. :smirk:

  • You don’t really use any of the digital ports for switching things, only the analog pins to read the sensors. Right? :nerd_face:

Oh noooo !! Apr.1. past away. I’m a bit late.


 back to “normal me”:

Yes, of course! But sometimes you have to change also the boot loader, or the EEPROM too, etc.
The sketch itself is just on top of those.
I’ve asked about those software in general. Can you share/upload the .ino file here?

  • How do you distinguish the 5 boards?

SUMMARY:

5 possible methods to do this:
https://homeautomation.proboards.com/post/4089/thread

Haven’t tried all those yet, but it seems:

trio will be the solution.

Half-example 1

  • You have a PLC. (But it’s a secret what kind of
 :male_detective: )

No it’s no secret it’s Fatek PLC but it can be Siemens or whatever, it can be simply converter rs485 to ethernet for example ADA, btw in other post i share my all lader code, so where is the secret?

  • OH is not running on that, but somewhere elsewhere. (It’s probably a secret too? :shushing_face:)

If You read carefully, i write OH is connected to PLC by binding. PLC pass through all data from arduino to OH

  • There is one cable starting from the PLC >> running around your place and there are 5 Arduino boards attacked to that bus. (Or is it a star topoligy width 5 cable running in 5 direction?) :arrows_clockwise: 
 this remains a mistery forewer.

Topology is not important, in my case is star.

  • I guess they are connected with these pins: RX0=30 + TX1=31 ? :atom_symbol:

Sorry, what pins?

  • and the sensors (which type and brand can not be ever reviled :face_with_hand_over_mouth: ) are attacked to those Ardu boards in a short distance.

No sensor was attacked :). Attached are BME 280, DS 18b20, HC SR-04

  • Or i2c ? :thinking: Well 
 if you don’t like sarcastic humour > you won’t ever answer to these question and we’ll never know. :smirk:

What You mean I2C? Sensors or what?

  • You don’t really use any of the digital ports for switching things, only the analog pins to read the sensors. Right? :nerd_face:

You are totally wrong i’m using only digital pins.

You expect me to answer the questions you haven’t asked.

1 Like

Yes, of course! But sometimes you have to change also the boot loader, or the EEPROM too, etc.
Are you sure?
Arduino memory, let the bootloader be the silence:)

Sorry don’t have. I wrote it two years ago, it was simply sketch with modbus library. I don’t keep .ino files coz often when library change you must modify sketch. You can find alot examples if you google it

How do you distinguish the 5 boards?
there is no magic its modbus.

Mysensors.org uses Arduinos & nrf24l01 radios to set up a gateway and custom sensor network. There is a binding floating around for mysensors & openHAB, it is not listed in openhab must be downloaded and manually installed