Plugin python - Connection function

Python and python framework

Moderator: leecollings

Post Reply
pipiche
Posts: 2016
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Plugin python - Connection function

Post by pipiche »

from the documentation of the python framework, the API Connection() should allow to bind on a specific IP and Port, however whatever IP I'm using I'm always get bound to 0.0.0.0

the call:

Code: Select all

        self.httpServerConn = Domoticz.Connection(
            Name="Zigate Server Connection", 
            Transport="TCP/IP", 
            Protocol="HTTP",
            Address="127.0.0.1",
            Port="9441"
        )

if we print self.httpServerConn, we got the right information
"Name: 'Zigate Server Connection', Transport: 'TCP/IP', Protocol: 'HTTP', Address: '127.0.0.1', Port: '9441', Baud: -1, Timeout: 0, Connected: False, Parent: 'None'"

but if you do netstat to see the binding, this doesn't match the expectations

Code: Select all

~/dev-domoticz/plugins (development *=)$ sudo netstat -plutn | grep 9441
tcp 0 0 0.0.0.0:9441 0.0.0.0:* LISTEN 21268/domoticz
Zigbee for Domoticz plugin / RPI3B+ / Electrolama ZZH-P / 45 devices

If the plugin provides you value, you can support me with a donation Paypal.

Wiki is available here.

Zigbee for Domoticz FAQ
pipiche
Posts: 2016
Joined: Monday 02 April 2018 20:33
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: France
Contact:

Re: Plugin python - Connection function

Post by pipiche »

any id, how we can bind to a specific IP:port instead of 0.0.0.0:port ?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest