mhzawadi / foxess-mqtt

FoxEss Cloud to MQTT
5 stars 2 forks source link

BREAKING CHANGE !!!!!

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

BREAKING CHANGE !!!!

Horwoods Foxess Cloud Data collector

This is a very simple tool to get the data out of FoxEss-cloud and into MQTT, it has some very rough edges.

Running

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;

Docker environment variables

Config file

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"
  }
}

Compose file

The 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