DIYbanter

DIYbanter (https://www.diybanter.com/)
-   UK diy (https://www.diybanter.com/uk-diy/)
-   -   Wifi device intermitant connecting (https://www.diybanter.com/uk-diy/649577-wifi-device-intermitant-connecting.html)

Harry Bloomfield, Esq. May 20th 20 10:36 AM

Wifi device intermitant connecting
 
I'm struggling with a device which measures specific gravity,
temperature and battery charge - for wine making/brewing. It runs on
tiny battery and every so often wakes up, takes an sg measurement etc.,
connects to my LAN and supposedly sends the data collected to a
website, maybe every 15mins. There are a few such sites I can use for
this, but I'm struggling to get any of them working, or confirm the
data is being sent to them.

My two routers log connected devices, but the device showing up in the
lists are quite rare, because it only connects for a couple of seconds.
How can I be sure the device is managing to connect, how can I check if
it is trying to relay the data?

[email protected] May 20th 20 11:06 AM

Wifi device intermitant connecting
 
On Wednesday, 20 May 2020 10:36:20 UTC+1, wrote:
My two routers log connected devices, but the device showing up in the
lists are quite rare, because it only connects for a couple of seconds.
How can I be sure the device is managing to connect, how can I check if
it is trying to relay the data?


Depends on the router logging; a 'professional' router will log much more than an ISP freebie.

Example of Draytek router logging every user logon durations:

https://i2.wp.com/www.draytek.co.uk/...size=640%2C534

Some will also log the amount of data used by the user, which would act as a check for you on data uploaded to sites.

Owain

Brian Reay[_6_] May 20th 20 11:52 AM

Wifi device intermitant connecting
 
On 20/05/2020 10:36, Harry Bloomfield wrote:
I'm struggling with a device which measures specific gravity,
temperature and battery charge - for wine making/brewing. It runs on
tiny battery and every so often wakes up, takes an sg measurement etc.,
connects to my LAN and supposedly sends the data collected to a website,
maybe every 15mins. There are a few such sites I can use for this, but
I'm struggling to get any of them working, or confirm the data is being
sent to them.

My two routers log connected devices, but the device showing up in the
lists are quite rare, because it only connects for a couple of seconds.
How can I be sure the device is managing to connect, how can I check if
it is trying to relay the data?


Is this a commercial beast or some Arduino thing you've built etc from a
design?

If the latter, I'd be surprised if there isn't a facility, while a PC is
connected and running the Arduino IDE, to run the 'terminal'utility
which monitors activity. Generally, those who write SW, will, for
example, 'print' to the terminal:

Connecting to Wifi
Connected to Wifi
Sending data
Data sent

etc

It may be worth looking at the design notes and checking.



--

https://www.unitedway.org/our-impact...an-trafficking

Harry Bloomfield, Esq. May 20th 20 12:14 PM

Wifi device intermitant connecting
 
Brian Reay pretended :
Is this a commercial beast or some Arduino thing you've built etc from a
design?


Its a homebuilt github design using a WeBos D1.


If the latter, I'd be surprised if there isn't a facility, while a PC is
connected and running the Arduino IDE, to run the 'terminal'utility which
monitors activity. Generally, those who write SW, will, for example, 'print'
to the terminal:


I can connect to the unit via USB and PUTTY, but I cannot connect to it
in normal operation at the moment when on battery, because the usb's 5v
would damage it back feeding. I just need to remove components to try
PUTTY during normal operation.

I only built it yesterday, so I was reluctant to start carving it up
until I knew it was working.

My main router in the loft runs OpenWRT, and the device is showing in
its log. The device is set at the moment to connect to my secondary
router on the ground floor and upload its data every 60 seconds. In the
main routers log I can see it doing 'something' every 61 seconds, but I
cannot copy and paste from the log.

These are the log entries for the device...
DHCPDISCOVER
DHCPOFFER
DHCPREQUEST
DHCPPACK
61 seconds later, it repeats.
DHCPDISCOVER....

Does that suggest it might be trying to connect to a remote website and
succeeding, or failing?

Harry Bloomfield, Esq. May 20th 20 12:28 PM

Wifi device intermitant connecting
 
on 20/05/2020, Brian Reay supposed :
Is this a commercial beast or some Arduino thing you've built etc from a
design?


Its an iSpindel. The beasty floats inside a sort of test tube, with the
Webos, gyroscope, temperature sensor, charger and a LiPo. The angle it
floats at, is dependent on the SG, which it then reports as data via
wifi, to a website.

There are several websites able to display the data, but my head is
bursting trying to get any of them working, plus trying to decide
whether the problem is the data not being sent to sites, or me not
configuring the sites properly.

Harry Bloomfield, Esq. May 20th 20 01:20 PM

Wifi device intermitant connecting
 
Harry Bloomfield, Esq. wrote :
I only built it yesterday, so I was reluctant to start carving it up until I
knew it was working.


I bit the bullet and carved the back feed components off the WeBos PCB.

This is the relevant output of PUTTY, each time it wakes up each minute
to send a fresh batch of data...

It is supposed to be connecting to the Ubidots website, the site seems
to be suggesting that you just tell it I am using an iSpindel and it
will do the rest. I have changed the 'token', for obvious reasons...

calling Ubidots
{"tilt":83.74638,"temperature":24.375,"battery":4. 087591,"gravity":30.41856,"interval":60,"RSSI":-70}
Sender: Ubidots posting
POST
/api/v1.6/devices/Ispindel?token=BBFF-BOVvWDe84RjfbUG8Ds???9???fFlIl
HTTP/1.1
Host: things.ubidots.com
User-Agent: ESP8266
Connection: close
Content-Type: application/json
Content-Length: 101

HTTP/1.1 200 OK
Server: nginx
Date: Wed, 20 May 2020 12:08:16 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: close
Allow: GET, POST, HEAD, OPTIONS
Vary: Origin, Cookie

d1
{"battery": [{"status_code": 201}], "gravity": [{"status_code": 201}],
"interval": [{"status_code": 201}], "rssi": [{"status_code": 201}],
"temperature": [{"status_code": 201}], "tilt": [{"status_code": 201}]}
0

Harry Bloomfield, Esq. May 20th 20 02:16 PM

Wifi device intermitant connecting
 
Harry Bloomfield, Esq. submitted this idea :
There are several websites able to display the data, but my head is bursting
trying to get any of them working, plus trying to decide whether the problem
is the data not being sent to sites, or me not configuring the sites
properly.


Sorted!

The main website I was working with Ubidots, had graphics and text so
large the resolution of the laptop I was using was not able to display
all of the settings. It simply needed me to scroll around more on the
page, to set it up to receive the data and display it.

A. non Eyemouse May 20th 20 03:20 PM

Wifi device intermitant connecting
 
On 20/05/2020 14:16, Harry Bloomfield wrote:
Harry Bloomfield, Esq. submitted this idea :
There are several websites able to display the data, but my head is
bursting trying to get any of them working, plus trying to decide
whether the problem is the data not being sent to sites, or me not
configuring the sites properly.


Sorted!

The main website I was working with Ubidots, had graphics and text so
large the resolution of the laptop I was using was not able to display
all of the settings. It simply needed me to scroll around more on the
page, to set it up to receive the data and display it.


A PICNIC problem then.

--
Mouse.
Where Morse meets House.


All times are GMT +1. The time now is 10:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2014 DIYbanter