Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By Albertooo
#62290 I have located a little more the fault. If I turn on the heat pump (heat mode) with the remote (par21maa) and command by mqtt {"mode": "HEAT"} the pump should ignore this order because it is already in heat mode and should not do anything, That order the pump goes off. If I turn on mqtt the pump and put it on mqtt {"mode": "HEAT"} if it does the right thing and ignores the order.

Regards!!!!
User avatar
By kayno
#62302 @SwiCago - I have set my upstream/master to your code, and gone and merged your code into mine. It was a bit of a merge nightmare, however I have just managed to get it to a point where it compiles! I am going to go and clean up now, and get the diff looking reasonable for you to review, and also (importantly) test test test to see if it works! Then I will push it up to my fork, and I can do a pull request for all of to review.

@Albertooo - the behaviour you describe, I am thinking is occurring because there is a default setting somewhere not in sync with what the actual heatpump is set to, and when you update another setting, it changes the other one that was out of sync. Maybe. I'd need to test more and try to replicate.
User avatar
By SwiCago
#62307
Albertooo wrote:I have located a little more the fault. If I turn on the heat pump (heat mode) with the remote (par21maa) and command by mqtt {"mode": "HEAT"} the pump should ignore this order because it is already in heat mode and should not do anything, That order the pump goes off. If I turn on mqtt the pump and put it on mqtt {"mode": "HEAT"} if it does the right thing and ignores the order.

Regards!!!!


Is it possible in MQTT you are in mode HEAT, but state OFF? So if you turn the heat pump to HEAT mode and state ON with par21maa, but then send mode HEAT with MQTT and state OFF, the heat pump will turn off.
The library updates all settings to heat pump, even if you only change one item. Say you change fan to 4 from 1, the whole command set is sent, including which mode to be in, vane settings etc. The heatpump needs the entire command set. So, if you are in OFF state on MQTT and set mode HEAT, it will send also the OFF command. If the heatpump was set ON from a remote or other controller, it will be turned OFF.

If you want your MQTT to be in sync with the HEATPUMP, then I suggest you look at my library again. It gets heat pumps current settings in via hp.sync(), which should be in your main.loop
You can periodically send the heat pump settings to your MQTT server, so that it is in sync with the heat pump. I have a feeling you are right now only getting the room temp, so you are only in sync with that.