Skip to content

Commit

Permalink
Fixed issue #178
Browse files Browse the repository at this point in the history
  • Loading branch information
tpanajott committed Sep 7, 2024
1 parent fd7eb67 commit 8bed04e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ docker/test-beta/data*
docker/web/nspanelmanager/db.sqlite3
docker/web/nspanelmanager/secret.key
docker/web/node_modules/
docker/nginx/sites-enabled/nspanelmanager.conf
firmware/NSPanelManagerFirmware/data/config.json
firmware/NSPanelManagerFirmware/.pio
firmware/NSPanelManagerFirmware/littlefs.md5
Expand Down
4 changes: 2 additions & 2 deletions docker/MQTTManager/include/light/home_assistant_light.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ void HomeAssistantLight::send_state_update_to_controller() {
} else if (this->_home_assistant_light_type == MQTT_MANAGER_HOME_ASSISTANT_LIGHT_TYPE::TYPE_SWITCH) {
service_data["domain"] = "switch";
if (this->_requested_state) {
service_data["service"] = "switch_on";
service_data["service"] = "turn_on";
} else {
service_data["service"] = "switch_off";
service_data["service"] = "turn_off";
}
}
HomeAssistantManager::send_json(service_data);
Expand Down
18 changes: 9 additions & 9 deletions docker/nginx/sites-enabled/nspanelmanager.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@ server {
# max upload size
client_max_body_size 75M; # adjust to taste

location /static {
alias /usr/src/app/nspanelmanager/web/static;
}

location /websocket {
proxy_pass http://mqttmanager;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;}


location /{
proxy_pass http://django;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;}

# Finally, send all non-media requests to the Django server.
}
location / {
uwsgi_pass django;
include /etc/nginx/sites-enabled/uwsgi_params;
}
}

0 comments on commit 8bed04e

Please sign in to comment.