# Newbie here, Tibber question

**URL:** <https://discourse.nodered.org/t/newbie-here-tibber-question/29199>\
**Category:** Dashboard\
**Created:** [30 June 2020 06:52 UTC](https://discourse.nodered.org/t/newbie-here-tibber-question/29199 "2020-06-30T06:52:56Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henke82](https://avatars.discourse-cdn.com/v4/letter/h/58f4c7/32.png) [@Henke82](https://discourse.nodered.org/u/Henke82)\
**Post date:** [30 June 2020 06:52 UTC](https://discourse.nodered.org/t/newbie-here-tibber-question/29199/1 "2020-06-30T06:52:56Z")

</div>

Hi guys! Maybe this is a more general question to be honest, but the context still is around the Dashboard topic so I will give it a try. I installed Node-red for a couple of weeks ago but I just recently started to work with the platform. I have no development skills whatsoever, but I think I usually can hold my own by just reading forums and stuff.  
However, I am trying to receive values from my Tibber (a company that deliveres electricity in a smarter way) account using the Tibber palette, which contains of for nodes:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/c/3c1f801c23dd07b7c2da4ec3bbf5c254288b3587.png)  
I have consulted the [Tibber Developers page](https://developer.tibber.com/docs/guides/graphql-concepts) to sort out what needs to be entered and where, it is based on GraphQL to get the information that the user wants.

To be honest, I am stuck. I am wondering if someone here have used Tibber for Node-red and that can help me, or at least show me what direction I need to go. I am mostly interested in fetching todays and tomorrows prices and present that in a graph.

Apart from this, I think I am in a good shape when it comes to Dashboard. Quite straight forward!

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [30 June 2020 07:08 UTC](https://discourse.nodered.org/t/newbie-here-tibber-question/29199/2 "2020-06-30T07:08:48Z")

</div>

Well, for a start what you may want to do is drag a `debug` node into the edit area.

Then you connect the output of those nodes to the `debug` node.

Double click on the `debug` node and set it as shown here:

 ![Screenshot from 2020-06-30 17-06-11](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/1/8172af80019934cfa32d26a4d8f5597642f6fc9f.png)

Then click the `deploy` button (top right RED)

As _things happen_ you should see stuff on the right side of the screen. (Output of the `debug` nodes.)

That will establish they are receiving stuff.

---

<div class="post-metadata">

**Author:** ![Henke82](https://avatars.discourse-cdn.com/v4/letter/h/58f4c7/32.png) [@Henke82](https://discourse.nodered.org/u/Henke82)\
**Post date:** [30 June 2020 07:36 UTC](https://discourse.nodered.org/t/newbie-here-tibber-question/29199/3 "2020-06-30T07:36:46Z")

</div>

Thanks for quick response, @Trying_to_learn!  
Well, I took two (probably more) steps backwards and started from scratch, starting with an injector to trigger the both nodes and did as you said with the debug node.

I clearly miss some important info on my nodes,

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/a/ca99f004d7ea2c307c3b543f1f1a8c526b5d4c22.png)

I am still just starting to grasp the functionality of node-red, I just need to get started and then I will probably find my way forward on my own (to a larger extent, at least)

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [30 June 2020 07:43 UTC](https://discourse.nodered.org/t/newbie-here-tibber-question/29199/4 "2020-06-30T07:43:32Z")

</div>

Oops,

Sorry.

I didn't see the `input` side of the nodes. ☹

So let's go through the nodes - as I see them:

`tibber feed` is a receiver.

`tibber query` allows a query to be sent and a reply received in one pass.  
`tibber data` is used to write data to the _tibber_ ...... thing.

The query then - now after thinking a bit about it - is how you look in the _tibber_ thing. (Database?)

and lastly the `tibber notify` is a message that is sent from _tibber_.

Alas you will need to know how to format/structure data to send messages into this _tibber_.

I'm not sure you could do something like:

`inject` node ---- connected to ---- `tibber notify`  
`tibber feed` ---- connected to ---- `debug` node.

Press the `inject` and see if the `debug` echoes what you sent.

But I am only guessing. I don't know what _tibber_ is.

What you did above _failed_ because you didn't send _valid_ messages to the `query` and `data` nodes.

For instance - given it is a _database_ kind of thing - you can't expect to get a valid response if you send a _random_ thing to look up a database. (query)  
Or if you are trying to write to the database. (the lower node)

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [30 June 2020 07:56 UTC](https://discourse.nodered.org/t/newbie-here-tibber-question/29199/5 "2020-06-30T07:56:20Z")

</div>

Hi and welcome to the forum! Unfortunately I haven't used Tibber but let's see if I could help you anyway.

> [@Henke82](#):
>
> I have consulted the [Tibber Developers page](https://developer.tibber.com/docs/guides/graphql-concepts) to sort out what needs to be entered and where, it is based on GraphQL to get the information that the user wants.

I take it from here that you have already successfully got some data fetched using maybe the `tibber-feed` node, the `tibber-data` node or the example flows provided with them?

... and the actual issue is with forming the GraphQL query to fetch data that's not available by using the feed or data nodes?

First and foremost we need to make sure the connection and your credentials have been entered correctly and that there's no issues fetching data using the examples.

---

<div class="post-metadata">

**Author:** ![Henke82](https://avatars.discourse-cdn.com/v4/letter/h/58f4c7/32.png) [@Henke82](https://discourse.nodered.org/u/Henke82)\
**Post date:** [30 June 2020 08:02 UTC](https://discourse.nodered.org/t/newbie-here-tibber-question/29199/6 "2020-06-30T08:02:20Z")

</div>

Haha, no worries! I could have been more clear.  
Short story, Tibber is a new electricity delivering company. They are focusing on smart homes and have some real slick things, above other things they let us use their API to interconnect stuff, like node-red.  
They have something called Tibber Pulse, which you connect to your home for live monitoring of your consumption. I don't have that yet so that node can be left aside. Tibber Notify is just a way of forcing the Tibber app to push a notification, I think. Not important.

Tibber query and Tibber data can be used to get other information, like todays or tomorrows electricity price. With GraphQL I should be able to query the API for the data I need. In my case, I would like to present that in a graph on my dashboard. I have read the the FAQ for GraphQL [here](https://developer.tibber.com/docs/reference#id) and the Tibber node [here](https://flows.nodered.org/node/node-red-contrib-tibber-api/in/48-EeQz8gTwN).

So, the big question for me, who is not a developer but just trying to understand how it works is to find out how to use the nodes. I suspect that I need use the both nodes together. First a Injector or similiar, connect to Tibber Query (with the correct query, whatever that is) and then connect that to Tibber Data to extract the info stated in the Tibber Query, and return it to debug node.

What do you think of that?

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [30 June 2020 08:05 UTC](https://discourse.nodered.org/t/newbie-here-tibber-question/29199/7 "2020-06-30T08:05:44Z")

</div>

Sorry, way beyond my skill set.

---

<div class="post-metadata">

**Author:** ![Henke82](https://avatars.discourse-cdn.com/v4/letter/h/58f4c7/32.png) [@Henke82](https://discourse.nodered.org/u/Henke82)\
**Post date:** [30 June 2020 08:08 UTC](https://discourse.nodered.org/t/newbie-here-tibber-question/29199/8 "2020-06-30T08:08:38Z")

</div>

Wow, I am stunned how friendly you guys are! Thanks @ristomatti!  
Well, I have not successfully received anything, yet. I do not know if I can trust the "connected" icon on the screen, if I can, I think I at least successfully connected with my API token to their services. Good start. 🙂

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/9/39a44f5e630be18eea14f527fd478c5767599be4.png)

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [30 June 2020 08:10 UTC](https://discourse.nodered.org/t/newbie-here-tibber-question/29199/9 "2020-06-30T08:10:15Z")

</div>

> [@Henke82](#):
>
> So, the big question for me, who is not a developer but just trying to understand how it works is to find out how to use the nodes. I suspect that I need use the both nodes together. First a Injector or similiar, connect to Tibber Query (with the correct query, whatever that is) and then connect that to Tibber Data to extract the info stated in the Tibber Query, and return it to debug node.

I can only make a guess based on the documentation available here [https://flows.nodered.org/node/node-red-contrib-tibber-api](https://flows.nodered.org/node/node-red-contrib-tibber-api) but I would believe you could just add a `tibber-feed` node followed by a debug node to see _some data_. Likely when adding the node you will be asked to add your API token somewhere, possibly to a separate configuration node shares between the different Tibber nodes.

Does it work like that? If it does then based on the documentation to get what you explained to be interested of, you'd need for example an inject node to periodically send a message to the `tibber-query` node. The bigger question would be what to enter on its configuration to get the data you need.

I took a quick look on the API documentation and in there they seem to have a handy API explorer. I cannot really try it without a token but by entering a dummy token I was able to see this example query to fetch the current energy price:

```auto
{
  viewer {
    homes {
      currentSubscription{
        priceInfo{
          current{
            total
            energy
            tax
            startsAt
          }
        }
      }
    }
  }
}

```

If you copy and paste that to the query node configuration, can you get some sensible data outputted on the debug node?

---

<div class="post-metadata">

**Author:** ![Henke82](https://avatars.discourse-cdn.com/v4/letter/h/58f4c7/32.png) [@Henke82](https://discourse.nodered.org/u/Henke82)\
**Post date:** [30 June 2020 08:10 UTC](https://discourse.nodered.org/t/newbie-here-tibber-question/29199/10 "2020-06-30T08:10:35Z")

</div>

No worries @Trying_to_learn! I am so grateful that you gave it a try and sorted out some stuff for me anyway. It is not easy when you don't use the service!

---

<div class="post-metadata">

**Author:** ![Henke82](https://avatars.discourse-cdn.com/v4/letter/h/58f4c7/32.png) [@Henke82](https://discourse.nodered.org/u/Henke82)\
**Post date:** [30 June 2020 08:22 UTC](https://discourse.nodered.org/t/newbie-here-tibber-question/29199/11 "2020-06-30T08:22:37Z")

</div>

I am not sure, I think Tibber Feed utilizes the Tibber Pulse, a module to live monitor consumption, which I don't have yet. But I made a flow using that in case something will come, I will get notified about that via the MQTT topic.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/4/a4fba8d113278633180440bc9fcfae9a15a98199.png)

Ah, know I saw your updated post. I will try that, like this?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/6/96dab59d299c9ef27f381ecf5b9a335d769239ec.png)

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [30 June 2020 08:42 UTC](https://discourse.nodered.org/t/newbie-here-tibber-question/29199/12 "2020-06-30T08:42:56Z")

</div>

Yes that's what I meant. Do you get anything on the right hand side debug pane after pushing the inject node's trigger button? Could you do a screenshot of what's shown?

P.S. It's a good idea to have separate debug nodes for each distinct flow. It'll be easier to figure out where the data came when you'll have more stuff going on.

---

<div class="post-metadata">

**Author:** ![Henke82](https://avatars.discourse-cdn.com/v4/letter/h/58f4c7/32.png) [@Henke82](https://discourse.nodered.org/u/Henke82)\
**Post date:** [30 June 2020 08:48 UTC](https://discourse.nodered.org/t/newbie-here-tibber-question/29199/14 "2020-06-30T08:48:45Z")

</div>

Unfortunately, I will not make this easy for us. To me, it looks like an error. Maybe not due to connection (I fetched a good API key), but there is something with the query:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/4/b4068cb727751945e3fd9f2b38cae1650809446e.png)

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [30 June 2020 08:52 UTC](https://discourse.nodered.org/t/newbie-here-tibber-question/29199/15 "2020-06-30T08:52:25Z")

</div>

Can you change the debug node to display the full msg object so we don't miss anything, like @Trying_to_learn explained?

I'll install the nodes on my test Node-RED and see what the online documentation says to better understand how the nodes should be used.

---

<div class="post-metadata">

**Author:** ![Henke82](https://avatars.discourse-cdn.com/v4/letter/h/58f4c7/32.png) [@Henke82](https://discourse.nodered.org/u/Henke82)\
**Post date:** [30 June 2020 08:55 UTC](https://discourse.nodered.org/t/newbie-here-tibber-question/29199/16 "2020-06-30T08:55:07Z")

</div>

Ah sorry, I did hat before but I thought the message told me less about what I want to know when doing that, so I changed back. 🙂

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/2/22249be27d9a5fd06f9b960ec88cbc5ae6bbb140.png)

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [30 June 2020 09:03 UTC](https://discourse.nodered.org/t/newbie-here-tibber-question/29199/17 "2020-06-30T09:03:20Z")

</div>

Ok no prob, it seems all the info is inside the `payload` property anyway. I got the nodes installed and was able to get the same error as you did. Just a moment if I can get it to do anything else.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [30 June 2020 09:05 UTC](https://discourse.nodered.org/t/newbie-here-tibber-question/29199/18 "2020-06-30T09:05:30Z")

</div>

Just a quick thing to mention....

You are new here. As a result you are allowed a finite number of posts then you can't post any more.

Rather than posting a new reply, edit a previous one.  
Of course you will have to mention this to @ristomatti so he understands what you are doing.  
Coz I think you will be getting close to your limit.

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [30 June 2020 09:14 UTC](https://discourse.nodered.org/t/newbie-here-tibber-question/29199/19 "2020-06-30T09:14:19Z")

</div>

It seems the documentation was a bit lacking. From the flows page I got that you need to paste the query into the query node configuration but instead it reads it from the `msg.payload` of the incoming message. You could just enter the query in the inject node configuration but it would not be very easy to read. Instead I suggest to use a template node.

Try to import this example flow from the Menu -\> Import:

```auto
[{"id":"be4d9e2e.b5f52","type":"tibber-query","z":"2795b53e.b26e3a","name":"","active":true,"apiEndpointRef":"7fb06f58.101d9","x":190,"y":180,"wires":[["6b5798cf.c411c8"]]},{"id":"d8090c2c.45052","type":"inject","z":"2795b53e.b26e3a","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":100,"y":60,"wires":[["baf7c521.66c7c8"]]},{"id":"6b5798cf.c411c8","type":"debug","z":"2795b53e.b26e3a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":350,"y":180,"wires":[]},{"id":"baf7c521.66c7c8","type":"template","z":"2795b53e.b26e3a","name":"current prices query","field":"payload","fieldType":"msg","format":"text","syntax":"plain","template":"{\n viewer {\n homes {\n currentSubscription{\n priceInfo{\n current{\n total\n energy\n tax\n startsAt\n }\n }\n }\n }\n }\n}","output":"str","x":160,"y":120,"wires":[["be4d9e2e.b5f52"]]},{"id":"7fb06f58.101d9","type":"tibber-api-endpoint","z":"","feedUrl":"wss://api.tibber.com/v1-beta/gql/subscriptions","queryUrl":"https://api.tibber.com/v1-beta/gql","name":""}]

```

You'll need to edit the query node to have your API token. I used just `1234` and I'm now getting a token error.

 ![2020_06_30_12.15.12](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/1/d168d059d585c11cbf3885d69fe5e073ff14cf9a.jpeg)

 ![2020_06_30_12.15.24](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/8/f8a6b71d646a9e71d1ad882067b070a5c7abeb38.jpeg)

---

<div class="post-metadata">

**Author:** ![ristomatti](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ristomatti/32/5857_2.png) [@ristomatti](https://discourse.nodered.org/u/ristomatti)\
**Post date:** [30 June 2020 09:21 UTC](https://discourse.nodered.org/t/newbie-here-tibber-question/29199/20 "2020-06-30T09:21:14Z")

</div>

> [@Trying\_to\_learn](#):
>
> You are new here. As a result you are allowed a finite number of posts then you can't post any more.

A good point, thanks! It would be nice if the forum software was smart enough to increase the limit if a message gets replied. Or if regular visitors could "vote" to skip the new user limit.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [30 June 2020 09:24 UTC](https://discourse.nodered.org/t/newbie-here-tibber-question/29199/21 "2020-06-30T09:24:41Z")

</div>

(I have bumped @Henke82 to basic user so it shouldn't be a problem)

[Next page](https://discourse.nodered.org/t/newbie-here-tibber-question/29199.md?page=2)
