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.
By creating the file org.eclipse.smarthome.mqttbroker.cfg in the service folder (/usr/local/etc/openhab2/services in my case, chown to openhab), with the contents
name=mosquitto
host=192.168.1.69
secure=false
port=1883
username=
password=
retain=true
I was able to just create the MySensors MQTT gateway (using paperui) and it stayed online (no mqtt broker defined, but its addon is installed). I had the impressions that with the latest versions it should be possible to do everything in the PaperUI, and that the broker would use the mqtt2 addon (but in paper ui, service, config, mqtt tab, mqtt system broker connection, manage->plus button -> expert mode, I get to see the contents of the cfg file above)
But unfortunately, it seems that the discovery services enters a endless loop (maybe I need to update my arduinos sketch to the latest mysensors code?) and I don't get any auto discovered things. If I trigger a new discovery it will stop the previous one and start again.
Finally, I was able to manually create a thing, and link items on it. Eventually my battery level and humidity were displayed in the paper ui control page (after some weird delay, not updating once it shows in the log. the temperature didn't show up though).
Not sure if my understanding is off (or paperui is limited in this sense) but in the "thing" creation page I only get to specify one child id. Then my multi sensors/value nodes would need to be define in multiple things? As I can't properly define channels for each child id, and I'm not sure what var1-5 are all about.
I'll try defining things/channels/items directly in files in the following days, because so far I couldn't enjoy most of the benefits of this new version (auto discovery, logical grouping of physical device in "things", questionable "do-it-all in paper ui"), and I'm almost considering using mqtt1 binding in the new install
@alexeinz figured it out, apparently had to add experimental and get latest mosquitto for the conf file to work correctly , now the bridge is working perfectly
--- broker.conf file in /etc/mosquitto/conf.d
the topics coming from gw will appear under sensor/# on mosquitto
connection MMQTTtoSensor
address 192.168.1.234 <-gw ip
clientid MyMQTT
cleansession true
notifications true
topic # in 2 sensor/ MyMQTT/
I am not able to install the Library . I am getting Error
Invalid library found in C:\Documents and Settings\User\My Documents\Arduino\libraries\ESP8266MQTTMesh: C:\Documents and Settings\User\My Documents\Arduino\libraries\ESP8266MQTTMesh.
I changed the name of the zipped file to ESP8266MQTTMesh as the name of .cpp file ESP8266MQTTMesh.cpp. Still it is saying Invalid Library found in ....
What could be the problem.
@Yveaux said in serial, Ethernet to MQTT:
Of course, but MySensors MQTT gateway runs just as fine when connected over cabled ethernet, as when connected over wifi
I do not know that
Now on this tool, I do not see much benefit from ethernet to MQTT
Still, it is good from serial to MQTT.
Hi @doctor64 ,
How did you solve the battery reporting?
Did you implement the changes in h and cpp file from the link and compiled/uploaded the gateway sketch again?
Hi John,
appLog.txt
I also tried using datatype string but it doesen't work. Meanwhile I have studies the log files more detailed and found the following behavior:
when defining the device skeletal and when updating the derived device (first approx. 25 lines in the log file V_STATUS is declared as string with values 51 resp. 52 as specified in the web interface. The entity is "Modul 433 MHz".
Later on, when using the toggle switch in the web interface the value has changed in the decription in the log file (see line 164 or 185) value has been changed to on/off. With this definition it seem that the mysensors-Plugin is feeded has been changed from the specified values.
My conclusion is that the change is taking place somewhere outside the mysensors-plugin.
By the way, if I change the type to string do I have to use quotation marks in the web interface?
Thanks a lot for your support.
Martin