hahn-th / homematicip-rest-api

A python wrapper for the homematicIP REST API (Access Point Based)
https://hahn-th.github.io/homematicip-rest-api/
GNU General Public License v3.0
211 stars 63 forks source link

get_current_state() throws 'EXTERNAL' isn't a valid option for class 'DeviceType' #490

Closed codac closed 1 year ago

codac commented 1 year ago

Running the home.get_current_state() throws 'EXTERNAL' isn't a valid option for class 'DeviceType'. Seems like needs to be added?!

hahn-th commented 1 year ago

Upgrade to the latest version

codac commented 1 year ago

I did (pip install -U homematicip and pip install --upgrade homematicip) and the exception still remains.

hahn-th commented 1 year ago

Can you please append your config as txt or json file. https://github.com/hahn-th/homematicip-rest-api#new-devices-and-config-dump

Please describe how you are using the lib. Because i fixed that problem a while ago.

codac commented 1 year ago

I'm running the following code:

def main():

    print (splashScreen)

    ledStartupSequence ()

    errorLog = open("/home/pi/r2d2-hmip-error.log","w")

    while True:

        try:
            global led3DeviceIsOffline
            global led4DeviceIsOffline
            global led5DeviceIsOffline

            # delete old datasets from database
            deleteOldDatasets ()

            # read status of devices and write to database
            global home
            home.get_current_state()

The "home.get_current_state() throws the error.

Here is the config: https://gist.github.com/codac/83331d0b0d1f8c0488287966438761bc

hahn-th commented 1 year ago

Works like a charm for me. You have to update to the latest version. I guess, you're not updating the sources, you are using for your script. But you have to find that out by yourself. I think, you can close the issue.