This version now needs redis to store all the data it collects, before an upload to MQTT.
See the below compose file for a quick setup
This is a very simple tool to get the data out of FoxEss-cloud and into MQTT, it has some very rough edges.
docker run --name redis \
-v home/user/redis_data:/data \
redis;
docker run --name foxescloud \
-e TIMEZONE=Europe/London \
-v /home/user/foxess_data:/foxess-mqtt/data \
mhzawadi/foxess-mqtt;
The new PHP script uses json for the config, you can copy the below code and paste into config.josn or run the image and wait for it spit out the files.
You now dont need to provide your device ID as we now collect all devices in your account
The json for the config.json file
{
{
"foxess_username": "changeme",
"foxess_password": "changeme",
"foxess_apikey": "changeme",
"foxess_lang": "en",
"device_id": "changeme",
"mqtt_host": "changeme",
"mqtt_port": "changeme",
"mqtt_user": "changeme",
"mqtt_pass": "changeme",
"mqtt_topic": "foxesscloud",
"log_level": 2,
"total_over_time": true,
"redis_server": "redis",
"redis_port": "6379"
}
}
API Management
on the leftGenerate API key
and store the key (Maybe use a password manager like Bitwarden)foxess_apikey
to the lolng string you just got6379
is the default portThe below compose file will help start both redis and my image
version: "2.1"
volumes:
redis_data:
services:
redis:
image: redis
container_name: redis
volumes:
- redis_data:/data
foxess-mqtt:
image: mhzawadi/foxess-mqtt
container_name: foxess-mqtt
volumes:
- ./config.json:/foxess-mqtt/data/config.json
environment:
- TIMEZONE=Europe/London