MQTT to virtual sensors
Posted: Tuesday 04 May 2021 13:02
Not very familiar to MQTT and converting data to virtual sensors.
I am running Mosquitto on Synology and running SBFspot and Domoticz Beta V 2021.1 (build 13243) on Raspberry.
SBFspot dumps every 5 minutes its data to the broker and Domoticz/in tells me in the log this information:
So far so good!
I made some virtual sensors like
IDC1 (idx 180)
IDC2 (idx 181)
UDC1 (idx 182)
UDC2 (idx 183)
but how do I filter and update these sensors in Domoticz? Could not find an examplescript. I read the wiki about JSON but I don't know if the information is stored in the domoticz.db.
I Looked in my other script named Luftdaten but that is based on a query to the device. This is just the opposite, I think...
Lot's of questions. Maybe can give somebody a hint?
I am running Mosquitto on Synology and running SBFspot and Domoticz Beta V 2021.1 (build 13243) on Raspberry.
SBFspot dumps every 5 minutes its data to the broker and Domoticz/in tells me in the log this information:
Code: Select all
2021-05-04 12:10:03.896 Debug: MQTT: MQTT: Topic: domoticz/in, Message: {"Timestamp": "04/05/2021 12:10:03","SunRise": "04/05/2021 06:05:00","SunSet": "04/05/2021 21:04:00","InvSerial": 2100086206,"InvName": "SN: 2100086206","InvTime": "04/05/2021 12:09:36","InvStatus": "Ok","InvTemperature": 34.600,"InvGridRelay": "Closed","EToday": 2.566,"ETotal": 40273.693,"PACTot": 773.000,"UDC1": 371.760,"UDC2": 371.130,"IDC1": 1.067,"IDC2": 1.077,"PDC1": 396.000,"PDC2": 399.000}I made some virtual sensors like
IDC1 (idx 180)
IDC2 (idx 181)
UDC1 (idx 182)
UDC2 (idx 183)
but how do I filter and update these sensors in Domoticz? Could not find an examplescript. I read the wiki about JSON but I don't know if the information is stored in the domoticz.db.
I Looked in my other script named Luftdaten but that is based on a query to the device. This is just the opposite, I think...
Lot's of questions. Maybe can give somebody a hint?






