Skip to content
This repository has been archived by the owner on Feb 14, 2021. It is now read-only.

Compatible with other stoves? #2

Closed
gzeel opened this issue Jan 7, 2021 · 17 comments
Closed

Compatible with other stoves? #2

gzeel opened this issue Jan 7, 2021 · 17 comments
Labels
question Further information is requested

Comments

@gzeel
Copy link

gzeel commented Jan 7, 2021

Hi,

I also have a T009 Navel 2.0 wifi device on my pellet stove, only I have a JollyMec stove. Do you have any idea whether the commands that the T009 Navel 2.0 sends are the same and therefore your code can be used (with some adjustments)?

@fredericvl
Copy link
Owner

Hi @gzeel,

Actually the code mimics the API calls that are made by the iOS/Android app of Eva Calor, it does not connect directly to the WiFi module.
I downloaded the JollyMec app and have checked the API calls that are made, they should be the same but with another domain and customer code.
This would result in the following changes to get it working for your JollyMec stove:

- API_URL = "https://micronova.agua-iot.com"
+ API_URL = "https://jollymec.agua-iot.com"
- EVA_CALOR_CUSTOMER_CODE = "635987"
+ EVA_CALOR_CUSTOMER_CODE = "732584"

I'm not going to make any promises but maybe it's an idea to create a separate Python module where the the URL & customer code are adjustable so it can work with other brands too (not just Eva Calor).

@fredericvl fredericvl added the question Further information is requested label Jan 9, 2021
@gzeel
Copy link
Author

gzeel commented Jan 9, 2021

Wow, that would be great. In the meantime, I will see if I can get some response from my stove with your actual code.

@fredericvl
Copy link
Owner

@gzeel In the meantime, I created a more generic Agua IOT module: https://github.com/fredericvl/py-agua-iot
Just FYI if you also use Home Assistant: I also updated the HA example in there so the parameters can be set when adding the integration.

@jorgesousa1975
Copy link

can you help me a little bit more with what does it mean: "add the Micronova Agua IOT integration using the Agua IOT API url and customer code of the brand " ?

@gzeel
Copy link
Author

gzeel commented Jan 9, 2021

@gzeel In the meantime, I created a more generic Agua IOT module: https://github.com/fredericvl/py-agua-iot
Just FYI if you also use Home Assistant: I also updated the HA example in there so the parameters can be set when adding the integration.

Great! That integration works with my Jolly Mec stove, however I’m getting this error :

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 316, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 531, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 322, in _async_write_ha_state attr.update(self.state_attributes or {}) File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 230, in state_attributes self.target_temperature, File "/config/custom_components/aguaiot/climate.py", line 191, in target_temperature return self._device.set_air_temperature File "/usr/local/lib/python3.8/site-packages/py_agua_iot/__init__.py", line 563, in set_air_temperature return float(self.__get_information_item('temp_air_set')) ValueError: could not convert string to float: '23.0°C'

@jorgesousa1975
Copy link

It partially works for me, with an EvaCalor device. I can add it, get the current status, etc, but when I try to change the Operation (from Heat to Off) or the Fan mode (to set to 1 to 6) it doesn't do anything, and after a second just goes back to the same. Looks like getting the status, but not able to change. ANy ideas?

@fredericvl
Copy link
Owner

@gzeel I've released v0.0.3 with a fix for your problem, seems that some stoves are returning strings '23.0°C' rather than floats like mine '23.0'.
To get it working you will need to re-copy the Home Assistant example folder/files and restart HA (because I bumped the version to v0.0.3).
Please let me know if you have any other problems.

@jorgesousa1975 Can you also do the same and then try again?

@gzeel
Copy link
Author

gzeel commented Jan 10, 2021

@gzeel I've released v0.0.3 with a fix for your problem, seems that some stoves are returning strings '23.0°C' rather than floats like mine '23.0'.
To get it working you will need to re-copy the Home Assistant example folder/files and restart HA (because I bumped the version to v0.0.3).
Please let me know if you have any other problems.

Great, it works!

[edit]
Could you still have to change something in the set_temperature? Because I also see the same messages there if I want to adjust the temperature.

