Mother Download

Posted on
Sat Apr 18, 2015 12:44 am
kw123 offline
User avatar
Posts: 4970
Joined: May 12, 2013
Location: dallas, tx

Mother Download

LATEST VERSION:
https://www.dropbox.com/s/qmul48rkeia3v9h/mother-v-7.4.5.zip?dl=1



older versions:

https://www.dropbox.com/s/g2mlq5y5c5u1hgh/mother-v-1-4-1.zip?dl=1
https://www.dropbox.com/s/xiko3gtrlv39myt/mother.indigoPlugin-0-3.zip?dl=0
this is the first sen.se Mother-Cookie plugin

What it does:
1. query the Mother web server for configuration and data
2. create one indigo device for each cookie
3. if enabled at the sen.se web page download the data for
- Temperature
- Presence
- Motion
- Battery
and populate states in the indigo devices:
Screen Shot 2015-04-18 at 1.22.00 AM.png
Screen Shot 2015-04-18 at 1.22.00 AM.png (84.58 KiB) Viewed 2383 times


Configuration in Indigo:
In the general Config you can/must enter YOUR Sen.se userid and password, if you like to use Celsius or Fahrenheit for temperatures and set the debug level.
Screen Shot 2015-04-18 at 2.00.41 AM.png
Screen Shot 2015-04-18 at 2.00.41 AM.png (29.23 KiB) Viewed 2379 times


In edit device in indigo you can set for each sensor in each cookie:
- query timing i.e. how often should the sen.se websever be queried. Please be aware that there is a limit of 100 queries per minute. So don't put everything to the lowest number.
- ignore/ measure the value = activate the queries and populate the data to the indigo device states. if ignore no very is send to sen.se and no data is populated in indigo
please be aware that you ALSO have to enable the "apps" on the sen.se web server.
Screen Shot 2015-04-18 at 1.23.50 AM.png
Screen Shot 2015-04-18 at 1.23.50 AM.png (87.27 KiB) Viewed 2383 times


Some other info:
- You can rename the indigo devices as you like , but you can't delete them (right now) they will be recreated automatically -- have not tested ü .. ä yet
- It will create a directory mother in documents where it stores the temp files. Each active cookie/sensor will create a file of ~ 500bytes Plus one file (cookie) for Sense config data
- the queries are done in parallel through cURL in a bash shell so that each cookie/sensor can have their own schedule independent of the other cookies/sensors.
The one liner is actually interesting .. how to avoid reading a file that is not finished by cURL from the plugin (if you into these things it looks like: curl ... > temp && mv temp final; wait 60|| wait 30)
- in my configuration with 4 cookies and 10 sensors active it creates ~ 20kbit/s network traffic constantly
- more than 4 cookies might require paging of responses (not done yet)

BUT FIRST YOU NEED TO ACTIVATE YOUR "DEVELOPER ACCESS". They call it developer access, but it simply gives access to the data.
the website is:https://sen.se/developers/register/

This is the first version and it seems to work for me. But have not run into the issues that happen rarely


Karl

ps with this thing called mother one has to be careful naming some of the variables .. :oops:

Posted on
Sat Apr 18, 2015 4:16 am
kw123 offline
User avatar
Posts: 4970
Joined: May 12, 2013
Location: dallas, tx

Re: Mother Download

https://www.dropbox.com/s/mczprojp4avkj9m/mother.indigoPlugin-0-3-2.zip?dl=0 v0.3.2

fixed:
1. if cookie name contains a blank curl function did not work
2. after change in device name indigo edit device save caused error
3. trigger state for presence was renamed from presence_data to presence

Karl

Posted on
Sat Apr 18, 2015 6:14 pm
kw123 offline
User avatar
Posts: 4970
Joined: May 12, 2013
Location: dallas, tx

Re: Mother Download

https://www.dropbox.com/s/6ep2bssud2x4ymc/mother.indigoPlugin-0-4.zip?dl=0 v 0.4

Added/fixed:
- supports larger number of cookies, i.e. it pages through the configuration data
- you can now rename a cookie on the sen.se website. Then you need to do Indigo/Mother/Menue/ re assemble .." to get the information.
a new indigo device is created. The old one will still exist, you need to delete that yourself.
EXAMPLE: Assume you have a cookie named "AAA" on sen.se and Indigo device named for this cookie "CookieAA". You rename the sen.se device to "BBB". After "re- assemble.. " an Indigo device BBB will be added that is linked to sen.se cookie BBB. You then can rename the indigo device BBB to anything you like.
It is a bit complicated, but there a 2 systems that both can set names, parameters for the same thing..

Posted on
Sun Apr 19, 2015 10:07 am
kw123 offline
User avatar
Posts: 4970
Joined: May 12, 2013
Location: dallas, tx

