Skip to content

Commit 68ff5bf

Browse files
authored
feat: mqtt alerts (#538)
1 parent 4fefe22 commit 68ff5bf

File tree

7 files changed

+688
-22
lines changed

7 files changed

+688
-22
lines changed

.env-example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ MAX_PRICE_SERIES_3070=
1818
MAX_PRICE_SERIES_3080=
1919
MAX_PRICE_SERIES_3090=
2020
MICROCENTER_LOCATION=
21+
MQTT_BROKER_ADDRESS=
22+
MQTT_BROKER_PORT=
23+
MQTT_CLIENT_ID=
24+
MQTT_PASSWORD=
25+
MQTT_QOS=
26+
MQTT_TOPIC=
27+
MQTT_USERNAME=
2128
NVIDIA_ADD_TO_CART_ATTEMPTS=
2229
NVIDIA_SESSION_TTL=
2330
OPEN_BROWSER=

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ Here is a list of variables that you can use to customize your newly copied `.en
9696
| `MAX_PRICE_SERIES_3080` | Maximum price allowed for a match, applies 3080 series cards (does not apply to these sites: Nvidia, Asus, EVGA) | Default: leave empty for no limit, otherwise enter a price (enter whole dollar amounts only, avoid use of: dollar symbols, commas, and periods.) e.g.: `1234` - Cards above `1234` will be skipped. |
9797
| `MAX_PRICE_SERIES_3090` | Maximum price allowed for a match, applies 3090 series cards (does not apply to these sites: Nvidia, Asus, EVGA) | Default: leave empty for no limit, otherwise enter a price (enter whole dollar amounts only, avoid use of: dollar symbols, commas, and periods.) e.g.: `1234` - Cards above `1234` will be skipped. |
9898
| `MICROCENTER_LOCATION` | Specific MicroCenter location(s) to search | Comma separated, e.g.: `marietta,duluth`, default: `web` |
99+
| `MQTT_BROKER_ADDRESS` | IP address or URL of MQTT Broker | e.g 192.168.1.xxx or broker.hivemq.com
100+
| `MQTT_BROKER_PORT` | Network port of MQTT Broker | Default: 1883
101+
| `MQTT_CLIENT_ID` | Unique ClientID (only if required by MQTT Broker), typically not required when only publishing alerts | eg. client-123456
102+
| `MQTT_PASSWORD` | MQTT password - only use with MQTT brokers on private networks, if required. Will not be sent over public networks for safety. | e.g mysecret
103+
| `MQTT_QOS` | QoS level for published alerts to broker (https://www.npmjs.com/package/mqtt#about-qos) | Default: 0, Can be 0, 1, or 2
104+
| `MQTT_TOPIC` | Topic to publish alerts to. Can include %store%, %series%, %brand%, %model% for dynamic topics | Default: nvidia-snatcher/alert e.g nv-alert/%store%/%series%/%brand%/%model%/alert
105+
| `MQTT_USERNAME` | MQTT username - (only if required by MQTT Broker) | e.g myusername
99106
| `NVIDIA_ADD_TO_CART_ATTEMPTS` | The maximum number of times the `nvidia-api` add to cart feature will be attempted before failing | Default: `10` |
100107
| `NVIDIA_SESSION_TTL` | The time in milliseconds to keep the cart active while using `nvidia-api` | Default: `60000` |
101108
| `OPEN_BROWSER` | Toggle for whether or not the browser should open when item is found | Default: `true` |

0 commit comments

Comments
 (0)