Page 6 of 10

Re: Python plugin: ELV/EQ-3 MAX!

Posted: Wednesday 07 November 2018 16:42
by DarkG
Hello again, the solution with a virtual Thermostat looks fine.

I created now a virtual Thermostat for my Bathroom. Will see what happens.
Also I created a dummy switch to set the setpoint via JSON.

The Virtual switch works and set the setpoint as I like over JSON. Now I will look how the Valve will change.

Re: Python plugin: ELV/EQ-3 MAX!

Posted: Wednesday 07 November 2018 17:06
by mvzut
Cool that you're actually testing it! It was just an idea that I got based on your question, never tested it myself. If it works well, let us know, more people might be interested to use this as an alternative control solution (including myself).

Re: Python plugin: ELV/EQ-3 MAX!

Posted: Wednesday 07 November 2018 18:01
by DarkG
Great news, it works very well.

You have to create a (hidden)
dummy device switch for each valve.

Use this Json URL to set SetPoint
http://127.0.0.1:8080/json.htm?type=set ... &used=true
Just change the idx to IDX from your Thermostat.

My Bedroom has a Temp+Humidity Sensor. Further I will look how I can create other Virtual Thermostat with this Sensor.
In my Bathroom the Tempsensor is a 18b20 which gives only the temp.

Python plugin: ELV/EQ-3 MAX!

Posted: Wednesday 07 November 2018 18:45
by mvzut
DarkG wrote: Wednesday 07 November 2018 18:01 Great news, it works very well.

You have to create a (hidden)
dummy device switch for each valve.

Use this Json URL to set SetPoint
http://127.0.0.1:8080/json.htm?type=set ... &used=true
Just change the idx to IDX from your Thermostat.

My Bedroom has a Temp+Humidity Sensor. Further I will look how I can create other Virtual Thermostat with this Sensor.
In my Bathroom the Tempsensor is a 18b20 which gives only the temp.
Great! By the way, interesting JSON command, didn't know about this one. Personally I would probably use

Code: Select all

127.0.0.1:8080/json.htm?type=command&param=udevice&idx=74&nvalue=0&svalue=25
but that has the disadvantage that a timer can override it again. If you don't have Domoticz timers on the thermostats created by the plugin, then either should work fine.

Pity that the Smart Virtual Thermostat doesn't support temperature + humidity devices. But you can create a (virtual) temperature-only sensor from a combined device with a time-based Lua script. If you need help with this let me know.

Re: Python plugin: ELV/EQ-3 MAX!

Posted: Wednesday 07 November 2018 19:55
by Freekers
Have you considered adding your plugin to the Plugin Manager for easy installation & updating :) ?
viewtopic.php?t=22339

Also, I think there is a bug with regards to the code
Previously, I've set to delete unwanted devices. However, afterwards I changed this back to not delete unwanted devices, but now Domoticz does not want to re-create the deleted switch anymore. It throws this error:

Code: Select all

2018-11-07 20:04:06.316 Error: (MAXCube) Device creation failed, Hardware/Unit combination (9:3) already exists in Domoticz.
2018-11-07 20:04:06.316 Error: (MAXCube) Device 'MAXCube - BadkamerRadiator - Mode' could not be created. Is 'Accept new Hardware Devices' enabled under Settings? 
I've double checked; Accept new Hardware Devices' is enabled and the devices is not in the Devices list.

Thank you :)

Kind regards.

Re: Python plugin: ELV/EQ-3 MAX!

Posted: Wednesday 07 November 2018 22:50
by mvzut
Freekers wrote:Have you considered adding your plugin to the Plugin Manager for easy installation & updating :) ?
viewtopic.php?t=22339

Also, I think there is a bug with regards to the code
Previously, I've set to delete unwanted devices. However, afterwards I changed this back to not delete unwanted devices, but now Domoticz does not want to re-create the deleted switch anymore. It throws this error:

Code: Select all

2018-11-07 20:04:06.316 Error: (MAXCube) Device creation failed, Hardware/Unit combination (9:3) already exists in Domoticz.
2018-11-07 20:04:06.316 Error: (MAXCube) Device 'MAXCube - BadkamerRadiator - Mode' could not be created. Is 'Accept new Hardware Devices' enabled under Settings? 
I've double checked; Accept new Hardware Devices' is enabled and the devices is not in the Devices list.

Thank you :)

Kind regards.
I have thought about adding it to the Plugin Manager, but wasn't sure if this was really necessary because there are probably not many users of MAX! hardware. However, it seems fairly easy to do, and it doesn't hurt either Image. So I think I'm just going to submit it.

UPDATE:
I have been able to recreate your bug, it was related to the internal device numbering logic. It should now be resolved (see Github). Thanks for finding this!

Re: Python plugin: ELV/EQ-3 MAX!

Posted: Thursday 08 November 2018 13:13
by DarkG
Good morning everyone.

@mvzut

I´ve looked for some script to split Temp/hume on DHT11. But nothing worked. Do you have a working script for this?

Re: Python plugin: ELV/EQ-3 MAX!

Posted: Thursday 08 November 2018 16:44
by mvzut
DarkG wrote: Thursday 08 November 2018 13:13 Good morning everyone.

@mvzut

I´ve looked for some script to split Temp/hume on DHT11. But nothing worked. Do you have a working script for this?
I am not able to test at this moment, but something like this should work (make it a device-based script):

Code: Select all

commandArray = {}

source = 'Sensor A'  -- name of temperature + humidity sensor
target = 'Sensor B'  -- name of dummy temperature-only sensor

if devicechanged[source] then
  commandArray['UpdateDevice'] = otherdevices_idx[target]..'|0|'..otherdevices_svalues[source]:match("([^;]+);")