Re: Mother Download

https://www.dropbox.com/s/hdcal2a3kjun36k/mother.indigoPlugin-v-0-5.zip?dl=0 v0.5

added/fixed:

- if an INDIGO device (e.g. AAA) with the same name as a cookie (e.g. AAA) exists it will create an INDIGO device "AAA_cookie"
- renaming a cookie on sen.se works
- you can use ü ä characters now in cookie names
- in the INDIGO address column the UID of the cookies web page is show. This is used to sync INDIGO names/id's to COOKIE names i.e. when you rename a cookie etc.

Karl

Posted on
Mon Apr 20, 2015 11:25 pm
kw123 offline
User avatar
Posts: 4970
Joined: May 12, 2013
Location: dallas, tx

Re: Mother Download

https://www.dropbox.com/s/48wr2kx9n8ggfa3/mother.indigoPlugin-v-0-6.zip?dl=0 v 0.6

Added
+ Display columns:
--- show temp or presence or motion values in state Display column, select what you like to show in edit device
--- show UID of the cookie in the address column with https://apis.sen.se/v2/feeds/<uid>/ -u userid:password you can get info from SEN.SE about this cookie. This number is used to sync the cookies from SEN.SE to indigo. it stays the same when you rename the cookie on the web page
--- show cookie name as named on SEN.SE in notes columns. The cookie names don't have to be in sync with the indigo device names. See cookie blue is named blue_cookie. AS there was already an indigo device blue mother created an indigo device blue_cookie. ( you could even have a cookie named blue with indigo device yellow and cookie yellow with indigo name blue does not make sense, but you could do it)
+ added a reset menu item. this is the same as deleting the mother/cookie file and restarting
+ Timestamps for each sensor (xx=Presence/Temperature ...):
--- xx_LastEventDate = when was the last time cookie send a message to mother
--- xx_LastStatusChange= since when are you home
+ added support for enable / disable device.. i.e. if disabled no queries are send to SEN.SE and data stays static.

Karl
Attachments
Screen Shot 2015-04-21 at 12.02.26 AM.png
Screen Shot 2015-04-21 at 12.02.26 AM.png (164.12 KiB) Viewed 2227 times

Posted on
Sat Apr 25, 2015 10:48 pm
kw123 offline
User avatar
Posts: 4970
Joined: May 12, 2013
Location: dallas, tx

Re: Mother Download

https://www.dropbox.com/s/wm9vxa724ixh45s/mother.indigoPlugin-v-0-8-3.zip?dl=0

fixed:
- some logic bugs

added:
- automatic throttle function to stay below limit of 100 queries (can be configured) per minute to SEN.SE (Mother)
i.e. if cookie is "Absent" from home, all but queries to "Presence" state are stopped. But when cookie is "Present" (=home), queries to "Presence" state is slowed down to 1 / minute as the state only changes to "Absent" after ~ 3 minutes when cookie is out of reach.
- better output in log file
- works with multiple mothers in your home. You can put several mother devices into your home to improve coverage.

Karl

Posted on
Wed Apr 29, 2015 3:02 pm
kw123 offline
User avatar
Posts: 4970
Joined: May 12, 2013
Location: dallas, tx

Re: Mother Download

https://www.dropbox.com/s/2k9rev7riypijd1/mother.indigoPlugin-v-0-9-0.zip?dl=0 v 0.9.0

NEW:

0. Now recognizes "internet down" (thanks to charter for allowing me to test this for 1 hour this morning :? )

1. rewrote the communication with the SEN.SE web site. Now everything is in the python plugin.
This gives a better handle on sequencing of queries, i.e. fast changing or next one.

2. included management of timing etc of specific sensors. i.e. temperature value is only changed every 15 minutes. The plugin will now query the temp-sensor of a cookie at the appropriate time i.e. last temp update +15 minutes.

3. only API key is needed, no userid / password any more .. enter in config
Screen Shot 2015-04-29 at 3.44.28 PM.png
Screen Shot 2015-04-29 at 3.44.28 PM.png (35.8 KiB) Viewed 2164 times


5. added functionality to support the 3 different modes for "Motion":
- Bed: update every 3 minutes
- Door/Moved: update as soon as movement
- Walk : updated every 15 minutes with summary of walk stats
For door, moved and bed you can set the response time i.e. how often query should be performed. For "Walk" it is fixed , set to 15 minutes
Screen Shot 2015-04-29 at 3.45.52 PM.png
Screen Shot 2015-04-29 at 3.45.52 PM.png (139.76 KiB) Viewed 2164 times

6. when "absent" all queries to sensors but "presence" will stop. You can select the frequency how often the plugin should check if the cookie is back home. Once back home all other sensor in the cookie will go back to normal query mode.

