vThings Forums

Full Version: Access over WiFi
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Could it be possible to access the sensor via WiFi rather than plugging it in to another device all the time?

For instance, when first setting up, an API key could be generated which then allows the chrome app to communicate with the device via WiFi?  Alternatively a simple web interface directly on the device?

While playing with it, I keep wanting to change the interval!
I also added this, to use it there is a command that needs to be executed "webserver_start", which is not yet persistent (compared to the static ip configuration)
(use "otah" to update to latest fw)

to make it run automatically when the device starts
prop_lset "event.setupEnd"##webserver_start##

since the device goes to low power mode after 3 minutes, you can disable this by
prop_lset "event.setupEnd"##webserver_start##nop 0##

as a result, temperature would go up

to call the web server - http://192.168.1.122/?cmd=wsi 120
to set he interval to 120 (it should respond "Received")
The lowest is 30 seconds, but i plan to make this configurable as well

the other alternative is to use dweet.io as an mediator - it is a simple web service that can hold messages for short time .. you do not need any registration, just choose some name for your dweet key
It works when you send a message to it, and a device polls for messages
to enable it - first configure your dweet id (this is persistent)
prop_set "dweet.cmdkey","your_key"
your_key can be e.g. baz123_device1 (of course if someone sends dweet to this key, the device will receive it Smile - there ar some paid plans to have passwords, etc..)

then to start - the command is "dweet_start 5" - to poll each 5 seconds (do not use 1 second, as the service may refuse connections to your device)
to start this when the device boots
prop_lset "event.setupEnd"##dweet_start 5##

once the device goes to low-power mode, each time it wakes up it will check for new messages and execute them (so then the 5 sec timeout is not relevant)
to send a dweet
http://dweet.io/dweet/for/vladi?cmd=wsi 120
(10-24-2016, 04:20 AM)admin Wrote: [ -> ]I also added this, to use it there is a command that needs to be executed "webserver_start", which is not yet persistent (compared to the static ip configuration)
(use "otah" to update to latest fw)

to make it run automatically when the device starts
prop_lset "event.setupEnd"##webserver_start##

since the device goes to low power mode after 3 minutes, you can disable this by
prop_lset "event.setupEnd"##webserver_start##nop 0##

as a result, temperature would go up

to call the web server - http://192.168.1.122/?cmd=wsi 120
to set he interval to 120 (it should respond "Received")
The lowest is 30 seconds, but i plan to make this configurable as well

the other alternative is to use dweet.io as an mediator - it is a simple web service that can hold messages for short time .. you do not need any registration, just choose some name for your dweet key
It works when you send a message to it, and a device polls for messages
to enable it - first configure your dweet id (this is persistent)
prop_set "dweet.cmdkey","your_key"
your_key can be e.g. baz123_device1 (of course if someone sends dweet to this key, the device will receive it Smile - there ar some paid plans to have passwords, etc..)

then to start - the command is "dweet_start 5" - to poll each 5 seconds (do not use 1 second, as the service may refuse connections to your device)
to start this when the device boots
prop_lset "event.setupEnd"##dweet_start 5##

once the device goes to low-power mode, each time it wakes up it will check for new messages and execute them (so then the 5 sec timeout is not relevant)
to send a dweet
http://dweet.io/dweet/for/vladi?cmd=wsi 120

I tried this, dweet function, the command
prop_lset "event.setupEnd"##dweet_start 5##
is not recognized
when I start it manual (dweet_start 5) it works, only I want it to start at device boot
I tried  prop_jset "event.setupEnd" ##dweet_start 5##  (found the jset elsewhere on this forum), that command is accepted, but doesn't start dweet every 5 seconds

not a big issue, just exploring the device options
Wink
yeah.. in the latest firmware i removed those events... not there is a property
prop_set "dweet.autostart","5"

which will start the dweet checking an check each 5 seconds if there are commands
i have to yet describe all of this features Smile
(02-25-2017, 06:11 AM)admin Wrote: [ -> ]yeah.. in the latest firmware i removed those events... not there is a property
prop_set "dweet.autostart","5"

which will start the dweet checking an check each 5 seconds if there are commands
i have to yet describe all of this features Smile

thanks, problem solved!