Switch to desktop version  

Ewon TechForum
Providing technical solutions to technical requests


  Share Data between two Flexy connected to Talk2M
Posted by: FromTicket - 24-05-2016, 11:54 AM - Replies (28)

Good morning,
 

-          Is it possible to push data from one Flexy to another over Talk2M directly (for example in a Basicscript with M2Web) ?
-          Are there other possibilities to do that?

Continue reading..

  Share Tag values between two or more Flexy connected to Talk2M
Posted by: FromTicket - 24-05-2016, 11:54 AM - Replies (7)

Good morning,
 

-          Is it possible to push data from one Flexy to another over Talk2M directly (for example in a Basicscript with M2Web) ?
-          Are there other possibilities to do that?

Continue reading..

  Use Event with JAVA
Posted by: simon - 23-05-2016, 03:01 PM - No Replies

Hi Guys,

Just a simple example about how to use events in JAVA for eWON.



Attached Files
  TagEvent.zip (Size: 23,9 KB / Downloads: 207)
Continue reading..

  Poll multiple serial Modbus networks with a Flexy.
Posted by: FromTicket - 23-05-2016, 01:53 PM - Replies (14)

Hi,

Can I set my eWON to poll multiple Modbus slave devices dispatched on two serial networks  (RS485/232) ?

Continue reading..

  Use HTML5/Ajax on eWON
Posted by: simon - 23-05-2016, 01:43 PM - Replies (10)

Hi Guys,

Here are some HTML5/Ajax examples for eWON.

If you have questions about it, let me know.



Attached Files
  HTML5.zip (Size: 110,49 KB / Downloads: 309)
Continue reading..

  MD5 Checksum with BASIC
Posted by: FromTicket - 23-05-2016, 12:23 PM - Replies (1)

Hi,

Is there a way to compute a MD5 checksum from the BASIC of eWON ?

Continue reading..

  eWON and Facebook
Posted by: simon - 23-05-2016, 12:08 PM - No Replies

Hi Guys,

