ch3rn1k / homebridge-multipurpose-kettle

Homebridge plugin for Xiaomi Multipurpose Kettle
MIT License
11 stars 0 forks source link

Temperature controlling with Siri - Issue °C - °F #3

Closed DJay-X closed 4 years ago

DJay-X commented 4 years ago

First of all and again, thanks for your work and this great Homebridge Plugin. Today I received my viomi-health_pot-v1 Kettle. The plugin was installed and the setup done in short time and worked directly.

I configured it as Thermostat because I think it's great to have the possibility to set it to a specific temperature.

However, when I ask Siri to set the temperature to 95° (Celsius) the confirmation is strange. Setting the temperature from 187°F to 95°F And the thermostat is set to 35°C

Maybe you have an Idea why this mishmash happens and how to fix?

Thanks again.

RPReplay_Final1588076834 2020-04-28 15_41_42

Napkin 28 04 20, 3 44 10 PM

{
            "accessory": "MiMultipurposeKettle",
            "ip": "192.168.xxx.xx",
            "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "mode": "thermostat",
            "heat": 85,
            "name": "Wasserkocher",
            "sound": true,
            "temperature": true
        }
ch3rn1k commented 4 years ago

Hello! Thanks for your feedback, going to check what's wrong now.

DJay-X commented 4 years ago

And maybe in addition.. 🙈 I noticed that heating (on) is noticed nearly instant. But when the Kettle is turning off, this is not noticed instant or not at all. 🤷🏼‍♂️ Only after refreshing the App Eve/Home it is getting the status that it's off.

I'm triggering an automation with the on/off state, so I have a dependency on the status reported back. May you also have an Idea.

Thanks a lot.

And I miss your donate "PayPal" or "BuyMeACoffee" Button. 😉

ch3rn1k commented 4 years ago

Ah, found that "degree" for Siri is default Fahrenheit. If you tell Siri "Switch on Kettle 100 celsius degree" it going to work well. I think I can add another option to use default celsius without saying celsius every time and converting fahrenheit to celsius.

About switch on/off state - will test it, thanks!

ch3rn1k commented 4 years ago

Well, found that there is no way to detect Siri's value type, you will need to use "Switch on kettle 70 celsius" so. 😞

But about your second problem - added some code and now it will work as needed!

DJay-X commented 4 years ago

Thanks a lot @ch3rn1k Of course I instantly updated and I will have a look on how it works.

First run ending heating and kettle switching off, was unfortunately not noticed by Eve and Home App. Only after I opened Eve App, entered Kitchen Room and the device was refreshed due to this, then that state changed to heating off. 🤷🏼‍♂️

Due to COVID-19 situation we are at home a lot so I will let you know. I hope not to bother when I noticed some other things. If there is anything I can do to help investigate, please of course let me know.

I will try to change to "switch" in the config what maybe is more reliable? With the Fahrenheit/Celsius its anyway not that smooth. ;)

Let me know, if I can do something. Thanks again so much for your work.

DJay-X commented 4 years ago

I still have the problem when asking Siri, that the Kettle with first try is not turning on. No matter if switch or thermostat. At the moment I'm on switch setting.

Napkin 29 04 20, 2 48 42 PM

Hey Siri, turn the kettle on. Waiting ... waiting... waiting ... I tried but the device "Kitchen" Switch is not responding.

When I try again after this happened, Siri is turning the Kettle on instantly. Also why is it called "Kitchen" Switch? I named the device "Wasserkocher" Kettle in the config also that's the name in Home in every place.

Napkin 29 04 20, 2 53 05 PM

Maybe something more to investigate if there is time. 😊🙏

DJay-X commented 4 years ago

And I noticed a few times the connection problem indicator. ⚠ Homebridge itself is running good.

https://youtu.be/9wFIPm6PWJc

Napkin 29 04 20, 3 32 31 PM

ch3rn1k commented 4 years ago

Hmm, any homebridge errors in console (do you use UI)? Which version of homebridge do you use? Thanks!

DJay-X commented 4 years ago

I can reproduce the error. When talking to Siri on HomePod or iPhone the first time Siri can not turn the Kettle on. Trying, waiting, device not responding. When I immediately after this ask again, turn on the Kettle, Siri is turning on the Kettle immediately. This is working a few minutes. Asking first time Siri is doing it instant. Only after a while 10+ Minutes or so, the first attempt is not working again. Second attempt its working. Without having the knowledge it feels like there is a timeout. Siri is waiting the first time and it takes probably only a few seconds to long and then the error message of that the Kettle is not responding. But because it is, just taking a few seconds more, the second time it works instant.

Hope this helps. :)

ch3rn1k commented 4 years ago

I can reproduce the error. When talking to Siri on HomePod or iPhone the first time Siri can not turn the Kettle on. Trying, waiting, can't do. When I immediately after this Issue ask again, turn on the Kettle, Siri is turning on the Kettle immediately. This is working a few minutes. Asking first time Siri is doing it instant. Only after a while 10+ Minutes or so, the first attempt is not working again. Second attempt its working. Without having the knowledge it feels like there is a timeout. Siri is waiting the first time and it takes probably only a few seconds to long and then the error message of that the Kettle is not responding. But because it is, just taking a few seconds more, the second time it works instant.

Hope this helps. :)

Yes, that was really helpfull! Going to dive into it!

DJay-X commented 4 years ago

Thanks a lot. I really hope not to bother and you are also interested in this going to work smooth.

You have to let me spend you a beer or two later on. :) Tea we have enough then. ;)

DJay-X commented 4 years ago

Hmm, any homebridge errors in console (do you use UI)? Which version of homebridge do you use? Thanks!

homebridge@1.0.3 node@12.16.2 npm@6.14.4 config-ui-x@4.17.1

Homebridge is running smooth like always. ;) No error in the log.

DJay-X commented 4 years ago

I' so sorry. There is now another issue.

When I turn the kettle on in HomeKit it instantly is turning off. Showing Mi Home Notification "Cooking complete" Keeping hot finished". However the Water temp was on 41°C and my config.sys is of course set to 85. I unplugged the kette and re-pluged it. Same Issue. When turning the Kettle on in Eve App, the physical Kettle is turning off instantly. 😩

RPReplay_Final1588188881 2020-04-29 21_39_18

{
            "accessory": "MiMultipurposeKettle",
            "ip": "192.168.xxx.xx",
            "token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "mode": "switch",
            "heat": 85,
            "name": "Wasserkocher",
            "sound": true,
            "temperature": true
        }

Edit: No Idea what it was. I had to delete the kettle from Mi Home App and add it again. Of course find the new token and placed it in the config. After restart homebridge it is working again. Probably I or a family member did something strange on the kettle display itself not knowing what it was in Chinese.

ch3rn1k commented 4 years ago

Hello! I have pushed a little bit more changes and added logging. So if this going to happend again - just open console and send to me logs please. Logs looks like this:

Annotation 2020-04-30 090025

ch3rn1k commented 4 years ago

About "No response" error while using Siri i'm going to create another issue

DJay-X commented 4 years ago

Hello! I have pushed a little bit more changes and added logging. So if this going to happend again - just open console and send to me logs please. Logs looks like this:

Annotation 2020-04-30 090025

Thanks. I will have an eye on the log. And thanks for adjusting the plugin. I noticed that when turning on the kettle on the base, the state on/off was not reflected to Homebridge/HomeKit. At least not in an expected time. In the log was absolutely nothing to see when starting the Kettle on the base.

Thanks again

ch3rn1k commented 4 years ago

No way to detect which type of temperature were sended to the plugin, sorry guys. 😢