Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

The Deamon won't find my contract ids. #51

Open
4 of 12 tasks
richie256 opened this issue Dec 29, 2019 · 1 comment
Open
4 of 12 tasks

The Deamon won't find my contract ids. #51

richie256 opened this issue Dec 29, 2019 · 1 comment

Comments

@richie256
Copy link

Describe the bug
The Deamon won't find my contract ids. See the log output.

To Reproduce
Steps to reproduce the behavior:

Fetch the code from github:
git clone git@github.com:titilambert/pyhydroquebec.git

Run it:
docker-compose -f docker-compose.yaml up pyhydroquebec

Simplified version of docker-compose.yaml file:

version: '3.1'

services:
  eclipse-mosquitto:
    container_name: eclipse-mosquitto
    image: eclipse-mosquitto:latest
    ports:
      - 1883:1883
      - 9001:9001
    volumes:
      - ./mosquitto.conf:/mosquitto/config/mosquitto.conf
      - ./mosquitto_passwd:/etc/mosquitto/passwd:ro
      - eclipse-mosquito-data:/mosquitto/data
      - eclipse-mosquito-log:/mosquitto/log

  pyhydroquebec:
    build: ./pyhydroquebec
    volumes:
      - ./pyhydroquebec_config.yaml:/etc/pyhydroquebec/pyhydroquebec.yaml:ro
    env_file:
      pyhydroquebec-variables.env

pyhydroquebec-variables.env file:

MQTT_USERNAME=mqtt_username
MQTT_PASSWORD=mqtt_password
MQTT_HOST=eclipse-mosquitto
MQTT_PORT=1883
PYHQ_OUTPUT=MQTT

pyhydroquebec_config.yaml file:

# THIS YAML CAN CHANGE IN THE FUTURE
timeout: 30
# If frequency is not set the "daemon" will collect the data only one time and stop
# 6 hours
frequency: 8640
accounts:
- username: "MY_EMAIL_ADDRESS"
  password: "MY_PASSWORD"
  contracts:
    - id: "333333333"
    - id: "444444444"

docker logs output:

(...)
pyhydroquebec_1_a96773151419 | 2019-12-29 01:17:27,211 - INFO - pyhydroquebec - Selecting customer 5555555555
pyhydroquebec_1_a96773151419 | 2019-12-29 01:17:27,212 - DEBUG - pyhydroquebec - HTTP query https://cl-services.idp.hydroquebec.com/cl/prive/api/v3_0/partenaires/infoBase to get
pyhydroquebec_1_a96773151419 | 2019-12-29 01:17:27,460 - DEBUG - pyhydroquebec - HTTP query https://cl-ec-spring.hydroquebec.com/portail/prive/maj-session/ to get
pyhydroquebec_1_a96773151419 | 2019-12-29 01:17:28,115 - DEBUG - pyhydroquebec - HTTP query https://cl-ec-spring.hydroquebec.com/portail/fr/group/clientele/gerer-mon-compte/ to get
pyhydroquebec_1_a96773151419 | 2019-12-29 01:17:29,227 - DEBUG - pyhydroquebec - HTTP query https://cl-ec-spring.hydroquebec.com/portail/fr/group/clientele/portrait-de-consommation to get
pyhydroquebec_1_a96773151419 | 2019-12-29 01:17:29,639 - INFO - pyhydroquebec - Customer 5555555555 selected
pyhydroquebec_1_a96773151419 | 2019-12-29 01:17:29,639 - DEBUG - pyhydroquebec - HTTP query https://cl-ec-spring.hydroquebec.com/portail/fr/group/clientele/gerer-mon-compte/ to get
pyhydroquebec_1_a96773151419 | 2019-12-29 01:17:30,607 - INFO - pyhydroquebec.customer.5555555555 - Customer has no contract
pyhydroquebec_1_a96773151419 | 2019-12-29 01:17:30,608 - DEBUG - pyhydroquebec - HTTP query https://cl-ec-spring.hydroquebec.com/portail/fr/group/clientele/portrait-de-consommation to get
pyhydroquebec_1_a96773151419 | 2019-12-29 01:17:30,923 - WARNING - mqtt-hydroquebec - Contract 333333333 not found
pyhydroquebec_1_a96773151419 | 2019-12-29 01:17:30,923 - WARNING - mqtt-hydroquebec - Contract 444444444 not found
pyhydroquebec_1_a96773151419 | 2019-12-29 01:17:30,926 - INFO - mqtt-hydroquebec - Waiting for 8640 seconds before the next check

Expected behavior
The deamon would run and publish data on mqtt.

PyHydroQuebec and Python version
Please write here which version of Python and PyHydroQuebec you are using.

pyhydroquebec==3.0.0

python version: python:3.7-alpine

Architecture: ARM (Raspberry Pi 3 Model B Rev 1.2)

Hydroquebec rate

Select your rate:

  • D (For the second account)
  • DP
  • DM
  • DT (For the main account)

Hydroquebec multi-contract
Do you have more than one contract with HydroQuebec ?

  • Yes (2)
  • No

Corner Cases
Are you in one of this situations:

  • Change of address
  • Change of rate
  • Add a new contract
  • Remove an old contract
  • No
  • Other:
@codetypat
Copy link

I have the exact same problem, any upcoming fix on this issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants