sidoh / esp8266_milight_hub

Replacement for a Milight/LimitlessLED hub hosted on an ESP8266
MIT License
932 stars 219 forks source link

No CSS in offline network #693

Open andreanilorenzo opened 3 years ago

andreanilorenzo commented 3 years ago

Describe the bug

No CSS in offline network

Steps to reproduce

Use the HUB in a network with no internet connection

Expected behavior

Without connection to the internet the CSS file is not loaded and therefore the menu is not correctly formatted making it difficult to use

Setup information

Firmware version

1.10.7 (nodemcuv2)

Output of http://milight-hub.local/about

"{"firmware":"milight-hub","version":"1.10.7","ip_address":"192.168.1.53","reset_reason":"Software/System restart","variant":"nodemcuv2","free_heap":17040,"arduino_version":"2_4_2","queue_stats":{"length":0,"dropped_packets":0}}"

Output of http://milight-hub.local/settings

"{"admin_username":"","admin_password":"","ce_pin":4,"csn_pin":15,"reset_pin":0,"led_pin":-2,"radio_interface_type":"nRF24","packet_repeats":40,"http_repeat_factor":1,"auto_restart_period":9800,"mqtt_server":"192.168.1.40:1883","mqtt_username":"mqtt_user","mqtt_password":"00","mqtt_topic_pattern":"milight/set/:device_id/:device_type/:group_id","mqtt_update_topic_pattern":"","mqtt_state_topic_pattern":"milight/states/:device_id/:device_type/:group_id","mqtt_client_status_topic":"milight/client_status/lorenzo","simple_mqtt_client_status":true,"discovery_port":48899,"listen_repeats":3,"state_flush_interval":10000,"mqtt_state_rate_limit":400,"mqtt_debounce_delay":400,"mqtt_retain":true,"packet_repeat_throttle_sensitivity":0,"packet_repeat_throttle_threshold":200,"packet_repeat_minimum":10,"enable_automatic_mode_switching":false,"led_mode_wifi_config":"Fast toggle","led_mode_wifi_failed":"On","led_mode_operating":"Slow blip","led_mode_packet":"Flicker","led_mode_packet_count":3,"hostname":"milight-hub-lorenzo","rf24_power_level":"MAX","rf24_listen_channel":"MID","wifi_static_ip":"192.168.1.53","wifi_static_ip_gateway":"192.168.1.1","wifi_static_ip_netmask":"255.255.255.0","packet_repeats_per_loop":20,"home_assistant_discovery_prefix":"","wifi_mode":"n","default_transition_period":400,"rf24_channels":["MID"],"device_ids":[16,17,18],"gateway_configs":[],"group_state_fields":["state","brightness","level","color_temp","bulb_mode","computed_color","effect"],"group_id_aliases":{"Milight-Bagno":["rgb_cct",16,1],"Milight-Cucina":["rgb_cct",17,1],"Milight-Ingresso":["rgb_cct",18,1]}}"
sidoh commented 3 years ago

Hi @andreanilorenzo, this is unfortunately expected. The CSS/javascript assets are not bundled and need to be downloaded from the Internet. It's possible to do this, but would be a fairly chunky change. If anyone's interested in working on this I have some pointers/reference material.