Own sensor. Where to start?

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
capitalT
Posts: 11
Joined: Thursday 30 May 2019 9:51
Target OS: Linux
Domoticz version:
Contact:

Own sensor. Where to start?

Post by capitalT »

Hello,

I have made my own Arduino sensor that can communicate over the network. It is a simple alarm that can be either "High" or "Low" and I can craft my own HTTP requests.

My first question is, what is the best approach to connect it to Domoticz?
- Create a device in Domoticz an talk to the API directly? Or set a user variable?
- Let the device talk to an other script on the Domoticz server that will talk to Domoticz?
- Use MySensor or MQTT? (no experience with that)

When creating a sensor, what type?
- An Alert sensor
- A Selector Switch
- Custom Sensor

The custom sensor gives a gradient in the graph, where in reality the alarm is either "on" or "off", more like a light switch. The alert sensor comes closest to what the device does and multiple alarms could raise the "warning level".
Is adding your own device type to Domoticz an option?

Could someone point me in the right direction?
Thorgal789
Posts: 881
Joined: Wednesday 15 August 2018 14:38
Target OS: -
Domoticz version:
Contact:

Re: Own sensor. Where to start?

Post by Thorgal789 »

Hello, if you can talk directly to domoticz, why do you want to use MQTT, if you don't need something, don't use it, better to have less protocol/software layer.

And yes, I will take like you the alert sensor, custom sensor is awfull for logs, you can't disable it, and it make 1 record all 5mn for nothing.
capitalT
Posts: 11
Joined: Thursday 30 May 2019 9:51
Target OS: Linux
Domoticz version:
Contact:

Re: Own sensor. Where to start?

Post by capitalT »

Thanks. I will venture down that path ;)
moroen
Posts: 408
Joined: Sunday 15 January 2017 11:06
Target OS: Linux
Domoticz version: beta
Location: Norway
Contact:

Re: Own sensor. Where to start?

Post by moroen »

You could also look at creating a python plugin... The plugin framework supports HTTP-requests directly, so if your sensor has some kind of HTTP-based API it should be quite manageable.

Regards,
M
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest