Code Monkey home page Code Monkey logo

slunecni-mesto's Introduction

Slunecni mesto

slunecni-mesto's People

Contributors

msgre avatar

Watchers

 avatar

slunecni-mesto's Issues

Problem s vycitanim dat z OTE

Vsiml jsem si, ze data vyctena z OTE maji vzdy prvni hodnotu, pro obdobi 0:00 az 0:59 nastavenou spatne. Nechal jsem si proto pres noc otevrene debug okno, abych zjistil kde je problem.

Aktualni flow v NodeRED

Snímek obrazovky 2022-11-28 v 9 49 49

Vypis debug hlasek

27.11.2022 00:01:02 prichazi timestamp z cronu:

{
    "cronplus":
    {
        "triggerTimestamp": 1669590060000,
        "status":
        {
            "type": "static",
            "modified": false,
            "isRunning": true,
            "count": 87,
            "limit": 0,
            "nextDescription": "in 59 minutes 59 seconds",
            "nextDate": "2022-11-28T00:01:00.000Z",
            "nextDateTZ": "Nov 28, 2022, 01:01:00 GMT+1",
            "timeZone": "Europe/Prague",
            "serverTime": "2022-11-27T23:01:00.008Z",
            "serverTimeZone": "Europe/Prague",
            "description": "At 1 minutes past the hour"
        },
        "config":
        {
            "topic": "timestamp",
            "name": "schedule1",
            "payloadType": "date",
            "payload": "",
            "limit": null,
            "expressionType": "cron",
            "expression": "0 1 * * * * *"
        }
    },
    "topic": "timestamp",
    "scheduledEvent": true,
    "payload": 1669590060008,
    "_msgid": "xxx"
}

27.11.2022 00:01:01 se vycita stav ote_market v nodu "Get OTE market sensor state":

{
    "cronplus":
    {
        "triggerTimestamp": 1669590060000,
        "status":
        {
            "type": "static",
            "modified": false,
            "isRunning": true,
            "count": 87,
            "limit": 0,
            "nextDescription": "in 59 minutes 59 seconds",
            "nextDate": "2022-11-28T00:01:00.000Z",
            "nextDateTZ": "Nov 28, 2022, 01:01:00 GMT+1",
            "timeZone": "Europe/Prague",
            "serverTime": "2022-11-27T23:01:00.008Z",
            "serverTimeZone": "Europe/Prague",
            "description": "At 1 minutes past the hour"
        },
        "config":
        {
            "topic": "timestamp",
            "name": "schedule1",
            "payloadType": "date",
            "payload": "",
            "limit": null,
            "expressionType": "cron",
            "expression": "0 1 * * * * *"
        }
    },
    "topic": "timestamp",
    "scheduledEvent": true,
    "payload":
    {
        "entity_id": "sensor.ote_market",
        "state": "158.51",
        "attributes":
        {
            "state_class": "measurement",
            "prices":
            [
                144.88,
                135,
                122.01,
                99.4,
                99.4,
                105.64,
                129.57,
                144.02,
                154,
                171.71,
                171.21,
                186.6,
                184.01,
                180,
                184.47,
                188.84,
                215.35,
                230,
                228.73,
                217.64,
                201.01,
                183.19,
                171.05,
                158.51
            ],
            "date": "2022-11-27",
            "unit_of_measurement": "EUR",
            "device_class": "monetary",
            "icon": "mdi:cash-multiple",
            "friendly_name": "ote-market"
        },
        "last_changed": "2022-11-27T22:01:00.030169+00:00",
        "last_updated": "2022-11-27T22:01:00.030169+00:00",
        "context":
        {
            "id": "xxx",
            "parent_id": null,
            "user_id": null
        },
        "timeSinceChangedMs": 3599982,
        "original_state": "158.51"
    },
    "_msgid": "xxx",
    "timestamp": 1669590060012
}

27.11.2022 00:01:02 se vola "Process timestamp, prepare GET parameters in payload":

{
    "cronplus":
    {
        "triggerTimestamp": 1669590060000,
        "status":
        {
            "type": "static",
            "modified": false,
            "isRunning": true,
            "count": 87,
            "limit": 0,
            "nextDescription": "in 59 minutes 59 seconds",
            "nextDate": "2022-11-28T00:01:00.000Z",
            "nextDateTZ": "Nov 28, 2022, 01:01:00 GMT+1",
            "timeZone": "Europe/Prague",
            "serverTime": "2022-11-27T23:01:00.008Z",
            "serverTimeZone": "Europe/Prague",
            "description": "At 1 minutes past the hour"
        },
        "config":
        {
            "topic": "timestamp",
            "name": "schedule1",
            "payloadType": "date",
            "payload": "",
            "limit": null,
            "expressionType": "cron",
            "expression": "0 1 * * * * *"
        }
    },
    "topic": "timestamp",
    "scheduledEvent": true,
    "payload":
    {
        "entity_id": "sensor.ote_market",
        "state": "158.51",
        "attributes":
        {
            "state_class": "measurement",
            "prices":
            [
                144.88,
                135,
                122.01,
                99.4,
                99.4,
                105.64,
                129.57,
                144.02,
                154,
                171.71,
                171.21,
                186.6,
                184.01,
                180,
                184.47,
                188.84,
                215.35,
                230,
                228.73,
                217.64,
                201.01,
                183.19,
                171.05,
                158.51
            ],
            "date": "2022-11-27",
            "unit_of_measurement": "EUR",
            "device_class": "monetary",
            "icon": "mdi:cash-multiple",
            "friendly_name": "ote-market"
        },
        "last_changed": "2022-11-27T22:01:00.030169+00:00",
        "last_updated": "2022-11-27T22:01:00.030169+00:00",
        "context":
        {
            "id": "xxx",
            "parent_id": null,
            "user_id": null
        },
        "timeSinceChangedMs": 3599982,
        "original_state": "158.51"
    },
    "_msgid": "xxx",
    "timestamp": 1669590060012,
    "scrape": false
}

Tady je asi problem, scrape je nastaven na false takze pak nejspis nevycte data z OTE.

Pro srovnani, nasledujici request o hodinu pozdeji z 27.11.2022 01:01:01 uz ma scrape=true:

{
    "cronplus":
    {
        "triggerTimestamp": 1669593660000,
        "status":
        {
            "type": "static",
            "modified": false,
            "isRunning": true,
            "count": 88,
            "limit": 0,
            "nextDescription": "in 59 minutes 59 seconds",
            "nextDate": "2022-11-28T01:01:00.000Z",
            "nextDateTZ": "Nov 28, 2022, 02:01:00 GMT+1",
            "timeZone": "Europe/Prague",
            "serverTime": "2022-11-28T00:01:00.005Z",
            "serverTimeZone": "Europe/Prague",
            "description": "At 1 minutes past the hour"
        },
        "config":
        {
            "topic": "timestamp",
            "name": "schedule1",
            "payloadType": "date",
            "payload": "",
            "limit": null,
            "expressionType": "cron",
            "expression": "0 1 * * * * *"
        }
    },
    "topic": "timestamp",
    "scheduledEvent": true,
    "payload":
    {
        "date": "2022-11-28"
    },
    "_msgid": "xxx",
    "timestamp": 1669593660009,
    "scrape": true
}

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.