Page 1 of 1

Interfacing with a system through Python

Posted: Thursday 24 April 2014 18:23
by darrepac
Hi,

I have a ventilation and heating solution that I succeeded to connect to the Pi (modbus protocol over RS485 converter). I am not asking to interface directly the system with Domoticz but I am able to write a python script to read information (temperature and so on) and write information (change some parameters).
How to update Domoticz?
On the read side, it is pretty easy as I can use JSON to update some dummy temperature monitor.
But on the write side? how can I make call to my python script from domoticz?

Re: Interfacing with a system through Python

Posted: Thursday 24 April 2014 19:08
by gizmocuz
you mean, with your python script you are able to read the ventilation/heating system,
and you want to get these values into domoticz?

If yes, search the forum!

If not, you want to get values from domoticz and use this to control your ventilation and heating system?
If yes, you can use lua for this, also search the forum :mrgreen:

Re: Interfacing with a system through Python

Posted: Thursday 24 April 2014 20:14
by darrepac
gizmocuz wrote:values from domoticz and use this to control your ventilation and heating system?
Yes, it was that part that was not known to me
If yes, you can use lua for this, also search the forum :mrgreen:
Now, I know how to dot it: Lua... thanks ;)

Re: Interfacing with a system through Python

Posted: Sunday 14 June 2015 13:26
by Dlanor
darrepac wrote:Hi,

I have a ventilation and heating solution that I succeeded to connect to the Pi (modbus protocol over RS485 converter.
How did you succeed? I am very interested.

Re: Interfacing with a system through Python

Posted: Monday 15 June 2015 20:30
by darrepac
It heavily depends on your heating/ ventilation system. I have a Nilan system which has a RS485/Modbus interface...

Re: Interfacing with a system through Python

Posted: Tuesday 23 February 2016 21:17
by alveman
darrepac wrote:It heavily depends on your heating/ ventilation system. I have a Nilan system which has a RS485/Modbus interface...
Hello,

Did you manage to read the values ​​through Modbus (Lua?) and update Domoticz? Can you please share your code. I'm trying to read my heatpump and think you code kan be useful.

Regards

Re: Interfacing with a system through Python

Posted: Wednesday 24 February 2016 10:35
by darrepac
I am not reading the value with Lua but with python (with minimal modbus library). The script in python is also taking care of updating Domoticz

Re: Interfacing with a system through Python

Posted: Wednesday 24 February 2016 12:23
by alveman
Ok, can you please share your python code.

Re: Interfacing with a system through Python

Posted: Wednesday 24 February 2016 13:57
by darrepac