Page 1 of 1
Python plugin: Tesy Boiler
Posted: Thursday 09 March 2023 20:51
by heggink
I got my Tesy C22 Modeco 120L boiler installed today. Since I have a dynamics energy contract, I need to control (heat, boost, temp) it whenever energy rates are interesting. The boiler has a really simple local http API (no security so be aware) for which I have written a simple python plugin just now.
I will add it to the plugins list but you can access it here:
https://github.com/heggink/domoticz-tesy
It creates the following devices: power, boost, mode, current temp and set temp (for manual mode). The plugi does not support any schedules in the device itself (not sure if I will ever implement since I will probably run these from domoticz) so if anyone wants to have a go at that...
Anyways, be gentle since its v0.0.1

. That said, I run it in prod already

.
Re: Python plugin: Tesy Boiler
Posted: Friday 08 March 2024 6:21
by Pluisje
Installed your plug-in but I get the following error in my log file:
Code: Select all
2024-03-08 06:03:37.304 Error: Boiler: Tesy URLError Reason: [Errno -2] Name or service not known
Any idea?
I can access the api in mij browser with fixed IP iso curl -X GET http ://tesy/api?name=_all
The boiler is the same type but with a capacity of 150 ltrs.
Re: Python plugin: Tesy Boiler
Posted: Friday 08 March 2024 10:46
by waltervl
On the plugin readme it is mentioned you can test the URL from the domoticz server in a terminal window with command:
Code: Select all
curl -X GET http://tesy/api?name=_all
Does it give proper results?
Re: Python plugin: Tesy Boiler
Posted: Saturday 09 March 2024 11:43
by Pluisje
Nope.
Only with the fixed ip like
Code: Select all
curl -X GET http://10.0.0.160/api?name=_all
Re: Python plugin: Tesy Boiler
Posted: Saturday 09 March 2024 16:35
by waltervl
Then it seems to be a bug in the plugin. It is hardcoded to
http://tesy instead of the given IP in hardware configuration.
Open the plugin.py and change tesy to your IP on the url configuration.
Edit
Change line 65 of plugin.py into
Code: Select all
req = 'http://' + str(self.TesyIP) + '/api?name=_all
Re: Python plugin: Tesy Boiler
Posted: Friday 15 March 2024 15:05
by Pluisje
Thank you very much.
Re: Python plugin: Tesy Boiler
Posted: Friday 15 March 2024 16:30
by waltervl
Does it work now?
Re: Python plugin: Tesy Boiler
Posted: Friday 15 March 2024 16:41
by Pluisje
Yes but I had to change all other references as well, initially the sensors did not update as it should.
In the onStart method
In the onCommand method 3x
In the onHeartbeat method
Anyway thanks for your support.
Re: Python plugin: Tesy Boiler
Posted: Friday 15 March 2024 16:50
by waltervl
Please make an issue on
https://github.com/heggink/domoticz-tesy/issues with all the changes you did so the author can change the plugin.
So the next user will not face the same issue...
Re: Python plugin: Tesy Boiler
Posted: Saturday 16 March 2024 10:23
by Pluisje
Yes that's done.
Re: Python plugin: Tesy Boiler
Posted: Monday 18 March 2024 9:11
by heggink
Apologies for the bug. I made a change in the code. Hope it works now.
I moved away from my own plugin (and most other plugins) probably some 9 months ago because of all the memory leaks in the plugin subsystem. Since a month or 6, most of these seem to have been fixed but I never went back to using plugins (with 1 or 2 exceptions) myself and built a simple nod-red thing (using autodiscovery) myself. Happy to share that for anyone interested although I would need to parameretise a bunch of things first for people to be able to use it (domoticz IP, mqtt IP, mqtt password, tesy IP).
Anyways, hope it works now. Plugin should be pretty stable anyway so me not doing much maintenance shoudl be no problem.
Re: Python plugin: Tesy Boiler
Posted: Wednesday 10 July 2024 12:21
by renerene
can you set the power (W) stepless with the Tesy and your python/mqtt plugin?
I'm in the process of buying an electric boiler. Don't know it is possible but if my PV system delivers i.e. 400 Watt return power netto to the net, the boiler should be set to 400 Watt. An on/off boiler regulation that switches to 2000 Watt, which would result in 1600 watt usage from the net, is not wanted. There has to be stepless power settings.
EDIT: assuming that it is not possible to have full control with Domoticz as master, with these modi:
ECO SMART, ECO COMFORT en ECO NIGHT
hmmm, i guess what i want is not possible. Best thing you can have at the moment in current market is 'a' connection with your boiler, not full control.