The available state information is shown here, each can be used as a trigger
Screen Shot 2015-04-29 at 3.46.15 PM.png
Screen Shot 2015-04-29 at 3.46.15 PM.png (179.7 KiB) Viewed 2164 times


Karl

Things left to add:
Will try to get the info directly from the Mother device .. that will take some time.
Better understand some of the "hidden" features like set sensitivity of sensors etc.

Posted on
Mon May 04, 2015 9:22 pm
kw123 offline
User avatar
Posts: 4970
Joined: May 12, 2013
Location: dallas, tx

Re: Mother Download

https://www.dropbox.com/s/d5sibkwxd9awfl2/mother.indigoPlugin-v-0-10-6.zip?dl=0 version 0.10.6

NEW this plugin now has 2 different modes to get the cookie data into the plugin

1. PULL as previously described

2. PUSH: The mother SEN.SE web server will push new events / information to a web server on your MAC. This plugin will setup almost everything you need to do. It knows your public internet IP number and the IP number of your MAC .The only thing you need to do is to enable the proper port on your router and set it in the config menu
The setup is actually easier than in the pull mode. The plugin does not have to guess when new data is there, but it will arrive in the plugin initiated by the SEN.SE web server.
In the PULL version one has to setup timing parameters etc. All that goes away in the PUSH version.
This will reduce the WEB traffic by a factor of 10 and improve the response time to 2-3 seconds after e.g. a motion has occurred in one of the cookies.

You can switch between the 2 modes in the configuration menu. The menus adapt to the mode i.e. present only those parameters needed to be entered for the selected mode.

The attached shows the architecture and flow of the data.

Screen Shot 2015-07-20 at 10.47.21 PM.png
Screen Shot 2015-07-20 at 10.47.21 PM.png (196 KiB) Viewed 1901 times


The web server used is the webserver that comes with python. It is a simple HTTP server, NOT HTTPS. In order to do that you would need to register your site and add certificate files etc. The web server could support this.. may be next version.
The web server will only accept data with proper contents i.e. a specific key word from SEN.SE must be present.
If it receives any other data it will shutdown and restart . That takes ~ 1 second.
If you want to look at the incoming traffic it creates a log file in the ~/documents/mother/ directory including timestamp and source IP number

In summary:
This new version delivers response times of ~ 2-3 seconds of events from a cookie to INDIGO. It exposes all sensors and information available from the cookies/mothers as states in the plugin. You can set triggers on temperature, motions, and presence.

With this setup it actually can be used nicely for a presence/absent or home/away trigger with reasonable response time. When AWAY the cookies seem to send pings to MOTHER every 12 seconds. If you position one of your MOTHERS near to the entrance it will have enough time to react and open doors automatically before you reach the door.

A direct link between the INDIGO plugin and the MOTHER devices is not available, may be in the future.

Karl

ps.
the cookies actually registered the earthquake we had 2 days ago. Magnitude 3.2

Posted on
Sat Jun 20, 2015 5:40 pm
kw123 offline
User avatar
Posts: 4970
Joined: May 12, 2013
Location: dallas, tx

Re: Mother Download

https://www.dropbox.com/s/l0f025tc89v2hg6/mother-v-0-10-14.zip?dl=0 v 0.10.14

FIXED:
- SEN.SE, the website of mother changed the repose send to a query. This version works with the new response. The element "payload" value is not send anymore, instead only "data" dict is send.
- under certain circumstance (fast switch between push and pull and back) variables where not initialized properly ( it takes ~ 2 minutes to fully switch one way ).


NEW :
In config after <SAVE> it prints all settings to the log file if any debug level != no debug is selected.

Karl

thanks to Simon for testing.

Posted on
Tue Jul 07, 2015 1:50 pm
kw123 offline
User avatar
Posts: 4970
Joined: May 12, 2013
Location: dallas, tx

Re: Mother Download

https://www.dropbox.com/s/4gqf3xw314j9hb3/mother-v-0-11-1.zip?dl=0 V0-11-1


Fixed:
- Temperature state had the number an the degreeF mixed up
- some meow error control if connection is not present ..

ADDED
can feed FINGSCAN directly through and ACTION interface on the FINGSCAN side
If a cookie has a change in "presence" it sends an update to FINGSCAN (Version 4.11.1 required). Fingscan then can use this like any other "IP-Device" to trigger "HOME/AWAY etc.

Reaction time Cookie change --> FINGSCAN --> Trigger is ~ 1 second


No configuration on the Mother plugin is required. If FINGSCAN is active it will try to communicate with it and will send the proper info
see FINGSCAN at http://forums.indigodomo.com/viewtopic.php?f=166&t=12787&p=99059#p99059

Karl