Failed to set temperature, error: could not convert string to float: '45.0°C'
(I’m setting it to 22.5, not 45.. So maybe that’s another issue..
[/edit]

Really thankfull, can I help you with this project or buy you a coffee?

@fredericvl
Copy link
Owner

Could you still have to change something in the set_temperature? Because I also see the same messages there if I want to adjust the temperature.

Failed to set temperature, error: could not convert string to float: '45.0°C'
(I’m setting it to 22.5, not 45.. So maybe that’s another issue..

Well actually the 45 is correct but that is behind the scenes, the temperature values are formula based (formula can differ per device) and mostly they double the value of the temperature, probably because at the WiFi module side it cannot handle floats.
But you're right and there was definitely something wrong in my logic for setting the temperature...
I was sending the value as a formatted string and actually I need to send the value as-is.
v0.0.4 has been released to hopefully fix your problem, can you bump the version in HA and test once more please?

Really thankfull, can I help you with this project or buy you a coffee?

I'm always in for a coffee 😄 ☕ https://www.buymeacoffee.com/fredericvl

@jorgesousa1975
Copy link

Hi,
I've downloaded the Zip again, picked the evacalor folder under examples, and dumped into the custom_components. Restarted the HA, but same as before. I can get the status precisely, but I can't change from off to on, or the temperature. I see the drop down, but then I can't change it. The Fan mode is not showing any status, just "Fan mode", if I change it to 1-to-6, after 1-2 seconds it goes back to empty. Same with the operation, but that does reflect correctly the status, but if I try to change it reverts to what it was.

@gzeel
Copy link
Author

gzeel commented Jan 10, 2021

v0.0.4 has been released to hopefully fix your problem, can you bump the version in HA and test once more please?

Works!

Tested so far:

on/off stove -> OK
change temperature -> OK

@jorgesousa1975
Copy link

Unfortunately not for me, I've tried the specific one EVACALOR as well as this more generic of AGUAIOT.

Jorge

@fredericvl
Copy link
Owner

Unfortunately not for me, I've tried the specific one EVACALOR as well as this more generic of AGUAIOT.

Jorge

Maybe I was a bit unclear but the changes I did were only on the generic AGUA IOT one.
Since the codebase is pretty much the same I suggest to use the AGUA IOT integration, then I don't have to maintain 2 projects.

Since the actions you've tried did not succeed, this should be logged as errors.
Can you copy-paste the errors / logs of Home Assistant?
Without logs it's quite impossible to troubleshoot your issue...

@jorgesousa1975
Copy link

How do I get the logs? Since there is not really errors, is there a place where I can get the logs from, specifically to this component?

@fredericvl
Copy link
Owner

How do I get the logs? Since there is not really errors, is there a place where I can get the logs from, specifically to this component?

Via Configuration => Logs (more info: https://www.home-assistant.io/integrations/system_log/)

@jorgesousa1975
Copy link

I've got this on error log:

Logger: custom_components.aguaiot.climate
Source: custom_components/aguaiot/climate.py:260
Integration: Micronova Agua IOT (documentation)
First occurred: 7:25:37 PM (1 occurrences)
Last logged: 7:25:37 PM

Failed to set fan mode, error: Error while trying to set power

--

Logger: custom_components.aguaiot.climate
Source: custom_components/aguaiot/climate.py:246
Integration: Micronova Agua IOT (documentation)
First occurred: 7:28:22 PM (1 occurrences)
Last logged: 7:28:22 PM

Failed to set temperature, error: Error while trying to set temperature

2021-01-12 19:28:18 ERROR (SyncWorker_6) [custom_components.aguaiot.climate] Connection to Agua IOT not possible
2021-01-12 19:28:22 ERROR (SyncWorker_3) [custom_components.aguaiot.climate] Failed to set temperature, error: Error while trying to set temperature
2021-01-12 19:28:22 ERROR (SyncWorker_7) [custom_components.aguaiot.climate] Connection to Agua IOT not possible
2021-01-12 19:28:29 ERROR (SyncWorker_9) [custom_components.aguaiot.climate] Failed to set fan mode, error: Error while trying to set power
2021-01-12 19:28:29 ERROR (SyncWorker_10) [custom_components.aguaiot.climate] Connection to Agua IOT not possible
2021-01-12 19:28:33 ERROR (SyncWorker_10) [custom_components.aguaiot.climate] Failed to turn off device, error: Error while trying to turn off device
2021-01-12 19:28:33 ERROR (SyncWorker_7) [custom_components.aguaiot.climate] Connection to Agua IOT not possible

@fredericvl
Copy link
Owner

@jorgesousa1975 : What parameters did you use to setup the integration? (URL, customer code, brand id)
It looks like the URL is not available but you would not be able to setup the integration if that's the case, so I'm a bit wondered in fact...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants