EdddieN / machinon-domoticz_theme

GNU General Public License v3.0
46 stars 21 forks source link

Features broken with Domoticz beta #294

Closed davidlb closed 4 years ago

davidlb commented 5 years ago

Some features (ie switches state) are broken with last Domoticz Beta versions. As Domoticz moved from ajax calls to websocket to get devices status, function $(document).ajaxSuccess(function (event, xhr, settings) in custom.js is not called anymore.

https://github.com/EdddieN/machinon-domoticz_theme/blob/184fc3c43d93c05fd1a23e951a1898090a260457/custom.js#L175-L227

DewGew commented 5 years ago

I haven't noticed any issues yet..

davidlb commented 5 years ago

For the moment, I just found the switch feature broken. I started to create a branch to manage websocket.

davidlb commented 5 years ago

And I guess notifications are broken too (I don't use them)

DewGew commented 5 years ago

My notifications work

DewGew commented 5 years ago

Now I get it. Its not custom functions is not updating. Did you find any solution?

davidlb commented 5 years ago

We need to catch update from the websocket but it needs rewrite of several functions. I think the better will be to create a new branch

DewGew commented 5 years ago

Sure use this one: https://github.com/EdddieN/machinon-domoticz_theme/tree/websocket

DewGew commented 5 years ago

Getting anywere with this? I dont have any clue about websockets..

davidlb commented 5 years ago

Not much, switches are more or less working :/

davidlb commented 5 years ago

@EdddieN @DewGew do we really need big switches? It's a ugly hack in JS & CSS just to imitate the icon behaviour and I don't know how to make it working properly with Domoticz beta.

EdddieN commented 5 years ago

No we don't, which switches? let me know what you mean and we probably can change it to be easier to maintain.

davidlb commented 5 years ago

image

These switches

DewGew commented 5 years ago

I don’t use them. But I think then are quite handy🤔 Time ago (moment) also dont update

davidlb commented 5 years ago

@DewGew it should have been fixed few hours ago with commit 3bf1663be4f984425c3b927018bc15534e13e3ec

EdddieN commented 5 years ago

the original design did not have them. That was done becasue back then we did not know how to make the buttons on or faded out. Maybe we could do it now? A bit like Homekit?

davidlb commented 5 years ago

I'm done with websocket changes (major refactoring). Can you test the branch? I didn't test the rewrite with previous version of domoticz (without websocket) but it should also work.

Note: for the moment: switch are only displayed for on/off switch.

davidlb commented 4 years ago

Merged into beta