Seneye Fish Tank Monitor

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

Post Reply
RobDob
Posts: 28
Joined: Wednesday 29 January 2014 9:59
Target OS: Windows
Domoticz version: v2.2563
Location: Wiltshire, UK
Contact:

Seneye Fish Tank Monitor

Post by RobDob »

Hi,

I have some Seneye Fish Tank Monitors in my house and wanted to get the information they collected into Domoticz.

Seneye provides access to the information it captures via its API website - api.seneye.com

I created some dummy sensors and then a script that read the information from the site and uploaded to the dummy sensors, you need to change the parts like this <YOUR_STUFF> to match your own credentials and devices:

Code: Select all

#!/usr/bin/python

#import library to do http requests:
import urllib2

#define variables
seneyeurl = 'https://api.seneye.com/v1/devices/17128/exps?user=<YOUR_SENEYE_EMAIL>&pwd=<YOUR_SENEYE_PASSWORD>'
domourl1 = 'http://<YOUR_DOMO_IP>:<YOUR_DOMO_PORT>/json.htm?type=command&param=udevice&idx='
domourl2 = '&nvalue=0&svalue='
tempid = '<YOUR_DUMMY_SENSOR_ID>'
phid = '<YOUR_DUMMY_SENSOR_ID>'
nh3id = '<YOUR_DUMMY_SENSOR_ID>'
lightid = '<YOUR_DUMMY_SENSOR_ID>'

#download the data:
file = urllib2.urlopen(seneyeurl)

#convert to string:
data = file.read()
#close file because we dont need it anymore:
file.close()

#split the raw data into an array split on comma
text = data.split(',')

#select the values needed and set as variables
temperature = text[4]
ph = text[10]
nh3 = text[16]
light = text[20]

#temperature - strip off extra characters not needed
temperature = temperature.replace('"','')
temperature = temperature.replace('curr:','')
print temperature

#create URL and send to Domoticz
tempurl = domourl1 + tempid + domourl2 + temperature
urllib2.urlopen(tempurl)

#ph - strip off extra characters not needed
ph = ph.replace('"','')
ph = ph.replace('curr:','')
print ph

#create URL and send to Domoticz
phurl = domourl1 + phid + domourl2 + ph
urllib2.urlopen(phurl)

#nh3 - strip off extra characters not needed
nh3 = nh3.replace('"','')
nh3 = nh3.replace('curr:','')
print nh3

#create URL and send to Domoticz
nh3url = domourl1 + nh3id + domourl2 + nh3
urllib2.urlopen(nh3url)

#light - strip off extra characters not needed
light = light.replace('"','')
light = light.replace('curr:','')
print light

#create URL and send to Domoticz
lighturl = domourl1 + lightid + domourl2 + light
urllib2.urlopen(lighturl)
I run the script as a cron job on my Raspberry Pi checking the values every 15 minutes.

To make this better ideally I would like to be able to add some other types of sensor, e.g. ph & nh3. Right now I am just using dummy temperature sensors. If anyone knows how to do this I would appreciate it.

Anyway I hope someone else finds it useful.

Cheers.
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Seneye Fish Tank Monitor

Post by Derik »

Plesae some sreendump What you have
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
RobDob
Posts: 28
Joined: Wednesday 29 January 2014 9:59
Target OS: Windows
Domoticz version: v2.2563
Location: Wiltshire, UK
Contact:

Re: Seneye Fish Tank Monitor

Post by RobDob »

I'm not sure what you are asking? Screenshots of which parts?
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Seneye Fish Tank Monitor

Post by Derik »

All
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
RobDob
Posts: 28
Joined: Wednesday 29 January 2014 9:59
Target OS: Windows
Domoticz version: v2.2563
Location: Wiltshire, UK
Contact:

Re: Seneye Fish Tank Monitor

Post by RobDob »

Here is a picture of my virtual sensors that are updated by the script
Attachments
Capture.JPG
Capture.JPG (64.71 KiB) Viewed 3492 times
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Seneye Fish Tank Monitor

