How to add a new *type* of virtual device?

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
axello2
Posts: 11
Joined: Tuesday 25 April 2017 13:03
Target OS: OS X
Domoticz version:
Contact:

How to add a new *type* of virtual device?

Post by axello2 »

I want to add some new sensors via MQTT to my domoticz system.
The first one is an air particulate sensor (Dylos DC1100), which measures the PM10 and PM2.5 particles. I send the data to the domotics/in MQTT channel, and it is received and retransmitted on the /out channel.

I modelled it after temp+humidity sensors, like thus:
/in:

Code: Select all

{"idx":24,"nvalue":0,"svalue":"261;11"}
/out:

Code: Select all

{
   "Battery" : 255,
   "RSSI" : 12,
   "dtype" : "Air Quality",
   "id" : "82024",
   "idx" : 24,
   "name" : "Dylos",
   "nvalue" : 0,
   "stype" : "Voltcraft CO-20",
   "svalue1" : "196",
   "svalue2" : "0",
   "unit" : 1
}
However, the only 'Air Quality' sensor in the predefined list is the Voltcraft CO2 sensor, and the Dylos measures something completely different.
Also, the graph does not appear with the two svalues.

Q: How does one create a device for a new type of signal and how does one create a double graph for these values?

Preferably something like this quickly photoshopped adaption:
airquality.png
airquality.png (68.68 KiB) Viewed 1906 times
I tried searching in the domoticz 'config' directory, but that seems mostly Z-Wave devices. The only other reference to the 'Voltcraft' device above is in the domoticz binary. Are all sensors hard coded???

I am happy to create a wiki page for this if I know how to do it.
Still learning...

Axel
axello2
Posts: 11
Joined: Tuesday 25 April 2017 13:03
Target OS: OS X
Domoticz version:
Contact:

Re: How to add a new *type* of virtual device?

Post by axello2 »

Let's bump this up, since there was no reply the last 11 months :(
aardbewoner
Posts: 4
Joined: Friday 11 May 2018 13:18
Target OS: Linux
Domoticz version: 4.9700
Contact:

Re: How to add a new *type* of virtual device?

Post by aardbewoner »

Indeed very sad there is no reply yet ,i have the same problem :x
gerardvs
Posts: 81
Joined: Sunday 04 January 2015 0:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest-1
Location: /dev/null
Contact:

Re: How to add a new *type* of virtual device?

Post by gerardvs »

Are all sensors hard coded???
So it seems. I also ran against a lot of "hard-coded" (i mean bad designed) behavior of Domoticz.
For general stuff like switching some lights with minor scripting aside, Domoticz is easy-peasy. But if you have, like me, things that are a little bit different than the developper(s) had on their bench, than the bad design and lack of any architectural vision of Domoticz will give you a lot of frustrations.

Not an answer to your question but I "solved" these problems by using node-red, Influxdb and Grafana for graphing and dashboard functionality. It is fairly easy to setup and runs fine next to, and less dependent of Domoticz.

Just my 2 cts.....
--Gerard
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest