Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Need help with getting info from a string with live rain website


kooy

Question

Hope you guys can help me.

 

I found a website that can give you realtime rain info on a specific lat and long values.

 

It can predict rain in your area upto 2 hours upfront.

 

now my only trouble is how to get the right info from the website.

 

As it stand now im getting info like this

 

000|20:50 000|20:55 000|21:00 000|21:05 000|21:10 000|21:15 000|21:20 000|21:25 000|21:30 000|21:35 000|21:40 000|21:45 000|21:50 000|21:55 000|22:00 000|22:05 000|22:10 000|22:15 000|22:20 000|22:25 000|22:30 000|22:35 000|22:40 000|22:45 000|22:50

 

where 000 is the amount of rain and timestamp (lucky me no rain at least till 22:50)

 

What i would like is to get the info only for the next 15 minutes.

so if my local time 21:15 i would like to get the info for 21:30 which looks like 000|21:30

 

How to get the 000 part out of the string at 21:30?

 

i tried

str = string.match(response, "21:10")

fibaro:debug(str)
but that only get the me right time and i need the 3 chars before that.
 
 
 
 

 

 

 

Link to comment
Share on other sites

Recommended Posts

  • 0

Good evening @JohnneyBoy,

 

around line 175 replace

Please login or register to see this code.

with

Please login or register to see this code.

 

Jim

Link to comment
Share on other sites

  • 0
19 minutes ago, jimicr said:

Good evening @JohnneyBoy,

 

around line 175 replace

Please login or register to see this code.

with

Please login or register to see this code.

 

Jim

 

 

I changed the url in the VD.

 

Also added a variable "url" at the top of the code.

Link to comment
Share on other sites

  • 0

Nice one @boerremk, the url var. saves time finding the line every time they change things!

 

Fijn weekend!

Link to comment
Share on other sites

  • 0

 

Any chance someone having a vd with buienradar data for the next 5 days (temp day/night, rain, wind etc)?

Edited by rickydehaas
Link to comment
Share on other sites

  • 0

It is working very fine at my place too.

 

What is meant by Phone ID, where can I find the ID?

I assume under Acces Control - Mobile devices.

 

There I see a list of phones:

For example: Samsung SM-T820[ce319261-2630-3cc5-aca1-12ec7356a062]

 

What is expected between the brackets. Samsung SM-T820 OR [ce319261-2630-3cc5-aca1-12ec7356a062] OR the order nummerin the list???

 

local push = {true,"fibaro",{4}}; -- false (off) or true (on), use pushover or fibaro, ID of phone(s) (seperated by comma, only used for Fibaro push)

Link to comment
Share on other sites

  • 0
11 minutes ago, Jackson said:

It is working very fine at my place too.

 

What is meant by Phone ID, where can I find the ID?

I assume under Acces Control - Mobile devices.

 

There I see a list of phones:

For example: Samsung SM-T820[ce319261-2630-3cc5-aca1-12ec7356a062]

 

What is expected between the brackets. Samsung SM-T820 OR [ce319261-2630-3cc5-aca1-12ec7356a062] OR the order nummerin the list???

 

local push = {true,"fibaro",{4}}; -- false (off) or true (on), use pushover or fibaro, ID of phone(s) (seperated by comma, only used for Fibaro push)

 

use:

homcenter-ip/api/devices

and then search for "Samsung SM-T820", just before the name you find the id.

 

My phone is called Remko, the id is 704:

{"id":704,"name":"Remko".....

  • Like 1
Link to comment
Share on other sites

  • 0

Hi All,

 

Not sure if this is the right track, but I was wondering, or is it just me, but the VD Buienradar has stopped since Tue Jul 21 13:39:26 2020 ?

I think it might have to do with a change in the buienradar URL ???

 

any thoughts or suggestions ?

 

Thanks !

Link to comment
Share on other sites

  • 0

Hi @Patrick,

 

Yep the url is changed AND https, so I have to make a scene to get it working again. 

  • Like 2
Link to comment
Share on other sites

  • 0

I am using the Buienradar VD too.

My sunscreen is using it. It automatically close 15 minutes before it starts to rain.

Hopefully you manage to fix it since i was very happy with the VD :-)

 

Anyway, thank you for your effort! @boerremk

Link to comment
Share on other sites

  • 0

I thought it was just me that has a not functioning buienradar vd, after I was messing with my HC.

 

 

Link to comment
Share on other sites

  • 0

Hi  @boerremk?

 

When I install your VD i get this:

2-Aug 19:00:47 : Global variable Buienradar created
2-Aug 19:00:47 : buienradar: 0
2-Aug 19:00:47 :

Please login or register to see this link.


2-Aug 19:00:48 : error: 0
2-Aug 19:00:48 : status: 301

Edited by Twannie
Link to comment
Share on other sites

  • 0
On 8/3/2020 at 10:46 PM, SmartHomeEddy said:

Does someone have a Buienradar Quickapp for the HomeCenter 3 to predict the rain ?


apperently not ?, so I build one. I already build a Buienradar weather quickapp to use the more Dutch orientated weather forecast.

 

 

 

Now I also build a QuickApp based on the Buienradar rain forecast. The QuickApp has the value in how many minutes it will rain, so you can use a scene to notify or to close windows or sunscreen, etc. If there is no rain expected, the value is zero and if it is raining the value is 999. 
 

I am now testing the QuickApp, but it is too sunny ☀️ ?
 

Please login or register to see this spoiler.


 

EDIT 8-8-2020: rain is expected, the quickapp works ??

 

Please login or register to see this attachment.


 

 

 

Edited by SmartHomeEddy
Link to comment
Share on other sites

  • 0
On 8/2/2020 at 6:59 PM, Twannie said:

Hi  @boerremk?

 

When I install your VD i get this:

2-Aug 19:00:47 : Global variable Buienradar created
2-Aug 19:00:47 : buienradar: 0
2-Aug 19:00:47 :

Please login or register to see this link.


2-Aug 19:00:48 : error: 0
2-Aug 19:00:48 : status: 301

 

anyone?

Link to comment
Share on other sites

  • 0
8 minutes ago, Twannie said:

anyone?


The URL is forwarded to

 

Please login or register to see this code.


Can you try that URL?

 

(for the HC3 I have it working with a quickapp with that URL)

Link to comment
Share on other sites

  • 0
8 minutes ago, SmartHomeEddy said:


The URL is forwarded to

 

Please login or register to see this code.


Can you try that URL?

 

(for the HC3 I have it working with a quickapp with that URL)

you mean changig in the code?

 

and which version of buienradar is the latest?

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...