@dolf so does your code work if you hit the agent with a browser?
yes, both in my browser and using http://hackst.com/
to define a reads, select the button and choose ‘reads’ from the dropdown menu called ‘add attribute’ . Then you can add the url there.
I think your problem is with the host, the app creates the url with http://‘host’:‘port’‘what-you-write-in-sends’ so if you put agent.electricimp.com/youragenturl as a host, this will mess up the url creation…
this is bad and I should add some more logic to this… can you try as host: agent.electricimp.com port: 80 and ‘sends’ : /youragenturl/?slider={value}
Your problem can also be caused by the rooted os… unfortunately we don’t have the possibility to support those modified operating systems… there are too many things which can cause issues… : /
To delete a user config, go to http://netio.davideickhoff.de/accounts/profile/ scroll down to your configs and hit the trash icon
Thanks David,
It works…
Great! I am glad it works. Sorry that it took a while to figure it out.
Now I’m working my way through your forum.
My impression is that NetIO and Electric Imp could be a perfect couple!
Here’s how I did it.
Add a new Label in NetIO designer with the following attributes:
reads: ?get=power
parseResponse: \d+
formatResponse: Power usage: {0}
interval: 5000
This will send an HTTP GET request every 5 seconds and parse the response.
The agent looks something like this:
http.onrequest(function(req, res) { local q = req.query; if ("get" in q) { switch (q.get) { case "power" : res.send(200, lastPower); case "temp" : res.send(200, lastTemp); } } else res.send(200, "OK"); });
The lastPower variable comes from the Imp using device.on
Hope this helps.
I am very new to all of this stuff and i was able to jwehr’s IOT buddy to work just fine but I am needing some feed back from my imp so I am trying to get the netio to work but I am getting no where and help would be great. thanks in advance.
Best way is to go to the NetIO forums