arjenhiemstra / ithowifi

Itho wifi add-on module (ESP32 wifi to itho I2C protocol)
GNU General Public License v3.0
181 stars 32 forks source link

Timer on remote turn fan High but no timer... #110

Closed RPJacobs closed 2 years ago

RPJacobs commented 2 years ago

Describe the bug I installed two add-ons (with CC1101) on two CVE-Silent

Itho device type: CVE-Silent Itho fw version: 11

They both work, enabled MQTT -> Homebridge -> Apple Homekit, removed remote from unit and joined the add-on. (works great, thanks Arjen!)

I have this remote:

RFT Remote W (RFT bediening stand 1,2,3,T) (536-0124):
remote1

Al works as aspected, the only button that does not work is the timer.

remotes.json: "index": 0, "id": [ 78, 20, 81 ], "name": "remote0", "remfunc": 1, "remtype": 8945, "capabilities": { "lastcmd": 6 }

low button = "lastcmd": 4 med button = "lastcmd": 5 high button = "lastcmd": 6 Timer button = "lastcmd": 8

Timer options in Itho status.

Screenshot 2022-09-28 at 16 49 43

Can your please advice?

To Reproduce not sure what is going wrong...

Screenshots

Device information Configuration of the Itho unit: Itho device type: CVE-Silent Itho fw version: 11

Current firmware version: 2.4.0 Hardware revision: 2

Debug logging

arjenhiemstra commented 2 years ago

The timer button press is not giving any reaction?

Could you go to the debug page, active RF debug level 3 and press the timer button on the remote? I'm wondering what will show up in the debug log.

RPJacobs commented 2 years ago

RF debug level 3:

28-9-2022 22:47:12: _W 10 --,--,-- --,--,-- 4E,14,51 22F3 3:00,00,0A (cmd:timer1) 28-9-2022 22:47:12: _W 10 --,--,-- --,--,-- 4E,14,51 22F3 3:00,00,0A (cmd:timer1) 28-9-2022 22:47:12: _W 10 --,--,-- --,--,-- 4E,14,51 22F3 3:00,00,0A (cmd:timer1) 28-9-2022 22:47:12: RQ --- 7A,9D,02 04,AF,01 --,--,-- 0006 1:00 (cmd:unknown)

The fan speed spins to high, but never stops.

arjenhiemstra commented 2 years ago

Thanks!

The fan speed spins to high, but never stops.

You most probably have a MQTT loop somewhere. The timer works looking at your log, it triggers the fan to go to high speed and updates MQTT state topic. This update probably gets read by some domotica software and this software handles this as an update and posts the update to MQTT cmd topic again overruling the timer of the add-on.

RPJacobs commented 2 years ago

I disabled MQTT, tested the timer and it starts but never stops. What is the expected behaviour in "Itho status"? Should there be a counter for the timer?

Screenshot 2022-09-29 at 11 05 46
arjenhiemstra commented 2 years ago

Please reboot after disabling MQTT en try again (just to be sure). And also, an integration using the WebAPI could cause the same resetting / looping behaviour. To check what issues the last command you could look at the MQTT 'itho/lastcmd' (obviously you need to have MQTT active for this to work ;-)): ie.: {"source":"web interface","command":"timer:10","timestamp":1664526550} when a timer has been activated using the button on the web interface of the add-on

and {"source":"HTML API","command":"speed:20","timestamp":1664526585} When a speed command was given through the WebAPI.

You can check whether the timer is active on the queue by requesting the queue's contents. http://[nrg-itho-name]/api.html?get=queue

When a timer is active the result should look something like this: {"queue":[{"index":0,"speed":220,"valid":595600},{"index":1,"speed":-1,"valid":0},{"index":2,"speed":-1,"valid":0},{"index":3,"speed":-1,"valid":0},{"index":4,"speed":-1,"valid":0},{"index":5,"speed":-1,"valid":0},{"index":6,"speed":-1,"valid":0},{"index":7,"speed":-1,"valid":0},{"index":8,"speed":-1,"valid":0},{"index":9,"speed":-1,"valid":0}],"ithoSpeed":220,"ithoOldSpeed":220,"fallBackSpeed":20}

The valid value is the remaining time of the timer.

The values on the itho status page are the internal values requested from the itho firmware. Timers scheduled on the add-on are handled on the add-on and thus not visible in the itho firmware. A timer given by a remote (either physical or virtual by the add-on) is the only kind of timer visible in the itho firmware and will show up on the status page.

For more information on which kind of speed controlling commands you can send and how they are handled, please look here: https://github.com/arjenhiemstra/ithowifi/wiki/Controlling-the-speed-of-a-fan

RPJacobs commented 2 years ago

I think I fix the problem. reboot did not work, in the que I did not see a timer countdown.

To test I decreased the number of minutes from 10 to 1 in "System settings"

The test worked, now I changed the value back to 10 min and I can see the timer in: /api.html?get=queue

{"queue":[{"index":0,"speed":220,"valid":595800

MQTT is on