
LarryCRetired
Members-
Posts
164 -
Joined
-
Last visited
Everything posted by LarryCRetired
-
apostolakisl You are thinking out of the box whereas I was still in the box. Yes this will work for me. I have an email that i get twice a day in which I was thinking of including the time the variable was updated. Instead, i will use your method and get the information every time a state variable is updated. Very much appreciated!
-
Wondering if there is a way to email the last time a variable was updated in the ISY. I looked through the drop down menu for adding information to an email but either I missed it or there is nothing available to email that information. I was thinking it would be useful to know when a variable was updated in the ISY using a rest command from a RPI. I send data from my tags to variables and then email those values. Would be nice to know the last time the variables were updated. Thanks to anyone who might know the answer.
-
Pull Variable Value from ISY to Python Program on Pi
LarryCRetired replied to LarryCRetired's topic in ISY994
larryllix I found a couple of courses on Udemy.com to teach me Python. If you are unaware of this site, it has some great courses for prices as low as $10 or$11 dollars (US), if you watch for the sales. (I will never be an expert, but at least I am getting some understanding of the formats and structure). I have subscribed to a number of courses for the Arduino and Pi, since I was starting with no knowledge of either one. I found this a great place for learning especially during the winter months in Nebraska. -
I bought a couple a tags a couple of weeks ago and I use them as follows: I have one in the Attic to measure temperature and dew point. The second one I move around to check temperatures in areas that could be susceptible to freezing water pipes. For the short time I have had them, I am happy except for a couple of things. The battery percentage does not seem to be very accurate. One of the tags will show a higher voltage level for the battery but a lower percentage when compared with the other tag. For example: Attic Sensor - Voltage is 2.87 volts, 90% in a 38.5 degree F environment. Assuming a nominal voltage of 3.0 volts for the 2032 battery, the percentage should be ~96%. Second Sensor - Voltage is 2.939 volts, 82% in a 65 degree F environment. Assuming the same nominal voltage, the percentage should be ~98%. When I had them sitting side by side in my office, I found the humidity was substantially different between the two. The difference was beyond the spec tolerance. I have a two DHT22 sensors attached to two Arduinos and the humidity reading was close for one of tags but not the other. I am going to contact them to see if I happen to have a faulty tag, but I plan on buying a couple more. I would like to incorporate the moisture sensor into my irrigation programs. I am using Polyglot on the pi to bring the data into the ISY.
-
Pull Variable Value from ISY to Python Program on Pi
LarryCRetired replied to LarryCRetired's topic in ISY994
Simplextech. Thanks for the info. Once I complete my current projects I will be looking for something else to add. This will be a good starting point. Thanks again -
Pull Variable Value from ISY to Python Program on Pi
LarryCRetired replied to LarryCRetired's topic in ISY994
simplextech. Thank you so much for taking the time to lay out the code for me. I am not a current day programmer and my programming experience is FORTRAN, Cobol (I am aging myself) and recently VBA for Excel and writing sketches for the Arduino. Never in a hundred years would I have ever been able to duplicate the code you prepared. Especially grateful since you were also working on the Ambient Weather Polyglot at about the same time. With just a minor tweak I was able to get the code working for me. Also, thanks Bumbershoot for reminding me about the precision logic. Something I previously read about but had forgotten. Also thanks to larryllix for the reference website. With every challenge I am able to build a little more foundation and these documents help. Hopefully not offending anyone but hope you all have a Merry Christmas and a Happy New Year. -
Pull Variable Value from ISY to Python Program on Pi
LarryCRetired replied to LarryCRetired's topic in ISY994
I am sorry that I have to come back to the forum for some additional help. Thanks to simplextech, I am now able to see the stream that my request command is giving me and I see the state value from the ISY. I have tried json commands but everything I see is related to printing steams and not assigning a value to a variable. Unfortunately, after an afternoon of searching on the internet, I am unable to find a way to select the value of the variable the ISY is sending and assign that value to variable in my python3 program. I typically like to see if I can find things out on my own, but after hours of research and trial and error, I am lost and would appreciate any help. ☹️ larryllix - My logic for turning on an appliance is based on results from the python program and sending a rest command to the ISY to start a program with a state variable. I have successfully done that. Whereas I see you are using python to do that for you. Might get there at some point, but for now I have kept all that logic in the ISY. But I think from your post you are getting a value from the ISY to trigger something happening in your python program. That is basically where I am stuck. For simplicity I am testing with this simple program. import requests from requests.auth import HTTPBasicAuth Switch = 9 r=requests.get('http://192.xxx.x.xx/rest/vars/get/2/19', auth=('user', 'PWxxxx')) print(r.content) Switch = # This value is what the ISY sends back for the value of the State variable Here are the results of my test pi@raspberrypi:~ $ python3 time.py b'<?xml version="1.0" encoding="UTF-8"?><var type="2" id="19"><init>0</init><prec>0</prec><val>41</val><ts>20191220 13:00:43</ts></var>' 41 is the value I am trying to extract and assign to the variable in the python3 program -
Wonder if someone can point me in the right direction to pull a variable from the ISY into a python program on the pi. I am using this request command to retrieve the value of the variable from the ISY using this simple program. When I print (r) i get a code of 200 which I assume means the request was successful. What I want to do is populate a variable in python with the value of the state variable ID # 19 is this possible to do. I messed around a little with Json but was not successful - most likely because I am not sure I know what I am doing. Any help or direction would be appreciated. Pretty new at this stuff. I am running Version 5 release 16 and i have the Polyglot Node Server running on this Pi if that helps. Thanks in advance for any help. import requests from requests.auth import HTTPBasicAuth r=requests.get('http://192.xxx.x.xx/rest/vars/get/2/19', auth=('user', 'PWXXX')) print (r)
-
Thank you so much simplextech for pointing me in the right direction. I was able to push a state variable to the ISY using a "request" command in a python program using the authorization site you sent me to. I had a little trouble at first thinking I had to use a "put or post" command but when I used "get" it worked fine. You don't know how much I appreciate your help. This opens up many new opportunities for use of my local environment sensors with the ISY. Also, I want to again thank Bumbershoot for the format of the rest command. This forum is the greatest.
-
I am sorry that I have to go to the forum for what should be something easy to figure out, however, the past two afternoons of research has not gotten me closer to a solution. I am getting a syntax error in Python3 running on my Pi for this statement. I have tried a host of things but I continue to get this error. For instance, I changed the curl statement to curl -u, --user admin:Test http://192.xxx.x.xx/rest/vars/set/2/19/16, but no change in the location of the error. pi@raspberrypi:~ $ python3 Test.py File "Test.py", line 22 curl -u, admin:Test http://192.xxx.x.xx/rest/vars/set/2/19/16 ^ SyntaxError: invalid syntax It is pointing to the ":" between the username and Password. (Note: If I copy the web address into my browser, I do change the state variable value in my ISY so that part works by asking me for my credentials first) Here is my simple program. The program works fine without the curl statement. Any help would be greatly appreciated. import RPi.GPIO as GPIO import Adafruit_BMP.BMP085 as BMP085 import I2C_LCD_driver import time import pycurl pressure_sensor = BMP085.BMP085() sensor = BMP085.BMP085() mylcd = I2C_LCD_driver.lcd() mylcd.lcd_clear() GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) GPIO.cleanup() pressure = pressure_sensor.read_sealevel_pressure() pressure = pressure / 100.0 # 1 mbar = 100 Pa. if pressure > 700: mylcd.lcd_display_string("Pressure: %.1f%s hPa" % (pressure,chr(32)), 3) curl -u, admin:Test http://192.xxx.x.xx/rest/vars/set/2/19/16
-
Bumbershoot, GlowingHair and simplextech thanks so much for the direction and the options to pursue. I am going to spend the day working on this and try the simple solution first. I am intrigued by the other options and will take a look at them as well. Now to install curl on my pi and expand my program. Also, we had snow this morning. TV stations told us it was coming but my wife also told me on Saturday night what we could expect based on her headache.
-
Hoping someone can give me some direction as to where to look or even if it is possible to accomplish what I describe below. I recently installed Version 5 and I have been reading/watching the excellent videos on how to install Polygot onto my pi and create a node server in the ISY. However, being a newbie, I am not certain if the node server route is the way I should approach pushing a variable from the pi to the ISY. I want to start a program in the ISY if the variable meets the appropriate criteria. This is what I am trying to accomplish. I have written a Python 3 program to obtain barometric pressure data from a BMP180 pressure sensor. My wife suffers from migraines and barometric pressure changes impact the severity of her headaches. The severity of the headache is a function of the starting point of the pressure when the pressure begins to drop and how fast the pressure is dropping. I was able to use an Arduino to light some LED's based on some complex programming but the Arduino does not give me the flexibility of letting her know what is happening if she is not at home. Medication does help her reduce the severity if she is aware of the weather environment prior to the beginning of the headache. What I would like to do is push a variable from the pi to the ISY and then let it send a text message to make her aware that the barometric pressure is changing and how aggressive she should be in taking her medication. Any help and direction as to where to educate myself would be appreciated and even more so by my wife. PS: I have thought about using the climate module but unfortunately I have not had good luck getting reliable barometric data for my location.
-
Hope someone can help with my confusion. I am looking to replace the battery in the Motion Detector II with grid power. Smarthome has discontinued their USB charger/power adapter but the specs indicate it was 120volts AC converted to 5volts DC 500ma. My questions are these: 1. Can I use a charger that is rated 5 volts DC but with a higher output amperage. For example, 1 or 2 amps instead of the 1/2 amp specified. 2. Since this charger/power adapter is not charging a battery but providing continuous power, is it still ok to purchase what is described as a charger rather than a power adapter 3. Any suggestions as to what to purchase would be very much appreciated. Thanks in advance for any help that can be provided to clear up my confusion.
-
Motion Detector 2842 low battery notification
LarryCRetired replied to LarryCRetired's topic in ISY994
Techman and larryllix Thank you. Looks like the query worked. Very much appreciate your taking the time to help. -
Motion Detector 2842 low battery notification
LarryCRetired replied to LarryCRetired's topic in ISY994
Techman. Thank you. I will try that. -
Motion Detector 2842 low battery notification
LarryCRetired replied to LarryCRetired's topic in ISY994
I have a new 2842 - 222 that I recently installed. It immediately started sending low battery notifications. I did a factory reset a number of times before and after changing batteries but still the notification. I should note that it was activated enough times for it to clear the low battery status I could live with this except I recently had an all on event and I read on the wiki that low battery notifications could cause that to happen. I tested the voltage of the new batteries (without load) and they were 9.5 volts so I don't think it is a low battery issue. Any suggestions or should I just toss it since new ones are no longer available. The code on the back is 1715 Rev 2.6. All the switches are down except number 5 Thanks for any thoughts or suggestions. -
I have a defective router which I am replacing and sending back to my ISP. Before removing it, I want to remove all my information regarding my devices. How should I handle the ISY994. Should I disconnect the ISY from the router before removing entries in the router or is there some other procedure to follow. I see in the wiki how to add the new router but I am unsure of the steps to remove the old router. Any help would be appreciated. Thank you
-
Discontinued Smarthome 75790 Cameras Fail to Port forward
LarryCRetired replied to LarryCRetired's topic in ISY994
Just wanted to close the loop on this question. I had to replace my router yesterday. After that was completed the cameras added successfully. So nothing wrong with the cameras.- 1 reply
-
- 1
-
-
Thanks guys. I was able find a reset button on the back and reset everything back to the factory settings. Would not have thought of doing that without your mentioning it. I was going to go line by line and remove things. I was fortunate. My ISY connected without having to reset it and it is working fine this evening. Thanks again
-
I have a defective router which I am replacing and sending back to my ISP. Before removing it, I want to remove all my information regarding my devices. How should I handle the ISY994. Should I disconnect the ISY from the router before removing entries in the router or is there some other procedure to follow. I see in the wiki how to add the new router but I am unsure of the steps to remove the old router. Any help would be appreciated. Thank you
-
Wondering if anybody on the Forum happened to buy any of the Smarthome 75790 cameras when they were discontinued last fall. I have 9 of these cameras that I have purchased over the past few years and they all would port forward for me using either my IPAD or my IPhone 7. I bought 5 of them this fall giving two to my brother. Neither of us are able to port forward live video from these cameras. When trying to connect to these cameras outside of the LAN and using Safari, the system indicates that it could not connect to the server. When trying one of my older cameras, they connect just fine. The cameras work fine using Wifi on my local network. I have reverted back to old firmware and UI but that did not help. Wondering if anyone else bought any of these cameras. I think I bought the last two for $18 a piece so not out a lot of money but still would like to get them to work. Any thoughts, help or suggestions would be appreciated. Thanks
-
Portal with IP address Change and IOS 11.2.6
LarryCRetired replied to LarryCRetired's topic in ISY994
Teken. Thank you so much. That put my mind at ease. -
I am hoping someone on the forum can help me and answer two questions. I purchased the Portal yesterday and thanks to Michel I got it set up quickly. Apparently I was not a good typist! My two questions are: Question 1: When we are away from home and my IP address changes, does the Portal automatically update itself so I can still connect to my ISY remotely. Question 2: Has anyone used the Portal with IOS 11.2.6 without any issues. Thanks in advance to anyone taking the time to help an old retiree.