Ewon TechForum
Providing technical solutions to technical requests


Flexy and Microsoft Power BI
Mihir Offline
Junior Member
#16
(26-04-2018, 09:30 PM)Simon Wrote: ah great! Thanks for the feedback and enjoy ;-) !

Very useful post. Followed the steps and all done in minutes....

On the power-bi side, I have to refresh the data manually to display the current data. Power-BI suggests configuring on-premise data gateway. Do you have any experience on this? 

I would like to display this data (refresh automatically) on our website using the iframe. 

BR

Mihir
Reply

jiayuan0727 Offline
Junior Member
#17
Very good example. Thanks a lot.

I am wondering what is the best way of saving historical data to somewhere (such as google drive or one drive..) as a backup?

Best regards
Jiayuan
Reply

Cst Offline
Junior Member
#18
(21-02-2018, 06:17 PM)simon Wrote: Power BI (https://powerbi.microsoft.com/en-us/) is a business analytics service provided by Microsoft.


Here is the procedure to follow for pushing Live Tag data to Power BI :

- Create and configure the  datastream : 
- When the datastream is created, copy the URL
- Adapt the following BASIC script with your URL and your Tags (in the Json) :

Code:
TSET 1,2
ONTIMER 1, "GOTO PusDataToPowerBI"

PusDataToPowerBI:
Url$ = "https://api.powerbi.com/beta/5c7c1590-4488-4e42-bc9c-15218f8ac994/datasets/98ec900d-3f6c-4a21-be47-be95b28f1e13/rows?key=VHEVy%2BtVzQ0DkO4t%2FhcieBr3vhQIjaEg92VMjO1H%2BWBiprP87Svxf8UlGPBFmGWNHxAfHgum%2B23u5mFwR1wQ%3D%3D"
method$ = "POST"
header$ = "Content-Type=application/json"
Json$ = '[{'
Json$ = Json$ + '"Temperature" :' + STR$ Temperature@ +","
Json$ = Json$ + '"Humidity" :' + STR$ Humidity@ +","
Json$ = Json$ + '"Timestamp" :"' + @GetTime$ +'"'
Json$ = Json$ +'}]'
REQUESTHTTPX url$, method$, header$, Json$
Print "Data Pushed"
END

Function GetTime$()
$a$ = Time$
$GetTime$ = $a$(7 To 10) + "-" + $a$(4 To 5) + "-" + $a$(1 To 2) + "T" + STR$(VAL($a$(12 To 13)) - 1)+":"+$a$(15 To 16)+":"+$a$(18 To 19)+ ".000Z"
EndFn

This script pushes the values of the Tags "Temperature" and "Humidity" every two seconds (See TSET command) :.
- Run the script
- Create a dashboard or a report


Simon

Simon,

Sorry to ask you , but when I try this code, the line with the string declaration of the url is declared too long by my Flexy...
What is the tips to write the complete url into two lines ?

thanks
Reply

simon Offline
eWON Support
#19
Hi,

You just do
Url$ = "part1"
Url$ = Url$ + "part2"

Simon
Reply

simon Offline
eWON Support
#20
(12-07-2018, 09:19 PM)ms9901 Wrote: Simon,

Have you played with pushing historical tag data to Power BI? It seems like it could be done with EBD but you would need to parse the result of EBD into appropriately formatted JSON using a script?

Mike

Mike,

Very old post but it could help someone else...

If you want to send a custom data file, you must create it with BASIC script.  To do that you can get inspiration from https://techforum.ewon.biz/thread-597.html

Simon
Reply



Possibly Related Threads…
24-01-2020, 09:45 PM
Last Post: tedsch
  Power Interuption Alert Started by domash
1 Replies - 318 Views
24-09-2019, 09:09 PM
Last Post: simon
03-09-2019, 02:08 PM
Last Post: simon
  Flexy SMS Alert Started by domash
11 Replies - 1.848 Views
22-08-2019, 12:10 PM
Last Post: simon
  MQTT eWon Flexy 205 Started by RFreist
3 Replies - 1.403 Views
18-07-2019, 12:30 PM
Last Post: simon
23-05-2019, 05:45 PM
Last Post: smoro
20-05-2019, 03:36 PM
Last Post: simon
03-05-2019, 10:38 AM
Last Post: simon
12-02-2019, 06:39 PM
Last Post: simon
17-12-2018, 08:35 AM
Last Post: Dmitriy



Users browsing this thread:
1 Guest(s)



Theme © Ewon 2019 - Forum software by © MyBB - Cookie policy