Domoticz full integration
-
In the quest for Domoticz full integration, I have been doing some prototyping in Python. Domoticz has very capable JSON support and virtual device types so we can do without "full integration" .
My python script is built around a 'dictionary' based Database with a hardcoded MySensor-Domoticz translation. The script is running stable with 20+ sensor/actuators and limited cpu load on raspberry pi (15%).What is next:
- dynamic sensor inclusion i.s.o. fixed nodes.
- more sensor types and support for combined devices (e.g. Temp, Hum, Baro)
- (sqlite i.s.o. python dictionary)
dependencies: requests, json
anybody interested?
You can find the attempt at: Domoticz-MySensors
all suggestions welcome.. -
In the quest for Domoticz full integration, I have been doing some prototyping in Python. Domoticz has very capable JSON support and virtual device types so we can do without "full integration" .
My python script is built around a 'dictionary' based Database with a hardcoded MySensor-Domoticz translation. The script is running stable with 20+ sensor/actuators and limited cpu load on raspberry pi (15%).What is next:
- dynamic sensor inclusion i.s.o. fixed nodes.
- more sensor types and support for combined devices (e.g. Temp, Hum, Baro)
- (sqlite i.s.o. python dictionary)
dependencies: requests, json
anybody interested?
You can find the attempt at: Domoticz-MySensors
all suggestions welcome.. -
In the quest for Domoticz full integration, I have been doing some prototyping in Python. Domoticz has very capable JSON support and virtual device types so we can do without "full integration" .
My python script is built around a 'dictionary' based Database with a hardcoded MySensor-Domoticz translation. The script is running stable with 20+ sensor/actuators and limited cpu load on raspberry pi (15%).What is next:
- dynamic sensor inclusion i.s.o. fixed nodes.
- more sensor types and support for combined devices (e.g. Temp, Hum, Baro)
- (sqlite i.s.o. python dictionary)
dependencies: requests, json
anybody interested?
You can find the attempt at: Domoticz-MySensors
all suggestions welcome..@AWI That would be pretty awesome!
If I can help anyhow, just say so.Currently I'm running Domoticz with custom-built gateway on MEGA, but could probably start switching whole thing to MySensors as whole setup use nRF24L01 :-)
How can I help? Or is it ready for tests?
-
@AWI That would be pretty awesome!
If I can help anyhow, just say so.Currently I'm running Domoticz with custom-built gateway on MEGA, but could probably start switching whole thing to MySensors as whole setup use nRF24L01 :-)
How can I help? Or is it ready for tests?
-
@andriej It is ready for test. Just edit the your setup in the header and adapt "Sensor_DB" to your setup. Nothing really fancy.
@AWI I'm after first test and that's what I get just after running the code:
# python mysensors-dom.py 2015-01-17 02:59:41 Start ('Wrong/No input from MySensors gateway', ValueError('No JSON object could be decoded',)) ('Wrong/No input from MySensors gateway', ValueError('No JSON object could be decoded',)) ('Wrong/No input from MySensors gateway', ValueError('No JSON object could be decoded',)) 0;0;3;0;14;Gateway startup complete. ('Wrong/No input from MySensors gateway', ValueError('No JSON object could be decoded',))Are these desired messages?
What I'm supposed to do later on? -
@AWI I'm after first test and that's what I get just after running the code:
# python mysensors-dom.py 2015-01-17 02:59:41 Start ('Wrong/No input from MySensors gateway', ValueError('No JSON object could be decoded',)) ('Wrong/No input from MySensors gateway', ValueError('No JSON object could be decoded',)) ('Wrong/No input from MySensors gateway', ValueError('No JSON object could be decoded',)) 0;0;3;0;14;Gateway startup complete. ('Wrong/No input from MySensors gateway', ValueError('No JSON object could be decoded',))Are these desired messages?
What I'm supposed to do later on?I've managed to get it to work.
First issue - since always I've reported temperature and humidity altogether (from DHT sensors).
Currently I can't specify one IDX for two values and I can't see in code where I could put two values to report in Domoticz at once.
They use to be reported in one URL. -
Good to see you are taking the jump... What you see in the first test is are generic error messages which can be generated in many place. There is a "catch-all" exception handler on the main loop, I suggest you take out the word "ValueError". After that the script will come to a halt and indicate where it went wrong.
I am 'almost' in the next major update. I hope to upload today .
Good luck!
-
@hek I am almost done with the python -Domoticz "full integration" but strugling with a few message types. The code for Vera is a good source for information but it is hard to determine the role of the controller in the construction/routing of the network. For now I assumed only node numbering and keeping track of the sensors. Is the controller supposed to do something with the relay nodes? what is the function of the I_CHILDREN message?
-
I've managed to get it to work.
First issue - since always I've reported temperature and humidity altogether (from DHT sensors).
Currently I can't specify one IDX for two values and I can't see in code where I could put two values to report in Domoticz at once.
They use to be reported in one URL.@andriej I will be posting a new version tomorrow which adds maximum functionality for Domoticz (from my view): combined sensors (trick), node numbering, inclusion and an external database in JSON. I will keep it running tonight to test the stability. ...
-
Major update (but still very beta...,) supports:
- dynamic sensor inclusion i.s.o. fixed nodes.
- more sensor types and support for combined domoticz devices (e.g. Temp, Hum, Baro)
- external JSON database
The python script is built around a 'dictionary' based Database with the MySensor-Domoticz translation. The script is running stable with 20+ sensor/actuators and limited cpu load on raspberry pi (15%).
Known issues:
- You need to edit the JSON database yourself if you need combined Domoticz devices eg. (Temp/Hum/Baro). Not difficult
- Need to create Switch types yourself in Domoticz , then assign these in the database
- Usage/power not supported yet (need a "multiple value" trick..)
You can find the attempt at: Domoticz-MySensors with a small instruction in the first few lines
all suggestions welcome..
-
Domoticz:
Starting with a native implementation, thanks to Ad for providing the RF interfaces.
Maybe best (for domoticz) to continue on the forum,
i need serial logs of all possible combinations and meaningnode-id;child-sensor-id;message-type;ack;sub-type;payload
we developers probably have to do some special tricks to get some nice sensors
for instance, it would be nice if there where subtypes for:
- Temp+Hum
- Temp+Hum+Baro
- Kwh+Watt
- Wind+Gust+Direction
I can not watch this forum, if you want to contribute, plz use the domoticz forum
-
Domoticz:
Starting with a native implementation, thanks to Ad for providing the RF interfaces.
Maybe best (for domoticz) to continue on the forum,
i need serial logs of all possible combinations and meaningnode-id;child-sensor-id;message-type;ack;sub-type;payload
we developers probably have to do some special tricks to get some nice sensors
for instance, it would be nice if there where subtypes for:
- Temp+Hum
- Temp+Hum+Baro
- Kwh+Watt
- Wind+Gust+Direction
I can not watch this forum, if you want to contribute, plz use the domoticz forum
-
In latest release of Domoticz I can see first implementations of MySensors!
Maybe it's worth a shot for someone to register on Domoticz forum and help their team out? -
Posted a new beta of domoticz.
Lots have been changedIf anyone can supply me with serial log messages of:
S_LIGHT_LEVEL
S_WATT
S_KWHThat would be helpfull
With regards,
Rob