Posted on
Mon Jul 20, 2015 4:52 pm
kw123 offline
User avatar
Posts: 4970
Joined: May 12, 2013
Location: dallas, tx

Re: Mother Download

https://www.dropbox.com/s/0kgu899xtt5biqi/mother-v-1-0-1.zip?dl=0 v-1-0-1

ADDED:
1. added mother itself as a device. You can see status for "Present" and "Touch" (When you touch the eyes it sends a message on length of the touch event)
2. added state for cookies "mother associated to cookie". You can see where the cookie is located closer too. That works in 80% of the cases as each cookie associates to the first mother it finds after it looses its connection. That might not be the nearest.
3. you now can rename the Mothers and Cookies on SEN.SE and the name changes gets reflected in the notes filed as "name of Cookie=xxx"after some seconds.
4. added state that shows the # of seconds since the last message from/ about the cookie/mother has been received.
all these work for both modes: push and pull

FIXED:
the ~/documents/mother/motherwebserver.log was not reset when size > 5MByte, now the log file gets renamed to ....-1.log and a new log file gets started if the file gets bigger than 5MB.

Karl
Attachments
Screen Shot 2015-07-20 at 5.53.12 PM.png
Screen Shot 2015-07-20 at 5.53.12 PM.png (174.46 KiB) Viewed 1919 times

Posted on
Sun Jul 26, 2015 3:19 pm
kw123 offline
User avatar
Posts: 4970
Joined: May 12, 2013
Location: dallas, tx

Re: Mother Download

https://www.dropbox.com/s/a1msdc4zfq0eyli/mother-v-1-0-2.zip?dl=0

Fixes:
- formatting of log files output
- web server: add some more checks for connections not coming from SEN.SE (i.e. if someone is scanning your network)
- general error controls
- improved interface to FINGSCAN
- streamlined the number of states, removed some that are not useful
- reduced the number of updates to states , i.e. when there is nothing new: do not update device state

New:
each cookie now shows to which mother it is attached to. You can use it to determine roughly where the cookie is.

Karl

next versions:
- improve management of subscriptions. Right now if there is any change, The whole thing gets setup from scratch i.e. delete all subscriptions and re-estabilish all of them. takes ~ 2 minutes for 76 feeds (i.e. sensors)
should be just the ones that are changed that should get re-established.
- check if there is no event from SEN.SE check if we connected to internet and to SEN.SE and fix / show error in logical if something is wrong.

Posted on
Tue Aug 18, 2015 8:42 am
kw123 offline
User avatar
Posts: 4970
Joined: May 12, 2013
Location: dallas, tx

Re: Mother Download

https://www.dropbox.com/s/d5i306w57djecm5/mother-v-1-1-1.zip?dl=0

improvements:
- improved management of subscriptions: more granular management of settings and resets etc in indigo/ menu,
- added reset/resync of a single cookie
- restart time now 10 secs, down from 10-15 minutes (moved some of the tasks into parallel background tasks)
- formatting of log file nicer


still missing:
- detect expired (paused) subscriptions, kind of does it, but not perfectly yet. and reinstate them instead of delete and recreate (need help from SEN.SE to do this)
- ability to handle multiple subscription message in one message ( currently can only handle one) happens ~ once a day. we currently only handle the first message in the package.

.. together with IFINDstuff & FINGSCAN, my "at-home" status works perfectly now -- reaction time ~ 2-10 seconds .. if the internet is up


Karl

Posted on
Fri Sep 04, 2015 9:15 am
kw123 offline
User avatar
Posts: 4970
Joined: May 12, 2013
Location: dallas, tx

Re: Mother Download

https://www.dropbox.com/s/fmxcq7aa37mmi4y/mother-v-1-2-1.zip?dl=0 -v-1-2-1

improvement:
Subscriptions to messages from SEN.SE has been improved.
i.e. when connection to the internet is lost and subscriptions get suspended by SEN.SE the plugin automatically renews them.


Karl

Posted on
Fri Oct 16, 2015 8:09 pm
kw123 offline
User avatar
Posts: 4970
Joined: May 12, 2013
Location: dallas, tx

Re: Mother Download

https://www.dropbox.com/s/581vrxpibsgouy1/mother-v-1-3-1.zip?dl=1

version 1.3.1

added
- some interface improvements
- lot of exception handling when e.g. internet connection is lost etc
- different restart options
- easy switch between push and pull mode

This is now my core AT-HOME detection system.
Seems to be very reliable, reaction times of 1-12 seconds when coming home. ( the cookie tries ~ every 12 seconds to contact a MOTHER)
Count starts ~ 25-35 meters (~75-105 feet) away from the front/back door - i.e. when a cookie comes into the range of one of the "MOTHERs"


Karl

Who is online

Users browsing this forum: No registered users and 1 guest

cron