This integration bridges Nemlig.com grocery shopping with Home Assistant using MQTT. You can run this application in docker, and it will periodically poll the status of your Nemlig.com account.
This project uses other libraries of mine, the MBW.Client.NemligCom and MBW.HassMQTT (nuget).
- Can expose the next delivery including the estimated time of delivery when it's known
- Can show the current basket including when it is ready to order
- Can order the current basket using a predefined credit card
- Can locate good delivery times, one per day, that fit some criteria
Name | Required | Default | Note |
---|---|---|---|
MQTT__Server | yes | A hostname or IP address | |
MQTT__Port | 1883 | ||
MQTT__Username | |||
MQTT__Password | |||
MQTT__ClientId | nemlig2mqtt |
||
MQTT__ReconnectInterval | 00:00:30 |
How long to wait before reconnecting to MQTT | |
HASS__DiscoveryPrefix | homeassistant |
Prefix of HASS discovery topics | |
HASS__TopicPrefix | nemlig |
Prefix of state and attribute topics | |
HASS__EnableHASSDiscovery | true |
Enable or disable the HASS discovery documents, disable with false |
|
Nemlig__Username | yes | ||
Nemlig__Password | yes | ||
Nemlig__CheckInterval | 01:00:00 | Fallback update interval, default: 15 minutes |
|
Nemlig__DeliveryConfig__DaysToCheck | 4 |
Number of days to check, range: 1-7 | |
Nemlig__DeliveryConfig__PrioritizeMaxHours | 48 |
Max hours to prioritize, range: 4-672 | |
Nemlig__DeliveryConfig__PrioritizeCheapHours | true |
Prioritize cheaper hours, true or false |
|
Nemlig__DeliveryConfig__PrioritizeShortTimespan | false |
Prioritize shorter timespans, true or false |
|
Nemlig__DeliveryConfig__PrioritizeFreeDelivery | true |
Prioritize free delivery, true or false |
|
Nemlig__DeliveryConfig__PrioritizeHours | Prioritize specific hours, range: 0-23, array of bytes | ||
Nemlig__DeliveryConfig__MaxDeliveryPrice | Maximum delivery price, optional | ||
Nemlig__DeliveryConfig__AllowDeliveryTypes | Allowed delivery types, array of NemligDeliveryType |
||
Nemlig__DeliveryConfig__NextDeliveryCheckInterval | 01:00:00 |
Interval for next delivery check, range: 00:01:00 - 15:00:00 | |
Proxy__Uri | Set this to pass Nemlig.com API calls through an HTTP proxy |
docker run -d -e MQTT__Server=myqueue.local -e Nemlig__Username=myuser -e Nemlig__Password=mypassword lordmike/nemlig2mqtt:latest
# docker-compose.yml
version: '2.3'
services:
nemlig2mqtt:
image: lordmike/nemlig2mqtt:latest
environment:
MQTT__Server: myqueue.local
Nemlig__Username: myuser
Nemlig__Password: mypassword
You can use one of the following tags. Architectures available: amd64
, armv7
and aarch64
latest
(latest, multi-arch)ARCH-latest
(latest, specific architecture)vA.B.C
(specific version, multi-arch)ARCH-vA.B.C
(specific version, specific architecture)
For all available tags, see Docker Hub.
It is possible to send certain commands to the Nemlig2MQTT application, using MQTT topics. The following commands can be sent.
Topic: (prefix)/commands/force_sync
Sending a message to this topic will force the Nemlig2MQTT app to poll Nemlig.com for new information.
Officially, Nemlig.com does not have any API available. They have a their site and their own app. I found these to be lacking for me, as I want to bring all my data into my domain, such as in my local HASS setup.
The API used here is reverse engineered from the Nemlig.com app and website.
Adjust the logging level using this environment variable:
Logging__MinimumLevel__Default: Error | Warning | Information | Debug | Verbose
Since this is a reverse engineering effort, sometimes things go wrong. To aid in troubleshooting, the requests and responses from the Nemlig.com API can be dumped to the console, by enabling trace logging.
Enable request logging with this environment variable:
Logging__MinimumLevel__Override__nemlig: Verbose