Connecting Plugwise-2-py via MQTT to Domoticz

User avatar
heggink
Posts: 122
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi
Domoticz version: V3.5877
Location: NL
Contact:

Re: Connecting Plugwise-2-py via MQTT to Domoticz

Postby heggink » Friday 02 December 2016 22:35

I run domoticz on a different pi than the one that has my plugwise stick. I am assuming things should just work if I fill in the right ip in domoticz as well as in the plugwise-2-pi configs, correct?
Thanks!
H
Raspberry Pi
RFXCOM, AEOTEC, Plugwise (Pol)

SweetPants
Posts: 1129
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V3.6708
Location: The Netherlands
Contact:

Re: Connecting Plugwise-2-py via MQTT to Domoticz

Postby SweetPants » Sunday 04 December 2016 13:41

edwin1234 wrote:I have solved the first isue but now i have an error that theres no paho mqtt client but i have mosquitto, can i use that too?

If the error comes from the plugwise python script, you have to stick with Paho or re-write the plugwise script to support something else. Just google how to install Paho client on your windows machine and your done (i hope)

edwin1234
Posts: 46
Joined: Sunday 09 October 2016 20:20
Target OS: Windows
Domoticz version:
Contact:

Re: Connecting Plugwise-2-py via MQTT to Domoticz

Postby edwin1234 » Sunday 04 December 2016 18:57

Thank u very much
For youre help
I try that

User avatar
heggink
Posts: 122
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi
Domoticz version: V3.5877
Location: NL
Contact:

Re: Connecting Plugwise-2-py via MQTT to Domoticz

Postby heggink » Monday 05 December 2016 23:57

Stuggling to get this to work. Plugwise runs in 1 pi, domoticz (and mqqt / node-red) on another

What works:
Plugwise-2 and Plugwise-2-web both run. I can change devices via the web interface and I can see power usage (yay)
Logs also show that the buffers are bing read and recorded
On domoticz:
- HW MQTT gateway installed on localhost idx 42
- node-red config updated to use idx 42 and localhost (127.0.0.1, default)
- node-red sees incoming messages:
Dec 5 22:47:01 domoticz Node-RED[449]: 5 Dec 22:47:01 - [info] [function:Plugwise2 Power to Domoticz] Relay Plugwise MQTT power message to Domoticz HTTP
Dec 5 22:47:01 domoticz Node-RED[449]: 5 Dec 22:47:01 - [info] [debug:msg.url] http://127.0.0.1:8080/json.htm?type=com ... e=241.36;0
using mosquitto_pub, I can update a virtual switch in domoticz from the other pi
Problem: no devices are being created (either with accept new hardware devices on or off)
mosquitto log shows socket error:
1480971162: mosquitto version 1.4.10 (build date Thu, 25 Aug 2016 10:12:09 +0100) starting
1480971163: Config loaded from /etc/mosquitto/mosquitto.conf.
1480971163: Opening ipv4 listen socket on port 1883.
1480971163: Opening ipv6 listen socket on port 1883.
1480971167: New connection from 192.168.1.110 on port 1883.
1480971167: New client connected from 192.168.1.110 as Plugwise-2-web4925 (c1, k60).
1480971170: New connection from 127.0.0.1 on port 1883.
1480971170: New client connected from 127.0.0.1 as mosq/V=_r1=HuPYP4[E_8Ki (c1, k60).
1480971186: New connection from 127.0.0.1 on port 1883.
1480971186: New client connected from 127.0.0.1 as mqtt_57bf9d9f.a84064 (c1, k60).
1480971218: Socket error on client Plugwise-2-web4925, disconnecting.

Not sure if the socket error is the culprit but I cannot find any other errors at the moment.

Any help is greatly appreciated.
Raspberry Pi
RFXCOM, AEOTEC, Plugwise (Pol)

User avatar
heggink
Posts: 122
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi
Domoticz version: V3.5877
Location: NL
Contact:

Re: Connecting Plugwise-2-py via MQTT to Domoticz

Postby heggink » Tuesday 06 December 2016 0:29

NVM, turned out that domoticz was not accepting any calls from localhost and wanted the IP instead.
Is it normal to have 3 devices per plug: 1 on, 1 off and one power?
Raspberry Pi
RFXCOM, AEOTEC, Plugwise (Pol)

User avatar
heggink
Posts: 122
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi
Domoticz version: V3.5877
Location: NL
Contact:

Re: Connecting Plugwise-2-py via MQTT to Domoticz

Postby heggink » Tuesday 03 January 2017 11:45

Hi SevenW,

Quick question on your implementation: I noticed that the devices are not listed as consumption devices. I do get the power readings but Domoticz doesn't track total consumption (unlike e.g. a dimmer with a power reading).

Does that make sense or did something go wrong discovering devices? Thx!

H
Raspberry Pi
RFXCOM, AEOTEC, Plugwise (Pol)


Return to “Meters”

Who is online

Users browsing this forum: No registered users and 1 guest