Feature request - MQTT-module

Xeoma Software

Moderators: Admin_N, Administrator, Admin_P, Admin_K

Feature request - MQTT-module

Postby svenove » Sun Aug 06, 2017 8:23 am

I would really love to have two MQTT-modules: "MQTT-sender" and "MQTT-receiever".
They should be similar to the "HTTP Request Sender" and "HTTP-switcher". :)
svenove
 
Posts: 2
Joined: Tue Aug 01, 2017 8:47 pm

Re: Feature request - MQTT-module

Postby Admin_P » Mon Aug 07, 2017 1:10 pm

Hello! Are there any specific reasons you can't use "HTTP Request Sender", "HTTP Receiver" and/or "HTTP Switcher" in your system? Generally, they are quite universal and are meant for integration with the vast majority of systems.
Admin_P
 
Posts: 245
Joined: Wed Aug 24, 2016 1:49 pm

Re: Feature request - MQTT-module

Postby skylord123 » Sat Aug 12, 2017 4:50 am

I use this to integrate with home assistant as well as other providers. I ended up creating a docker that runs a python web server to turn the requests from the HTTP Request Sender into MQTT messages. I have the code here: https://hub.docker.com/r/skylord123/xeoma-mqtt/

The reason mqtt would be nice is because instead of sending requests to a single http receiver mqtt messages can be intercepted by various devices. I use this to notify Home Assistant to turn on my front door light when motion is detected on the path to my front door. But I could also have my other devices listen for these messages and act on the same message.

I would prefer having this functionality built into Xeoma. Makes integrating with other systems much easier.
skylord123
 
Posts: 32
Joined: Fri Jun 02, 2017 5:18 pm

Re: Feature request - MQTT-module

Postby korniza » Tue Oct 10, 2017 6:21 pm

skylord123 Wrote:I use this to integrate with home assistant as well as other providers. I ended up creating a docker that runs a python web server to turn the requests from the HTTP Request Sender into MQTT messages. I have the code here: https://hub.docker.com/r/skylord123/xeoma-mqtt/

The reason mqtt would be nice is because instead of sending requests to a single http receiver mqtt messages can be intercepted by various devices. I use this to notify Home Assistant to turn on my front door light when motion is detected on the path to my front door. But I could also have my other devices listen for these messages and act on the same message.

I would prefer having this functionality built into Xeoma. Makes integrating with other systems much easier.


I also agree. I use another home automation software (Domoticz). It will make much easier the interaction! :D
korniza
 
Posts: 35
Joined: Mon Jan 04, 2016 4:31 pm

Re: Feature request - MQTT-module

Postby korniza » Fri Oct 13, 2017 5:15 pm

I build a node-red flow that is working with domoticz. TCP stream listen to 5001 but you can change it to any port you like. Also the HTT Request Sender iuse the format http://<mosquito ip>/<port>/camera/<domoticz switch idx>/<status_id>.
for status id you give value of 1 (when event started) or 0 (when event ended).

Code: Select All Code
[{"id":"7bf4e37f.71669c","type":"tab","label":"Flow 5"},{"id":"42212607.be6e48","type":"comment","z":"7bf4e37f.71669c","name":"Instructions","info":"In domoticz go to Hardware/create virtual device\nlookup the IDX in the devices tab","x":395,"y":22,"wires":[]},{"id":"871b5baa.9c2418","type":"mqtt out","z":"7bf4e37f.71669c","name":"domoticz/in","topic":"domoticz/in","qos":"","retain":"","broker":"ecc5db38.629e78","x":710,"y":87,"wires":[]},{"id":"3a87e7c1.c088b8","type":"function","z":"7bf4e37f.71669c","name":"Message","func":"var output = msg.payload.split(\"/\");\nvar cam_idx = parseInt(output[2]);\nvar Status_id = parseInt(output[3]);\n\nmsg.payload = {};\nmsg.payload.command = \"switchlight\";\nmsg.payload.idx = cam_idx;\nif (Status_id==1) {\nmsg.payload.switchcmd = \"On\" ;\nmsg.payload.level = 100;\n}\nelse if (Status_id===0) {\nmsg.payload.switchcmd = \"Off\";\nmsg.payload.level = 0;\n}\n\nreturn msg;","outputs":1,"noerr":0,"x":344,"y":150,"wires":[["871b5baa.9c2418","54e58729.f9d1c8"]]},{"id":"54e58729.f9d1c8","type":"debug","z":"7bf4e37f.71669c","name":"DOMOTICZ","active":true,"console":"false","complete":"payload","x":705,"y":214,"wires":[]},{"id":"ca73dfe.0ebeb2","type":"inject","z":"7bf4e37f.71669c","name":"XEOMA","topic":"","payload":"GET /camera/167/0 HTTP/1.1User-Agent: UserAgentFSHost: 192.168.10.7","payloadType":"str","repeat":"","crontab":"","once":false,"x":137,"y":57,"wires":[["3a87e7c1.c088b8"]]},{"id":"f9a8ebce.c24ca8","type":"tcp in","z":"7bf4e37f.71669c","name":"Xeoma_In","server":"server","host":"","port":"5001","datamode":"single","datatype":"utf8","newline":"","topic":"/camera","base64":false,"x":118,"y":191,"wires":[["3a87e7c1.c088b8"]]},{"id":"ecc5db38.629e78","type":"mqtt-broker","z":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"15","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]
korniza
 
Posts: 35
Joined: Mon Jan 04, 2016 4:31 pm


Return to Xeoma - General discussion

Who is online

Users browsing this forum: No registered users and 9 guests