Page 1 of 1

plugin help

Posted: Friday 07 April 2017 10:51
by flok
Hi,

I'm trying to implement a plugin for a certain service.
This service listens on a tcp socket and when you connect it, it immediately returns its status and disconnects.
No http, xml or json but some proprietary (note that I'll open source the plugin when finished) format.

I guess I need to use

Code: Select all

Domoticz.Protocol("None")
for that? But how do I then get the data? It looks like onMessage is for the http usecase?


And maybe I'm searching with my nose :D but I could not find the documentation for implementing a hardware monitoring plugin.

Re: plugin help

Posted: Friday 07 April 2017 12:20
by jorgh
@flok,

onMessage will deliver the data, no matter what the protocol.

As the service disconnects after delivering the data, you need to reconnect. You can use the heartbeat function for this.

Regards,

Jorg