Interfacing with a system through Python

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

Post Reply
darrepac
Posts: 133
Joined: Tuesday 04 February 2014 21:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Isère, France
Contact:

Interfacing with a system through Python

Post 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?
User avatar
gizmocuz
Posts: 2482
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Interfacing with a system through Python

Post 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:
Quality outlives Quantity!
darrepac
Posts: 133
Joined: Tuesday 04 February 2014 21:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Isère, France
Contact:

Re: Interfacing with a system through Python

Post 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 ;)
Dlanor
Posts: 67
Joined: Sunday 22 March 2015 16:18
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Interfacing with a system through Python

Post 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.
Domoticz| Zigbee | SONOFF
darrepac
Posts: 133
Joined: Tuesday 04 February 2014 21:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Isère, France
Contact:

Re: Interfacing with a system through Python

Post by darrepac »

It heavily depends on your heating/ ventilation system. I have a Nilan system which has a RS485/Modbus interface...
alveman
Posts: 21
Joined: Wednesday 29 January 2014 22:42
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Interfacing with a system through Python

Post 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
darrepac
Posts: 133
Joined: Tuesday 04 February 2014 21:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Isère, France
Contact:

Re: Interfacing with a system through Python

Post 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
alveman
Posts: 21
Joined: Wednesday 29 January 2014 22:42
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Interfacing with a system through Python

Post by alveman »

Ok, can you please share your python code.
darrepac
Posts: 133
Joined: Tuesday 04 February 2014 21:31
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Isère, France
Contact:

Re: Interfacing with a system through Python

Post by darrepac »

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests