mariusmotea / diyHue

Philips Hue emulator that is able to control multiple types of lights
Other
627 stars 107 forks source link

Hue app crashes after setting location permission for sunset / sunrise routine #446

Closed ghostdex closed 5 years ago

ghostdex commented 5 years ago

I have an issue while setting up a sunset / sunrise routine. Normal routines are working like a charm. If i try to set up a sunset / sunrise routine the Hue app is always crashing after I confirm the location permission. After I set the permission the app is also crashing when I try to edit a normal time-based routine. To solve this issue I have to delete the app data which disables the location permission. How can I fix this problem? I'm running the latest diyHue version from 17th Nov and Hue app version 3.9.0.

mariusmotea commented 5 years ago

Let me try this, maybe there was something changed in last API. I was able to setup my location and i use sunset/sunrise routine.

mariusmotea commented 5 years ago

I was not able to replicate with last Android app. I was able to update the location on my installation and also i was able to set the location on new test installation. Can you share your config to see what may be the issue?

ghostdex commented 5 years ago

Thanks for your help. Here is my config file. config.zip

mariusmotea commented 5 years ago

I confirm the issue, it happens also to me with your config. i will try to find what generate the issue.

mariusmotea commented 5 years ago

Ok, the issue is that you use old config, and daylight sensor was not implemented at that time. You need to stop hue-emulator service or container if you use the docker image and perform following changes to config.json at the bottom the the file:

"1": {
            "manufacturername": "all 4 hue",
            "modelid": "Model 2015",
            "name": "Light state",
            "state": {
                "status": 0
            },
            "swversion": "1.0",
            "type": "CLIPGenericStatus",
            "uniqueid": "PFHS-LIGHT-STATE"
        },

made it:

          "1":{
           "state":{
              "daylight":null,
              "lastupdated":"none"
           },
           "config":{
              "on":true,
              "configured":false,
              "sunriseoffset":30,
              "sunsetoffset":-30
           },
           "name":"Daylight",
           "type":"Daylight",
           "modelid":"PHDL00",
           "manufacturername":"Philips",
           "swversion":"1.0"
        },

save and start back the application.

ghostdex commented 5 years ago

Thanks a lot. Now it's working :)