I have recently created a Facebook page for publishing the data of the Weather Station (connected to eWON) that we have here (https://www.facebook.com/EWON-Weather-Station-1724188781137106/)
This to demonstrate that the eWON is able to post data to Facebook thanks to the graph API.

The eWON creates a new post on the Facebook page every 4 hours. It actually sends some Weather data like the Temperature, Humidity...

Here is my code :



Code:
Rem --- eWON start section: Init Section
ewon_init_section:
Rem --- eWON user (start)
ONDATE 1,"0 */4 * * *","GOTO FACEBOOK"
ONSTATUS "GOTO FACEBOOK_CALLBACK"
END


FACEBOOK:
u$ = "https://graph.facebook.com/v2.6/1724188781137106/feed"

m$ = "POST"

emoticon$ = @GETEMOTICON$()

d$ = 'message=Belgium Weather (Nivelles) : ' + emoticon$
d$ = d$ + '%0A Local Time : ' + TIME$
d$ = d$ + '%0A Temperature : ' + STR$ outTemp@ + ' DegC '
d$ = d$ + '%0A Humidity : ' + STR$ outHumi@ + ' %'
d$ = d$ + '%0A Wind Speed : ' + STR$ avgwind@ + ' km/h'
d$ = d$ + '%0A Atmospheric Pressure : ' + STR$ AbsPress@ + ' hpa'

d$ = d$ + '&access_token=EAAQTts8JDb0BAHYeAZBA6BO0Smva8vQ4OmRK2PPE6Co1ZAbLAqrqG6ZBoZCFAG6lNdaeRTs8ZCKiJmZBcNQIL7ZBoth'
d$ = d$ + 'tRPaYRewp0tKA5soDzdHYGhevN3EtZAG3yJGIeRsIbzLaKBcsgMYQp5Am0wopQQ5qLEIJWranDa8FAAZD'

REQUESTHTTPX u$, m$, "Content-Type=application/x-www-form-urlencoded;", d$

ACTIONID% = GETSYS PRG, "ACTIONID"

END

FACEBOOK_CALLBACK:

eventId%= GETSYS PRG,"EVTINFO"
If eventId%=ACTIONID% Then
 SETSYS PRG, "ACTIONID", eventId%

 stat%=Getsys PRG,"ACTIONSTAT"
 If (stat%=0) Then
   answer$ = RESPONSEHTTPX "RESPONSE-BODY"    
   Print "FACEBOOK POST RESPONSE :" + answer$
 Endif
Endif

END

FUNCTION GETEMOTICON$()
//icon from http://fbicons.net/
 $curtime$ = TIME$
 $curhour$ = $curtime$(12 To 13)
 $curhour_int% = VAL($curhour$)
 
 IF $curhour_int% = 8 THEN
   $GETEMOTICON$ = CHR$(239) + CHR$(187) + CHR$(191) + CHR$(240) + CHR$(159) + CHR$(140) + CHR$(133) //sunrise
   RETURN
 ENDIF
 IF $curhour_int% = 20 THEN
   $GETEMOTICON$ = CHR$(239) + CHR$(187) + CHR$(191) + CHR$(240) + CHR$(159) + CHR$(140) + CHR$(135) //sunset
   RETURN
 ENDIF
 
 IF $curhour_int% > 20 OR $curhour_int% < 8 THEN
   $GETEMOTICON$ = CHR$(240) + CHR$(159) + CHR$(140) + CHR$(131) //night
   
 ELSE
 
   IF solarrad@ < 200 THEN
     $GETEMOTICON$ = CHR$(239) + CHR$(187) + CHR$(191) + CHR$(226) + CHR$(152) + CHR$(129) //cload
   ELSE
     $GETEMOTICON$ =  Chr$(226) + Chr$(152) + Chr$(128) //Sun
   ENDIF
 ENDIF
 
 IF rainofhourly@ > 0 THEN
    $GETEMOTICON$ = CHR$(239) + CHR$(187) + CHR$(191) + CHR$(226) + CHR$(152) + CHR$(148) //umbrella
 ENDIF
 

ENDFN



Rem --- eWON user (end)
End
Rem --- eWON end section: Init Section

By the way, the Weather Station I have connected to my eWON is this one : http://www.conrad.be/ce/nl/product/12676...ion-WH2600
This Weather station is quite cheap and features a Web Server.  So pretty easy to read the data using BASIC or JAVA.
In my case, I have developed the following Java IoServer to get the Data from it : https://developer.ewon.biz/content/weath...-io-server

Continue reading..

  eWON and ThingWorx
Posted by: simon - 23-05-2016, 11:14 AM - Replies (13)

Hi Guys,

I just managed to get my eWON push its live data (Tag values) to a ThingWorx server. (http://www.thingworx.com)

Actually it is very easy to do with the new REQUESTHTTPX function (Implemented as of the firmware 11.1)

Find here below my example.
I have created a function that pushes a single Tag value to ThingWorx.  Data must be pushed through  simple JSON files.
Every time a Tag changes, the eWON then pushes the value to the Thingworx server.

Code:
Rem --- eWON start section: Init Section
ewon_init_section:
Rem --- eWON user (start)

ONCHANGE "Qty_Color_B", "@UpdateThingWorxProperty('0e13ccdc-f6a9-4678-925e-83f060d5872e','Qty_Color_B')"
ONCHANGE "Qty_Color_C", "@UpdateThingWorxProperty('0e13ccdc-f6a9-4678-925e-83f060d5872e','Qty_Color_C')"
ONCHANGE "Qty_Color_D", "@UpdateThingWorxProperty('0e13ccdc-f6a9-4678-925e-83f060d5872e','Qty_Color_D')"
ONCHANGE "Temperature", "@UpdateThingWorxProperty('0e13ccdc-f6a9-4678-925e-83f060d5872e','Temperature')"

Rem --- eWON user (end)
End
Rem --- eWON end section: Init Section
Rem --- eWON start section: ThingWorx
Rem --- eWON user (start)

FUNCTION UpdateThingWorxProperty($appKey$,$Tagname$)
$url$ = "http://{ThingWorxServerIPorURL}/Thingworx/Things/{MyThing}/Properties/*"
$method$ = "PUT"
$Tagvalue = GETIO $Tagname$
$Tagvalue_String$ = STR$ $Tagvalue
$DataToSend$ = '{"' + $Tagname$ + '":' + $Tagvalue_String$ + '}'
$header$ = "Content-Type=application/json&Accept=application/json&appKey=" + $appKey$
REQUESTHTTPX $url$, $method$, $header$, $DataToSend$
PRINT "Value of " + $Tagname$ + " is sent to ThingWorx"
ENDFN
Rem --- eWON user (end)
End
Rem --- eWON end section: ThingWorx

  • {ThingWorxServerIPorURL} must be replaced by the IP or URL of the ThingWorx server
  • {MyThing} is the name if the "Thing" you create for the eWON in ThingWorx.
In ThingWorx, a Thing is a "device" (here the eWON) and a Thing Property is a Tag.



By the way, multiple Tags can be pushed using such a JSON : {"ThingProperty1":TagValue1, "ThingProperty2":TagValue2,...}



Attached Files
  2016-05-23_11-12-50.png (Size: 90,05 KB / Downloads: 956)
Continue reading..

Forum Statistics
Members: 6.279,   Forum threads: 2.531,   Forum posts: 9.145,   Latest member: Finchy109,   Full Statistics

Latest Threads
Flexy Device Manager Access
Last post published by abrannon
03-04-2026, 04:04 PM 2

Download a file from /usr directory using only BASIC
Last post published by LuisEnrique
31-03-2026, 04:04 PM 4

Download files in /usr directory using only BASIC Script
Last post published by LuisEnrique
26-03-2026, 10:41 PM 2

Block FileZilla to WRITE (Only) to Flexy
Last post published by LuisEnrique
26-03-2026, 08:25 PM 0

2x Flexy - direct connection
Last post published by mnieuzyla
05-03-2026, 06:48 PM 0

How to read a file
Last post published by mickaa
20-02-2026, 01:51 PM 4

Change value from Ewon tag
Last post published by ziozetti
19-02-2026, 11:37 PM 4

Guide: Flexy using OpenVPN via CloudConnexa instead of Talk2M
Last post published by steverb32
18-02-2026, 08:14 PM 2

SYS or COM parameters for activate SD CARD
Last post published by mickaa
12-02-2026, 06:32 PM 0

Using a user's saved password without writing it in plain text into the program?
Last post published by mickaa
12-02-2026, 02:58 PM 0


Search Forums

Advanced Search



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