end
  
return commandArray
Maybe you can already test this one.

Re: Python plugin: ELV/EQ-3 MAX!

Posted: Thursday 08 November 2018 18:57
by DarkG
Thank you, it works.

Re: Python plugin: ELV/EQ-3 MAX!

Posted: Thursday 08 November 2018 22:08
by Freekers
mvzut wrote: Wednesday 07 November 2018 22:50 UPDATE:
I have been able to recreate your bug, it was related to the internal device numbering logic. It should now be resolved (see Github). Thanks for finding this!
Thanks for the quick fix, it works!!

Re: Python plugin: ELV/EQ-3 MAX!

Posted: Thursday 08 November 2018 22:18
by mvzut
mvzut wrote: Wednesday 07 November 2018 22:50
Freekers wrote:Have you considered adding your plugin to the Plugin Manager for easy installation & updating :) ?
viewtopic.php?t=22339
I have thought about adding it to the Plugin Manager, but wasn't sure if this was really necessary because there are probably not many users of MAX! hardware. However, it seems fairly easy to do, and it doesn't hurt either Image. So I think I'm just going to submit it.
I have submitted a pull request to add the EQ-3-MAX! plugin to the Plugin Manager, I'll keep you posted.

Re: Python plugin: ELV/EQ-3 MAX!

Posted: Friday 09 November 2018 10:27
by mvzut
mvzut wrote: Wednesday 07 November 2018 22:50 I have submitted a pull request to add the EQ-3-MAX! plugin to the Plugin Manager, I'll keep you posted.
It has been added!

Re: Python plugin: ELV/EQ-3 MAX!

Posted: Friday 09 November 2018 14:22
by maxtrash
had to reinstall my max stuff because of the winter coming and an earlier rebuilt of my rpi. I have to say congratulations with the new plugin! Works like a charm and a big improvement over the LUA-stuff.
I am now trying to get it work as good as possible with my google home but that will be more for the controlicz related.
Thanks!

Re: Python plugin: ELV/EQ-3 MAX!

Posted: Friday 09 November 2018 17:05
by laulau
Hi,
What is the best way to update the plugin?
Thanks

Python plugin: ELV/EQ-3 MAX!

Posted: Friday 09 November 2018 17:12
by mvzut
On a Raspberry Pi, you can update by typing

Code: Select all

git reset --hard
git pull
in the folder where you placed the plugin (e.g. ~/domoticz/plugins/MaxCube/).

Or you can install the plugin via the Python Plugin Manager (which is in itself a Python plugin). It will then be updated automatically.

Python plugin: ELV/EQ-3 MAX!

Posted: Monday 12 November 2018 16:10
by mvzut
Hi all,

It's update time again ;-). I have made the following changes:
  • Made the minimum valve level for controlling the heat demand switch configurable. I noticed some people wanted to tweak this value to avoid too "nervous" switching of their boiler. I had to sacrifice one other parameter for this, I chose to remove the "Delete unwanted devices" option. It will now always delete devices that you don't want.
  • Made some small modifications to the logging, to mimic the logging format of Domoticz internal hardware updates
  • Did some code cleanup, making it slightly more efficient
  • Removed the detailed explanation of the features from the plugin's configuration screen, since this did not render very well in some themes. All necessary information about installation and configuration is now available on the Github README page (https://github.com/mvzut/maxcube-Domoticz-plugin)
  • Added a check if value has really changed when writing new setpoints or modes to the thermostats. This may help to reduce "EQ-3 hardware (..) thread seems to have ended unexpectedly" errors when changing many setpoints at the same time (e.g. from a script). Thanks michass for pointing this out!
Don't forget to revisit the plugin's configuration page after updating, check settings and click on "Update". It will probably throw some errors until this step is done, since the meaning of the parameters was changed.

Re: Python plugin: ELV/EQ-3 MAX!

Posted: Monday 12 November 2018 21:34
by Freekers
mvzut wrote: Friday 09 November 2018 10:27
mvzut wrote: Wednesday 07 November 2018 22:50 I have submitted a pull request to add the EQ-3-MAX! plugin to the Plugin Manager, I'll keep you posted.
It has been added!
Thank you very much!

Re: Python plugin: ELV/EQ-3 MAX!

Posted: Saturday 17 November 2018 21:42
by mvzut
Thegazsta wrote: Sunday 04 November 2018 19:35 Thanks Mvzut, if the temperature is set above 8c I don't get the error either! I can work around this now.
User Umberto found what caused the problem that you could not set thermostats below 8 degrees in Auto mode, it was a small bug in the API. A small modification was made in the code on Github, solving the issue.
Thanks Umberto for your help!

Re: Python plugin: ELV/EQ-3 MAX!

Posted: Tuesday 04 December 2018 19:11
by haajee
Maybe a really stupid question. But what is the correct way to make a daily program? Can i make the schedule in Domoticz of should i use the 'Max local location' to make a basic program?

Python plugin: ELV/EQ-3 MAX!

Posted: Tuesday 04 December 2018 19:15
by mvzut
haajee wrote:Maybe a really stupid question. But what is the correct way to make a daily program? Can i make the schedule in Domoticz of should i use the 'Max local location' to make a basic program?
Both solutions are fine. I personally do it in Domoticz, but if you really like the scheduling function of the MAX app, then go ahead and do it there. Domoticz will simply follow the new setpoint whenever it has changed by MAX's own program. As an added bonus, you can then also change between auto and manual modes (using the mode switch). But personally I prefer to have all my logic/scripts/programs as much as possible in one location (which is Domoticz for me).