
LarryCRetired
Members-
Posts
164 -
Joined
-
Last visited
Everything posted by LarryCRetired
-
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.