Git Product home page Git Product logo

pyephember's People

Contributors

rupertleveneucd avatar ttroy50 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyephember's Issues

Burner Operation hours - Flame on time

image

I am trying to see it is possible to get Flame On time (Burner Hours) from the MQTT messages.
From the point index there there are attributes 15,16,17,18 that are all EPOCH time.
Any idea if some of these could be burners hours ?

`pointIndex` of mode now 11 instead of 7

Issue

Unsure if related to #11 but it seems that the pointIndex for mode is now 11 instead of 7. Due to this I'm seeing the following errors in version 4.0.0:

  File "/workspaces/home-assistant-core/homeassistant/components/ephember/climate.py", line 127, in hvac_mode
    mode = zone_mode(self._zone)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/pyephember/pyephember.py", line 248, in zone_mode
    return ZoneMode(zone_pointdata_value(zone, 'MODE'))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/enum.py", line 711, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/enum.py", line 1128, in __new__
    raise ve_exc

ValueError: 350 is not a valid ZoneMode

ValueError: 350 is not a valid ZoneMode

System Info

System Type: EMBER-TS1

API Responses

Other point indexes left out for brevity, but they did not change when switching between modes

AUTO:

    "pointDataList": [
        {"pointIndex": 7, "value": "350"},
        {"pointIndex": 11, "value": "0"},
    ],

MANUAL:

    "pointDataList": [
        {"pointIndex": 7, "value": "350"},
        {"pointIndex": 11, "value": "1"},
    ],

OFF:

    "pointDataList": [
        {"pointIndex": 7, "value": "350"},
        {"pointIndex": 11, "value": "4"},
    ],

Server update :-(

It seems this doesn't work since the app (and presumably the server) was updated a few days ago.

example code gives AttributeError

Since the recent update (for which, many thanks), the example code in the phpember.py comment

    Example usage: t = EphEmber('[email protected]', 'mypasswd')
                   t.getZoneTemperature('myzone') # Get temperature

gives AttributeError: 'EphEmber' object has no attribute 'getZoneTemperature'.

[Question] Have you tried RF communications?

Hi Thom,

Love your work here. Have you tried using something like a Sonoff RF bridge to build your own WiFi gateway to replace the EPH one in order to get all the data without any requirement for an internet connection?

I'm researching heating systems and am finding it difficult to find a no internet connection based solution. Thought EPH came close but haven't seen anyone do it via RF yet so may have to break new ground.

Thanks,
Ian.

RuntimeError: Error getting zones from home: 32

Something seems to have changed and for the last couple of days my script is giving the error above. Here's an abbreviated test script which demonstrates the issue.

#!/usr/bin/env python3.4                                                                            
                                                                                                    
from pyephember.pyephember import EphEmber                                                          
                                                                                                    
ZONENAME="Zone 1"                                                                                   
ZONENAME="Hot Water"  
e = EphEmber('[email protected]', 'password')
print(e.get_zone_temperature(ZONENAME))      

Output:

Traceback (most recent call last):
  File "./ember-test.py", line 9, in <module>
    print(e.get_zone_temperature(ZONENAME))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pyephember/pyephember.py", line 321, in get_zone_temperature
    zone = self.get_zone(name)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pyephember/pyephember.py", line 301, in get_zone
    for zone in self.get_zones():
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pyephember/pyephember.py", line 281, in get_zones
    home_data = self.get_home()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pyephember/pyephember.py", line 273, in get_home
    "Error getting zones from home: {}".format(status))
RuntimeError: Error getting zones from home: 32

Updated ephember component

with the changes to Home assistant deprecating aux heat I've created and updated component that should resolve the issues.
put this in your custom components and it should override your native one and remove the warnings you're having.
just thought i'd post here in case anyone needed an updated one.

https://github.com/ajurna/ephember

Switching boiler on/off

Hi, I'm trying to use the EPH controller with Home Assistant. As there are issues there I'm currently just trying to run the functionality using your library from a simple python script. I have hit a bit of a brick wall in terms of debugging.

Note: I've also given up on any advanced functionality and all I'll want to do is to turn the heating on and off from home assistant, the temperature on the boiler I'll preset and the TVRs are all smart already.

My EPH controller currently has only one zone (as it's a single zone device) called 'WholeHouse'

Code Sample:

zoneName = "WholeHouse"
t = EphEmber('<my@email>', '<my_password>')
print("{} current temperature is {}".format(zoneName, t.get_zone_temperature(zoneName)))
print("{} target temperature is {}".format(zoneName, t.get_zone_target_temperature(zoneName)))
print("{} mode : {}".format(zoneName, t.get_zone_mode(zoneName).name))
t._set_zone_mode(zoneName, 2)
print("{} mode : {}".format(zoneName, t.get_zone_mode(zoneName).name))

Result:

WholeHouse current temperature is 23.9
WholeHouse target temperature is 5.0
WholeHouse mode : OFF
Traceback (most recent call last):
  File "E:\dev\eph\test.py", line 16, in <module>
    t._set_zone_mode(zoneName, 2)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\dev\eph\pyephember\pyephember\pyephember.py", line 585, in _set_zone_mode
    return self.messenger.send_zone_commands(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\dev\eph\pyephember\pyephember\pyephember.py", line 376, in send_zone_commands
    return self._zone_command_b64(
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\dev\eph\pyephember\pyephember\pyephember.py", line 286, in _zone_command_b64
    "mac": zone['mac'],
           ~~~~^^^^^^^
TypeError: string indices must be integers, not 'str'

The error is in the '_zone_command_b64' function in the library.

msg = json.dumps(
            {
                "common": {
                    "serial": 7870,
                    "productId": product_id,
                    "uid": uid,
                    "timestamp": str(int(1000*time.time()))
                },
                "data": {
                    "mac": zone['mac'],
                    "pointData": cmd
                }
            }

Problem is that there is no zone entry for 'mac', the if I print out the contents of zone inside the function above:
print(zone)

The result returns 'WholeHouse'

I'm therefore trying to figure out what value I should put there. I have tried the following:

 "data": {
                    "mac": <MY_TRIAL_VALUES_GO_HERE>,
                    "pointData": cmd
                }
  • ' ' and '' (mac: '' and mac: ' ')
  • 0 (mac: zone[0])
  • 'WholeHouse' (mac: 'WholeHouse', mac: zone['WholeHouse'] gives the same error)
  • the MAC address off the side of the EPH WiFi controller (mac: 'XXXXXXXXXXXXXX')

In all cases the application runs fine but nothing happens, no error but also no result.

I would appreciate any suggestions you might have here.

Very Nice!

Not an issue at all. Was looking for info on my thermostat and stumbled upon this. Nicely done, thanks!

Cloud API about to change by the looks of it

In case you didn't get/see this from EPH, presumably relevant...

Please note that a major release of EMBER will be available to download on January 4th. It is important that you update the EMBER App to this latest version as the old version of the App will no longer control your heating system in the coming weeks.
Improvements include:
Optimisation of APP to ensure smoother communication
Known bugs fixed

Home Assistant feature request: battery level of thermostat

Greetings Troy! I was wondering if it was possible to query the battery level of the EPH thermostat, either locally or from the EPH cloud API. I've been using the ephember integration with Home Assistant, and it would be nice if I could trigger a low battery alert notification.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.