Page 5 of 19

Re: [90] MQTT Support

Posted: Tuesday 20 May 2014 13:59
by andreas.aahlin
Hello.
maxtrash I tried changing the PI from 127.0.0.1 to its actual IP 192.168.??.??
It worked!!! I don't know why, but it works.

Thanks!!

Re: [90] MQTT Support

Posted: Wednesday 21 May 2014 15:04
by brijoco
andreas.aahlin wrote: These errors are because there are no node.js script listening.
Start the server.js script and where will hopefully not be any errors any more.
Hi Andreas,

That was my thinking too. Just can't get my head round it.
Tried lots of things but can't get the different bits to play together.
Individually they all test successfully.
When installing Node do I need to manually update system files like etc/rc.local?

Re: [90] MQTT Support

Posted: Thursday 07 August 2014 19:52
by gizmocuz
nobody can write native support for this in domoticz ? (c++)

Re: [90] MQTT Support

Posted: Wednesday 13 August 2014 20:09
by bjornhallberg
+1 for native MQTT support ...

Been trying to get the node.js stuff to work, but where can I find script_device_mqtt.lua?

Re: [90] MQTT Support

Posted: Saturday 23 August 2014 23:21
by maglo18
Linkt to MQTT device driver for Domoticz amd lua script is empty. Where I can find this scripts?

Re: [90] MQTT Support

Posted: Monday 25 August 2014 13:04
by maxtrash
I kinda lost interest in MQTT for the time being since there's not enough devices in Domoticz to handle all the information coming from MQTT. E.g. a thermostat and/or multi-state device would be very helpful.
Anyway, I'll try and see if I can find some time this week to go over MQTT stuff this week.

Re: [90] MQTT Support

Posted: Monday 01 September 2014 12:54
by saka
I'm new to Domoticz but I'll write a native binding to mqtt if someone can point me in the right direction on how to add new devicetypes - C++ and MQTT is no problem but I have not looked into the Domoticz source yet..

We will also need some mapping on a generic schema suitable for homeautomation that will be used in MQTT. Any suggestions?

I realize currently Domoticz supports a small set of device types - is it a big issue to add more?

/svante

Re: [90] MQTT Support

Posted: Tuesday 02 September 2014 0:02
by maxtrash
saka wrote:I'm new to Domoticz but I'll write a native binding to mqtt if someone can point me in the right direction on how to add new devicetypes - C++ and MQTT is no problem but I have not looked into the Domoticz source yet..

We will also need some mapping on a generic schema suitable for homeautomation that will be used in MQTT. Any suggestions?

I realize currently Domoticz supports a small set of device types - is it a big issue to add more?

/svante
That's very nice! I agree we need to decide on a schema for the messages and we definately need more devices.
I wrote some stuff in this post: http://www.domoticz.com/forum/viewtopic ... t=40#p8155. What's your opinion on this?

Re: [90] MQTT Support

Posted: Tuesday 02 September 2014 5:29
by saka
(1) Devices, devices, devices. The more (generic) devices (Multi-state, text etc.) the better. MQTT could connect a vast amount of different devices and we would like to see them and interact with them in the GUI. Even without MQTT this is the main thing for many users I guess (e.g. by using the LUA-scripting, JSON or whatever)
And let's not to forget: it would be nice to have a list of all devicetypes/sub devices and what they need (svalue, nvalue, etc.).
I totally agree - but even if we can't support more devices types than today it would allow me use domoticz as a "complex device" - personally I plan to use http://nodered.org/ for scripting anyway.

