ITTT can one write ones own program?

Joined
27 Jan 2008
Messages
23,630
Reaction score
2,662
Location
Llanfair Caereinion, Nr Welshpool
Country
United Kingdom
I looked on the control web page, and it clearly uses java script, I noted the following lines.
<a class="power-button on" rel="nofollow" data-method="post" href="/devices/6009/subdevices/43881/power_on">ON</a>
<a class="power-button off" rel="nofollow" data-method="post" href="/devices/6009/subdevices/43881/power_off">OFF</a>
It does seem possible to write a program to activate the device automatic from a PC, but I don't really know what I would need to do in order to send commands.

Problem is the socket has three on/off commands per day and I want four, one every visit of carers. As it stands I need to remember to switch off and back on when the tea time visit is due, no great problem if I forget to turn off, the alarm sounds and I then switch off from web browser or phone or remote. The problem is if I forget to turn it back on, then my mother could do something to endanger her without me being aware.

This is why I fitted the socket, before fitting the MiHome socket I tried using both remote controlled plug in sockets and plug in timers. The timer was not too bad, it would auto switch on so could not forget, but I could not switch off the sockets from down stairs to do simple tasks like answering the door, the remote control socket it was too easy to think one had switched back on, but for what every reason it had failed, so when an alert should have sounded it didn't.

The MiHome combined the timer and remote, so if I for any reason don't reactivate the socket, at the set time it will auto activate, it also means multi-methods to control the sockets, from simple remote control, to phone, to PC, so no longer running up and down stairs to switch alarms off. However it has only three on/off slots and mother has four timed carer visits, so want one extra off time.
 
Sponsored Links
It looks like for each device, it has a directory on the web server with a script for power on and one for power off

/devices/6009/subdevices/43881/power_off
/devices/6009/subdevices/43881/power_on

Where 43881 is the number of the device you want to control

Where is the webserver thats serving these pages, is it in a base station located in the house (possibly with a dynamic hostname service) or is hosted by the manufacturer?

If the page was at something like w-ww.ddns.com/ericmark/control/index.htm then try typing w-ww.ddns.com/erickmark/control/devices/6009/subdevices/43881/power_on (dashes inserted into links to break example links that lead nowhere...)
 
It won't be a folder per device it'll just be route to a controller.
It would be very easy to write a program which does a post request on those urls to achieve what you are after. This could be automated by time etc. If you have write access to the an access point you can put the code in there if not you'd need a PC or something running all the time, if it's consumable by the internet (which sound a little scary to me) you could use a cron job to achieve this.
PM me if you want help.
 
Last edited:
Sponsored Links

DIYnot Local

Staff member

If you need to find a tradesperson to get your job done, please try our local search below, or if you are doing it yourself you can find suppliers local to you.

Select the supplier or trade you require, enter your location to begin your search.


Are you a trade or supplier? You can create your listing free at DIYnot Local

 
Back
Top