I've been able to get MySensors working with HomeGenie using the MQTT gateway. It doesn't have two-way communication or software-based pairing yet, but I'll work on those in the future.
@micah said in Can't get OpenHAB2 to see my MQTT messages:
I'm still not sure if the second and third line in the mqtt-eventbus.cfg is correct. I don't have MyMQTT anywhere else, so I think I may try different combinations to see what works.
MyMQTT should be replaced with brokername (mysensors in this example). openhab will then publish the event to the mqtt broker on its topics (useful if you use f.eks. node-red for openhab rules)
@ericvdb
Yes, I know about the 5V. But the adapter brings it down to 3.3V for the radio, that is the reason for using it and the adapter is equipped with the AMS 1117 3.3V chip. Seems to work OK but I really do not have any hard facts to prove it.
One thing I may test is to wire the 5V also directly to this adapter instead of taking it out from the Arduino 5V pin. This is to find out if this Arduino Nano clone might have too small capacity for feeding the radio at certain occasions.
@scurb This looks very interesting and my factor now to save me from having to create my own :-). I have been planning to do the same thing (although maybe on a smaller software scale) by writing a simple Python server that would pull serial packets off of a gateway arduino (either running mysensors or something I write myself) and pipe this through MQTT to openHAB. I have two questions:
How do you interface with a sensor network? Do you go through a serial connection to read the serial packet format (a,b,c,d)? I see several implementations that put the mqtt client directly on the Arduino, but it seems much cheaper for me to just plug it into a USB port to get a virtual serial port instead of investing in a separate ethernet shield
How does an item configurations look like for a switch in openHAB? I'm looking to build a toggle switch which toggles light on or off every time it is activated, and I cannot really understand how to configure the switch to allow this behaviour for an mqtt input.
Feel free to take the second question with me directly since this might not be very interesting to the others in the forum
Thanks for your fast reply.
That sounds easy.
And you think that the communication between sensor nodes and Gateway are still possible via wired RS485?
I tried to find an example on this site for sending Information from Gateway to sensor nodes. (via SendMessage ?)
For example I like to Switch on/off an light that is connected to an relay board at my sensor node.
Communcation Flow:
OpenHab2 --> MQTT --> Gateway --> RS485 --> Sensor Node --> Relay Board
Currently I have an working RS485 Connection between my Arduino Uno's with the use from SoftwareSerial library.
During my testings I realized, that the message that I triy to send "Hello" will be sent to the other arduino char by char. Is that true?
Because I tried to raise up an pin on HIGH with "if(msg == "Hello")..." But it doesn't worked.
Will the sendMsg method from the MySensor library handle this out of the box?
Regards,
Simon
I can nothing say about OpenHAB or PiDome but:
Started!
0;0;3;0;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0:
0;0;3;0;9;version mismatch
0;0;3;0;9;read: 0-0-0 s=0,c=0,t=0,pt=0,l=0:
0;0;3;0;9;version mismatch
Does not look good, it seems an error from the gateway.
sensor id is not the same as node id.
sensor id = 255 is used for internal stuff like id request and battery level for node. You can assign 0-254 to your own attached sensors (to the arduino node).
@sentur since it was launched 6 days ago, I seriously doubt anyone has had the ability to try it.
Anyway, please don't post the same question in multiple places. It wastes people's time. Most users don't have as much time as they would like to spend on projects, and wasting their time by splitting the discussion to multiple threads isn't very nice.
In case anyone wants to follow the existing discussion, head over to https://forum.mysensors.org/post/84076