Problem with a rule



  • I am testing if a solar power bank can be used to power an esp8266 based module.

    I have the module send time in seconds, minute, hour and a count of days.

    Receiving and displaying in eGeoffrey is working OK.

    To see if someway the esp8266 module had temporarily no power I would like to display the same time elements in separate widgets.

    Those widgets I want to set with separate rules.

    sec_store.jpg

    This rule is not running.

    The error message is:

    [2020-09-27 10:48:01][controller/hub] ERROR: [clck/slr/sec] Unable to normalize second: Traceback (most recent call last):|  File "controller/hub.py", line 163, in save_value|    message.set("value", sdk.python.utils.numbers.normalize(message.get("value"), sensor["format"]))|  File "sdk/python/utils/numbers.py", line 24, in normalize|    elif format == "int": return int(float(value))|ValueError: could not convert string to float: second|
    

    The data format in the sensor is set to integer.

    Your advice please.



  • @user2684

    Every now and than one tends to re-invent the wheel. And I think this is such an occasion.

    What I am looking for is a way to detect when the solar power bank fails. And just for such an occasion the heartbeat was introduced.

    So the issue as such is solved. But if you know a way to solve what I wanted to do with this rule without changing anything in eGeoffrey I would appreciate to know the solution.

    To rephrase my question:
    how can I copy the content of a widget into an other sensor which is used as location to store that value?



  • @eporocrail said in Problem with a rule:

    The data format in the sensor is set to integer.

    Looks like you are trying to save into the sensor "clck/slr/sec" which is of type int the string "second"

    how can I copy the content of a widget into an other sensor which is used as location to store that value?

    Isn't the input widget doing this job?


Log in to reply