Skip to content

Commit 85321d0

Browse files
committed
v1.0.5: Fix connection issues caused by v1.0.3/1.0.4
## Critical Fixes - Removed duplicate Content-Type header (aiohttp sets it automatically) - Fixed asyncio.CancelledError handling - was breaking task cancellation - Reduced retry count from 3 to 2 to reduce traffic spikes If downgrading to older version worked, this release fixes the issue.
1 parent e4caf37 commit 85321d0

File tree

18 files changed

+1319
-22
lines changed

18 files changed

+1319
-22
lines changed

.github/workflows/hacs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@ jobs:
1515
uses: hacs/action@main
1616
with:
1717
category: integration
18-

.gitignore

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ __pycache__/
77
*.egg-info/
88
dist/
99
build/
10+
release/
1011

1112
# IDEs
1213
.vscode/
@@ -31,9 +32,6 @@ htmlcov/
3132
.env
3233
*.local
3334

34-
# Personal/local deployment tools (do not commit)
35-
deploy.js
36-
deploy-fix.sh
37-
DEPLOY_NOW.md
38-
DEPLOYMENT_GUIDE.md
35+
# Node modules (if any)
36+
node_modules/
3937

BUILD_DEPLOY.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Build & Deploy Guide
2+
3+
## Available Commands
4+
5+
### Build Commands
6+
7+
- `npm run build` - Validates and builds the integration
8+
- `npm run build:release` - Creates a release package with zip file
9+
- `npm run build:deploy` - Builds and deploys to Home Assistant
10+
11+
### Deploy Commands
12+
13+
- `npm run deploy` - Deploys the integration to Home Assistant
14+
- `npm run release` - Alias for build:release
15+
16+
### Version Management
17+
18+
- `npm run version:update` - Updates version across all files
19+
- `npm run build 1.0.2` - Build with specific version update
20+
21+
## Quick Start
22+
23+
### Deploy to Home Assistant
24+
25+
```bash
26+
# Build and deploy in one command
27+
npm run build:deploy
28+
```
29+
30+
### Create a Release
31+
32+
```bash
33+
# Create release package for GitHub/HACS
34+
npm run build:release
35+
```
36+
37+
### Update Version and Release
38+
39+
```bash
40+
# Build with new version and create release
41+
npm run build 1.0.2 --release
42+
```
43+
44+
## What Each Command Does
45+
46+
### `npm run build`
47+
48+
1. Validates all Python files for syntax errors
49+
2. Validates all JSON files (manifest, strings, translations)
50+
3. Creates a clean distribution in `dist/` directory
51+
4. Shows current version from manifest.json
52+
53+
### `npm run build:release`
54+
55+
1. Does everything `build` does
56+
2. Creates a zip file in `release/` directory
57+
3. Copies README, LICENSE, and other docs to release folder
58+
4. Ready for GitHub releases or manual HACS installation
59+
60+
### `npm run deploy`
61+
62+
1. Checks if Home Assistant config is mounted
63+
2. Verifies HA instance is reachable
64+
3. Removes old integration version
65+
4. Copies new files to custom_components
66+
5. Shows next steps for HA restart
67+
68+
## File Structure
69+
70+
```
71+
Ultra Card Pro Cloud/
72+
├── custom_components/ # Source integration files
73+
│ └── ultra_card_pro_cloud/
74+
├── dist/ # Build output (git ignored)
75+
│ └── ultra_card_pro_cloud/
76+
├── release/ # Release packages (git ignored)
77+
│ └── ultra-card-pro-cloud-v*.zip
78+
├── build.js # Build script
79+
├── deploy.js # Deploy script
80+
└── package.json # NPM scripts
81+
```
82+
83+
## Requirements
84+
85+
- Node.js installed
86+
- Python 3 (optional, for validation)
87+
- Home Assistant config mounted at `/Volumes/config`
88+
- Network access to your HA instance
89+
90+
## Troubleshooting
91+
92+
### Deploy fails with "volume not mounted"
93+
94+
1. Mount your HA config share
95+
2. In Finder: Go → Connect to Server (⌘K)
96+
3. Enter: `smb://YOUR_HA_IP/config`
97+
98+
### Python validation skipped
99+
100+
- Install Python 3 if you want syntax validation
101+
- Build will continue without Python validation
102+
103+
### Integration not showing after deploy
104+
105+
1. Restart Home Assistant
106+
2. Clear browser cache
107+
3. Check Settings → Devices & Services → Add Integration

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
All notable changes to Ultra Card Pro Cloud will be documented in this file.
44

5+
## [1.0.5] - 2024-12-24
6+
7+
### Fixed
8+
- **Critical: Removed duplicate Content-Type header** - aiohttp sets this automatically with `json=`, having it explicitly caused some servers/CDNs to reject requests
9+
- **Critical: Fixed asyncio.CancelledError handling** - Was incorrectly catching and converting to CannotConnect, preventing proper task cancellation during HA restarts
10+
- **Reduced retry count from 3 to 2** - Reduces traffic load when connections fail (was causing 3x traffic spikes)
11+
12+
### Note
13+
If you experienced connection issues with v1.0.3/v1.0.4 but older versions worked, this release should fix it.
14+
515
## [1.0.4] - 2024-12-23
616

717
### Fixed

0 commit comments

Comments
 (0)