I we provide a good schema (for home automation) and fill it with content even if it is partial then there is a motivation for adding support.
I want to integrate mobile updates - like something built on http://www.awareframework.com/ - but my thinking is that does not need to exist in the same schema. (since I will do the scripting externally anyway)
(3b) a native interface with MQTT-brokers would also be nice. Like 3a, but instead of http/json it would be tcpip with MQTT-flavour (I'm sure libraries exist)
Sure, there are such libraries: http://mosquitto.org/ has an excellent pub/sub clients (BSD license). The real work would be the schema and the integration with domoticz existing devices.

What is the correct way of getting updates of existing devices and how do I define new devices (from MQTT objects)?

Re: [90] MQTT Support

Posted: Wednesday 03 September 2014 1:05
by maxtrash
I was also experimenting with nodered. Very nice. Please find some stuff I was working on 6 months ago. Frankly, I do have a hard time remembering what I was doing exactly though at the time.
maybe I'll find some time to pick it up again next weekend

Re: [90] MQTT Support

Posted: Monday 22 September 2014 13:58
by Averell
Being new to Domoticz I quite like the product, but I feel the MQTT integration is lacking to say the least. It is possible to use a MQTT LUA library, I did this on the VERA, but even that is not ideal. Ideally there should be MQTT support in the product itself, as stated before, there are great C++ libs available.
What I would like to see:

For switches etc, being able to select MQTT next to the already available choices like X10 etc. This should send out a JSON message over MQTT in a predefined queue that I should be able to set per device
MQTT upport on par with the API support. Being able to update the status of devices (for example on a Domoticz/inform/xxx queue), and set the status of devices via another queue (Domoticz/do/xxx), so I can both nform Domoticz that the status of a device has changed. xxx could be the device idx, messages always in a predefined JSON format.
As I just started to look at Domoticz, I'm not sure how easy it would be te implement this, I haven't had a look at the code yet. Did anybody already have a look at adding this kind of selection to devices? I have no idea if it is all in the code, or in some config setting.

Av.

Re: [90] MQTT Support

Posted: Friday 10 October 2014 20:13
by gizmocuz
Averell wrote:Being new to Domoticz I quite like the product, but I feel the MQTT integration is lacking to say the least. It is possible to use a MQTT LUA library, I did this on the VERA, but even that is not ideal. Ideally there should be MQTT support in the product itself, as stated before, there are great C++ libs available.
What I would like to see:

For switches etc, being able to select MQTT next to the already available choices like X10 etc. This should send out a JSON message over MQTT in a predefined queue that I should be able to set per device
MQTT upport on par with the API support. Being able to update the status of devices (for example on a Domoticz/inform/xxx queue), and set the status of devices via another queue (Domoticz/do/xxx), so I can both nform Domoticz that the status of a device has changed. xxx could be the device idx, messages always in a predefined JSON format.
As I just started to look at Domoticz, I'm not sure how easy it would be te implement this, I haven't had a look at the code yet. Did anybody already have a look at adding this kind of selection to devices? I have no idea if it is all in the code, or in some config setting.

Av.
please build a native support class

Re: [90] MQTT Support

Posted: Thursday 20 November 2014 17:46
by epierre
maxtrash wrote:I kinda lost interest in MQTT for the time being since there's not enough devices in Domoticz to handle all the information coming from MQTT. E.g. a thermostat and/or multi-state device would be very helpful.
Anyway, I'll try and see if I can find some time this week to go over MQTT stuff this week.
Hello,

looking at your mqtt code, I guess I could transform my imperihome gateway to mqtt easily because I have interfaced there quite a similar thing with many domoticz devices. The REST structure looks the same somehow...

please tell me if someone is interrested...

Re: [90] MQTT Support

Posted: Wednesday 24 December 2014 0:42
by deennoo
I'am !!!

From Bordeaux, France

Re: [90] MQTT Support

Posted: Sunday 04 January 2015 21:36
by Kouseri
+1 to native MQTT integration.

Thanks to Domoticz wiki and this great thread I managed to get Domoticz + MQTT working! It wasn't easy but I learnt a lot during the quest... ;-)

My system consists at the moment a couple of Arduino based sensor units (temp & hum + temp only) and a third Arduino which is working as a MQTT gateway.
Sensor data is delivered via 433MHz RF links to MQTT gateway Arduino which passes the information to MQTT server running on a Raspberry Pi via ethernet.

I plan to add door switches (Home Easy 305) to my setup as well once I get those...

I can share my code if someone is interested.

Re: [90] MQTT Support

Posted: Wednesday 07 January 2015 23:04
by Kouseri
Have you noticed when adding new temperature sensor via MQTT to the Domoticz using "JSON, did/dunit/dtype/dsubtype" -approach ID of the the sensor is quite self-explanatory like "/actions/domoticz/GarageTemp".
But when adding temperature + humidity sensor via same approach then name is always "unknown?" I haven't figured out yet how to get ID right like "/actions/domoticz/GarageTempHum". Any ideas what might be wrong?

One can use URL below to test if same issues is visible for others as well (replace YOURDOMOTICZIPADDRESS with the IP address of your Domoticz server):

http://YOURDOMOTICZIPADDRESS:8080/json. ... =25.4;52;0

I noticed strange behaviour with current temp + hum sensor which ID is "unknown?" with the Wunderground virtual sensors...

Re: [90] MQTT Support

Posted: Wednesday 21 January 2015 1:07
by maxtrash
I thought I had replied here but apparently not. Anyway: I've also noticed that Domoticz is not really consistent here. I think this is something Gizmocuz will have to fix

Re: [90] MQTT Support

Posted: Wednesday 21 January 2015 7:28
by Kouseri
I posted this issue about week ago to the Bugs/Problems category (Link to the post) but no answers yet.
I was wondering should I file a bug report about this one?

Re: [90] MQTT Support

Posted: Wednesday 21 January 2015 8:58
by maxtrash
Yes, I think that might help. And you can link to the message from there.

Re: [90] MQTT Support

Posted: Thursday 22 January 2015 8:35
by kylegordon
Morning all,

I got a little tired of rummaging through the forum for copies of the various .js files, so I've bundled it all together into a pull request for the original https://github.com/sschimmel/DomoticzMQTT/ repository. It would be great if people commented on it, and also if interested parties could agree or disagree with the license that sschimmel has picked :-)

https://github.com/sschimmel/DomoticzMQTT/pull/2

Cheers

Me