Post by Derik »

looking great..

Only what hardware do you use??
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
RobDob
Posts: 28
Joined: Wednesday 29 January 2014 9:59
Target OS: Windows
Domoticz version: v2.2563
Location: Wiltshire, UK
Contact:

Re: Seneye Fish Tank Monitor

Post by RobDob »

I use these:

http://www.seneye.com/devices/seneye-home

I have made some progress today making appropriate sensor types, right now I add them all as temperature and its not great, I have been modifying the code and have this so far, needs a little tidying and also adding to the UI:
Attachments
sensors.JPG
sensors.JPG (39.36 KiB) Viewed 3468 times
Derik
Posts: 1601
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Seneye Fish Tank Monitor

Post by Derik »

Great work ..!!!!

Seemed like a good idea for my pool.
Only it would be nice if there'd be chlorine.
And preferably via WiFi
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups
RobDob
Posts: 28
Joined: Wednesday 29 January 2014 9:59
Target OS: Windows
Domoticz version: v2.2563
Location: Wiltshire, UK
Contact:

Re: Seneye Fish Tank Monitor

Post by RobDob »

Looks like it may be a solution for you in the future:

http://www.seneye.com/coming-soon

The web server thing is designed to send the information to their servers without needing it to be plugged into a computer - this is nearing completion I believe and they have closed the beta program.

The new parameters (including Chlorine) have been promised for some time and they wont tell me when I can expect them.....

All in all they are a pretty cheap solution and suit me well - I have nothing to do with the company.
nikels
Posts: 10
Joined: Wednesday 01 July 2015 23:46
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Seneye Fish Tank Monitor

Post by nikels »

Hello i have a question! What am i doing wrong.
This is my first question on this forum.

I have a Seneye pond dive and trying out the code provided by RobDob

When i type the url from the api i get this result:
0-18.4-18.80-17.3507.330-10.00100.0010-111.7011.61100

I have modify the code and saved it as a *.sh file and execute it as a task by Task Manager from my Synology Nas that olso runs Domoticz..

But nothing happens no device information is updated.

Code: Select all

#!/usr/bin/python

#import library to do http requests:
import urllib2

#define variables
seneyeurl = 'https://api.seneye.com/v1/devices/5697/exps?user=XXXXX&pwd=XXXX'
domourl1 = 'http://192.16x.xx.xx:8xxx/json.htm?type=command&param=udevice&idx='
domourl2 = '&nvalue=0&svalue='
tempid = '140CC'
phid = '140D1'
nh3id = '140D0'
lightid = '140CF'

#download the data:
file = urllib2.urlopen(seneyeurl)

#convert to string:
data = file.read()
#close file because we dont need it anymore:
file.close()

#split the raw data into an array split on comma
text = data.split(',')

#select the values needed and set as variables
temperature = text[10]
ph = text[11]
nh3 = text[12]
light = text[13]

#temperature - strip off extra characters not needed
temperature = temperature.replace('"','')
temperature = temperature.replace('curr:','')
print temperature

#create URL and send to Domoticz
tempurl = domourl1 + tempid + domourl2 + temperature
urllib2.urlopen(tempurl)

#ph - strip off extra characters not needed
ph = ph.replace('"','')
ph = ph.replace('curr:','')
print ph

#create URL and send to Domoticz
phurl = domourl1 + phid + domourl2 + ph
urllib2.urlopen(phurl)

#nh3 - strip off extra characters not needed
nh3 = nh3.replace('"','')
nh3 = nh3.replace('curr:','')
print nh3

#create URL and send to Domoticz
nh3url = domourl1 + nh3id + domourl2 + nh3
urllib2.urlopen(nh3url)

#light - strip off extra characters not needed
light = light.replace('"','')
light = light.replace('curr:','')
print light

#create URL and send to Domoticz
lighturl = domourl1 + lightid + domourl2 + light
urllib2.urlopen(lighturl)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest