Python plugin: Tesy Boiler

Python and python framework

Moderator: leecollings

Post Reply
User avatar
heggink
Posts: 980
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Python plugin: Tesy Boiler

Post 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 :lol: .
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
Pluisje
Posts: 7
Joined: Monday 13 April 2020 16:19
Target OS: NAS (Synology & others)
Domoticz version: 2024.4
Contact:

Re: Python plugin: Tesy Boiler

Post 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.
Last edited by Pluisje on Saturday 09 March 2024 12:00, edited 2 times in total.
Domoticz 2024.4 (build 15910) running on Synology (DS920+ DSM 7) with P1, Conbee II, RFXtrx433 Version: Pro XL1/1044
User avatar
waltervl
Posts: 5904
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python plugin: Tesy Boiler

Post 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?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Pluisje
Posts: 7
Joined: Monday 13 April 2020 16:19
Target OS: NAS (Synology & others)
Domoticz version: 2024.4
Contact:

Re: Python plugin: Tesy Boiler

Post by Pluisje »

Nope.
Only with the fixed ip like

Code: Select all

curl -X GET http://10.0.0.160/api?name=_all
Domoticz 2024.4 (build 15910) running on Synology (DS920+ DSM 7) with P1, Conbee II, RFXtrx433 Version: Pro XL1/1044
User avatar
waltervl
Posts: 5904
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python plugin: Tesy Boiler

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Pluisje
Posts: 7
Joined: Monday 13 April 2020 16:19
Target OS: NAS (Synology & others)
Domoticz version: 2024.4
Contact:

Re: Python plugin: Tesy Boiler

Post by Pluisje »

Thank you very much.
Domoticz 2024.4 (build 15910) running on Synology (DS920+ DSM 7) with P1, Conbee II, RFXtrx433 Version: Pro XL1/1044
User avatar
waltervl
Posts: 5904
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python plugin: Tesy Boiler

Post by waltervl »

Does it work now?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Pluisje
Posts: 7
Joined: Monday 13 April 2020 16:19
Target OS: NAS (Synology & others)
Domoticz version: 2024.4
Contact:

Re: Python plugin: Tesy Boiler

Post 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.
Domoticz 2024.4 (build 15910) running on Synology (DS920+ DSM 7) with P1, Conbee II, RFXtrx433 Version: Pro XL1/1044
User avatar
waltervl
Posts: 5904
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Python plugin: Tesy Boiler

Post 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...
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Pluisje
Posts: 7
Joined: Monday 13 April 2020 16:19
Target OS: NAS (Synology & others)
Domoticz version: 2024.4
Contact:

Re: Python plugin: Tesy Boiler

Post by Pluisje »

Yes that's done.
Domoticz 2024.4 (build 15910) running on Synology (DS920+ DSM 7) with P1, Conbee II, RFXtrx433 Version: Pro XL1/1044
User avatar
heggink
Posts: 980
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Python plugin: Tesy Boiler

Post 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.
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
renerene
Posts: 351
Joined: Wednesday 03 August 2016 11:36
Target OS: -
Domoticz version:
Contact:

Re: Python plugin: Tesy Boiler

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest