plugin help

Python and python framework

Moderator: leecollings

Post Reply
flok
Posts: 2
Joined: Thursday 06 April 2017 22:49
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Gouda, the Netherlands
Contact:

plugin help

Post 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.
User avatar
jorgh
Posts: 124
Joined: Friday 27 June 2014 23:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8224
Location: Netherlands
Contact:

Re: plugin help

Post 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
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest