vinteo / hass-opensprinkler Goto Github PK
View Code? Open in Web Editor NEWOpenSprinkler Integration for Home Assistant
License: MIT License
OpenSprinkler Integration for Home Assistant
License: MIT License
https://opensprinkler.com/faq/
It appears the app does network discovery of the controllers...should we research that and integrate it?
Hey Vinteo,
I have been spinning up your custom component today thanks. All my garden "switches" have come through well, and they reflect accurately when the sprinklers are on. However, when I try to trigger them (turn them to state: on) within Home Assistant I get the following error:
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/app/homeassistant/helpers/service.py", line 224, in _handle_service_platform_call
await getattr(entity, func)(**data)
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/switch/hass_opensprinkler.py", line 47, in turn_on
self._station.turn_on(int(float(mins.state)))
AttributeError: 'NoneType' object has no attribute 'state'
Is this something I've done wrong with the setup?
Should accept a run duration
Allow for multiple OpenSprinkler devices
Hi,
I have been running this custom component for a while now and it working, however, the HA log is filled with the following error:
May 17 21:14:07 tinkerboard hass[3613]: Traceback (most recent call last):
May 17 21:14:07 tinkerboard hass[3613]: File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 220, in async_update_ha_state
May 17 21:14:07 tinkerboard hass[3613]: await self.async_device_update()
May 17 21:14:07 tinkerboard hass[3613]: File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 377, in async_device_update
May 17 21:14:07 tinkerboard hass[3613]: await self.hass.async_add_executor_job(self.update)
May 17 21:14:07 tinkerboard hass[3613]: File "/usr/lib/python3.5/asyncio/futures.py", line 380, in iter
May 17 21:14:07 tinkerboard hass[3613]: yield self # This tells Task to wait for completion.
May 17 21:14:07 tinkerboard hass[3613]: File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
May 17 21:14:07 tinkerboard hass[3613]: future.result()
May 17 21:14:07 tinkerboard hass[3613]: File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
May 17 21:14:07 tinkerboard hass[3613]: raise self._exception
May 17 21:14:07 tinkerboard hass[3613]: File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
May 17 21:14:07 tinkerboard hass[3613]: result = self.fn(*self.args, **self.kwargs)
May 17 21:14:07 tinkerboard hass[3613]: File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/util/init.py", line 224, in wrapper
May 17 21:14:07 tinkerboard hass[3613]: result = method(*args, **kwargs)
May 17 21:14:07 tinkerboard hass[3613]: File "/home/homeassistant/.homeassistant/custom_components/hass_opensprinkler/binary_sensor.py", line 44, in update
May 17 21:14:07 tinkerboard hass[3613]: self._is_on = self._station.status()
May 17 21:14:07 tinkerboard hass[3613]: File "/home/homeassistant/.homeassistant/custom_components/hass_opensprinkler/init.py", line 181, in status
May 17 21:14:07 tinkerboard hass[3613]: response = requests.get(url, timeout=10)
May 17 21:14:07 tinkerboard hass[3613]: File "/srv/homeassistant/lib/python3.5/site-packages/requests/api.py", line 75, in get
May 17 21:14:07 tinkerboard hass[3613]: return request('get', url, params=params, **kwargs)
May 17 21:14:07 tinkerboard hass[3613]: File "/srv/homeassistant/lib/python3.5/site-packages/requests/api.py", line 60, in request
May 17 21:14:07 tinkerboard hass[3613]: return session.request(method=method, url=url, **kwargs)
May 17 21:14:07 tinkerboard hass[3613]: File "/srv/homeassistant/lib/python3.5/site-packages/requests/sessions.py", line 533, in request
May 17 21:14:07 tinkerboard hass[3613]: resp = self.send(prep, **send_kwargs)
May 17 21:14:07 tinkerboard hass[3613]: File "/srv/homeassistant/lib/python3.5/site-packages/requests/sessions.py", line 646, in send
May 17 21:14:07 tinkerboard hass[3613]: r = adapter.send(request, **kwargs)
May 17 21:14:07 tinkerboard hass[3613]: File "/srv/homeassistant/lib/python3.5/site-packages/requests/adapters.py", line 529, in send
May 17 21:14:07 tinkerboard hass[3613]: raise ReadTimeout(e, request=request)
May 17 21:14:07 tinkerboard hass[3613]: requests.exceptions.ReadTimeout: HTTPConnectionPool(host='192.168.xx.xx', port=xxxx): Read timed out. (read timeout=10)
The frontend of HA is showing the results as it should. I cannot complain but I was wondering if I have something configure wrongly. It seems silly but I cannot just ignore the error.
Hello Dear,
When you have a spare time are you able please to have a look at the problem after the latest hassio update?
Not loading anymore.
Log Details (WARNING)
Thu Feb 21 2019 19:34:31 GMT+1100 (Australian Eastern Daylight Time)
Integrations need to be in their own folder. Change binary_sensor/hass_opensprinkler.py to hass_opensprinkler/binary_sensor.py. This will stop working soon.
Cheers
Humberto
First off - great work!
One suggestion for enhancement is to add the remaining time to a running station. This way you can approximate even more all the info you get on the native OpenSprinkler UI.
As a quick poc, I looked at the code and you already have that info on the return of the jc call.
if(self._p_status[0]==99):
self._state = "Running manual (" + str(self._p_status[1]) + "s remaining)"
This works :)
Adding it to the status text might not be ideal, but maybe a property?
Also, without some custom UI, it would only ever update on the scan interval, and not every second like OS does, but that could be a further enhancement...
Hi,
Great work.
As expected, if OpenSprinker is down when Hassio starts up the entities are not set up and are not shown as available. However, Open Sprinkler always takes longer to restart than Hassio, so if there is a power failure I always need to reboot Hassio a while after to get the entities working.
Is there any way to delay the set-up of the entities so that they can be created after Open Sprinkler is running? I'm guessing the answer is no, but thought I'd ask!
Thanks,
Matthew
I have a moisture detecting device in my lawn. I'd like to enable (not immediately run) a OpenSprinkler program when the moisture is too low, and disable a program when no watering is needed.
There is an activate program switch, which makes the program run immediately. However, This switch would utilize the "Change Program Data" API call to enable / disable the program on open sprinkler. The sprinkler program would run or not run on the next scheduled run.
If I set the program to run every morning, then HA would control, depending on the moisture, if the program really should run or not.
Thanks for making this HA component available, it's really useful.
I just noticed there's no licence present in the repository so would you be able please to add one? Without a licence, contributing to your code isn't allowed nor is copying/reusing etc (read more at https://choosealicense.com/no-permission/).
If you don't have a licence in mind, I'd suggest the simple and permissive MIT licence (https://choosealicense.com/licenses/mit/), otherwise GitHub maintains https://choosealicense.com/ with list of suggestions depending on requirements. GitHub also has a help article for adding licences via templates or otherwise general details on licensing a repository.
Thanks!
Hi,
I've copied the files into custom_components and get the following issue
2019-11-17 21:45:24 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hass_opensprinkler which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-11-17 21:45:24 ERROR (MainThread) [homeassistant.setup] Error during setup of component hass_opensprinkler
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 176, in _async_setup_component
component.setup, hass, processed_config # type: ignore
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/hass_opensprinkler/init.py", line 55, in setup
for station in opensprinkler.stations():
File "/config/custom_components/hass_opensprinkler/init.py", line 118, in stations
for i, name in enumerate(response.json()['snames']):
KeyError: 'snames'
I'm running latest HassIO and opensprinklerpi, so could be something to do with that, but any help would be appreciated?
I'm using Ospi.
After installation with HACS on HASSIO 0.108.6 the switches do not work raising this error:
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/hass_opensprinkler/switch.py", line 89, in turn_on
self._station.turn_on(int(float(mins.state)))
AttributeError: 'NoneType' object has no attribute 'state'
I added this in configuration file:
input_number:
S01UlivoEViale_timer:
min: 1
max: 60
step: 1
mode: slider
But the log shows this error:
Invalid config for [input_number]: invalid slug S01UlivoEViale_timer (try s01ulivoeviale_timer) for dictionary value @ data['input_number']. Got OrderedDict([('S01UlivoEViale_timer', OrderedDict([('min', 1), ('max', 60), ('step', 1), ('mode', 'slider')]))]). (See /config/configuration.yaml, line 94).
And does not solve the issue.
I also have this
hass_opensprinkler:
host: 192.168.1.XXXX
password: dXXXXXXXXXXXXXX
stations:
But it shows all the stations up to 8.
Icons: https://cdn.materialdesignicons.com/4.5.95/
Controller Switch: ?? (or keep default lightning)
Water Level Sensor: mdi:water -> mdi:water-percent
Last Run Sensor: mdi:history (keep)
Rain Delay Stop Time: mdi:weather-rainy (keep)
Program Binary Sensor: mdi:calendar-clock
Program Switch: mdi:calendar-clock (or keep default lightning)
Station Sensor: -> mdi:water-pump, mdi:water, mdi:sprinkler, mdi:sprinkler-variant
Station Binary Sensor: -> mdi:water-pump, mdi:water, mdi:sprinkler, mdi:sprinkler-variant
Station Switch: -> mdi:water-pump, mdi:water, mdi:sprinkler, mdi:sprinkler-variant (or keep default lightning)
0.110.x has started throwing deprecation warnings:
SwitchDevice
-> SwitchEntity
BinarySensorDevice
-> BinarySensorEntity
Hi! @vinteo!
Thank you for your work on this module! I wanted to ask you which versions of HASS does this module support (e.g. does it work with 0.80?) and if you've had any experience with the new Lovelace UI yet.
Hi,
I have installed opensprinkler add-on. It seems to work well, thanks.
I have a question, would it be possible to inplement binary_sensor.opensprinkler_operation as a switch?
The reason for this request is that the weather service included in opensprinkler is not that accurate.
I like to use home assistant to look in to my local weather service in HA and if it rains, I like to just disable the operation until it stops raining with automations in HA.
Best Regards
Tobe
It appears that the rain sensor key was renamed from 'rs' to 'sn1' or 'sn2' in 2.1.9 due to supporting two sensors. For now I've simply changed the key name, but will look at something more elegant time permitting if no one else adds a pull request. eg: Check for sn1/sn2 to be a rain sensor then fall back to 'rs' if it's available. Or maybe it should check the value of key 'fwv' via the '/jo' options call.
I'm sure this affects all versions of HA, though I'm running 0.99.3 at this time.
In __init__.py
def rain_sensor(self):
return self._get_controller_variable(CONF_RAIN_SENSOR, 'sn1')
Add switches for each program to enable/disable
In hass_opensprinkler/init.py, there is:
VERSION = '0.1.0'
while in custom_components.json there is:
"version": "0.1.1",
"local_location": "/custom_components/hass_opensprinkler/__init__.py",
"remote_location": "https://raw.githubusercontent.com/vinteo/hass-opensprinkler/master/hass_opensprinkler/__init__.py",
I think this makes the custom_updater component think the version is out of date.
Trying this out - I'm getting all the components generated (sensor, binary_sensor, switches, etc) - but see no time sliders?
When I try run a switch, it immediately turns off, logging the following, which makes me think it's looking for an "on time" slider.
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/app/homeassistant/helpers/service.py", line 224, in _handle_service_platform_call
await getattr(entity, func)(**data)
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/switch/hass_opensprinkler.py", line 47, in turn_on
self._station.turn_on(int(float(mins.state)))
AttributeError: 'NoneType' object has no attribute 'state'
I've tried on multiple versions of HA 0.80*
Could it be possible to add a scredul for the days of the week , so nwe could for example program the operation every 2 day ?
Hi Vinteo,
When you have a chance are you able please to check below error? All switches stoped... I still have control of open sprinkler but not for switch(Fail to call service switch/turn_on ....) Cheers!!
Logger: homeassistant.components.websocket_api.http.connection.139682826209808
Source: custom_components/hass_opensprinkler/switch.py:89
Integration: websocket_api (documentation, issues)
First occurred: 1:58:13 PM (3 occurrences)
Last logged: 1:59:06 PM
'NoneType' object has no attribute 'state'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 134, in handle_call_service
connection.context(msg),
File "/usr/src/homeassistant/homeassistant/core.py", line 1232, in async_call
await asyncio.shield(self._execute_service(handler, service_call))
File "/usr/src/homeassistant/homeassistant/core.py", line 1255, in _execute_service
await handler.func(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
self._platforms.values(), func, call, required_features
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 412, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 600, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 443, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 625, in async_turn_on
await self.hass.async_add_job(ft.partial(self.turn_on, **kwargs))
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/hass_opensprinkler/switch.py", line 89, in turn_on
self._station.turn_on(int(float(mins.state)))
AttributeError: 'NoneType' object has no attribute 'state'
Hi,
Been looking for a way to integrate my open sprinkler in HA! So big thanks for doing it!!
But I have a small suggestion.
Add some fault handeling with checking the return codes from OS.
I had a problem with wrong password but it took some digging to figure it out, cause the error was:
Wed Mar 27 2019 13:06:40 GMT+0100 (CET)
Error during setup of component hass_opensprinkler
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/homeassistant/setup.py", line 154, in _async_setup_component
component.setup, hass, processed_config) # type: ignore
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/hass_opensprinkler/__init__.py", line 51, in setup
for station in opensprinkler.stations():
File "/config/custom_components/hass_opensprinkler/__init__.py", line 96, in stations
for i, name in enumerate(response.json()['snames']):
KeyError: 'snames'```
I had to do a curl on the api to see that I got a {"result":2}.
Had to check the api documentation what is meant, and it said Unauthorized
The problem was with my password hash that I forgot to remove newline when I created it.
And for the sliders, that I saw there was some issues on, maybe you can check out this:
https://github.com/thomasloven/lovelace-slider-entity-row
Keep up the good work!!
Vinteo,
Thanks for writing this component, it is fantastic, but I do have one problem I'm wondering if you can help with...
My open sprinkley Raspberry Pi has been dropping off my network every few days. Mysterious, and I haven't found out why, but it does reconnect. Unfortunately once hass-opensprinkler's sensor fails to find it the first time it never seems to be able to find it when it has reconnected.
When Hass last booted Open Sprinkler was also online and the sensors worked, and the states changed as sprinklers came on and off, but today Open Sprinkler disappears from teh WiFi for an hour and has now come back on. I can access the station information with http://192.168.1.190:8080/js?pw=[my-MD5-Password] and get the json back, but Hass.io doesn't seem to be able to. My error is extensive but is basically just "Host is Unreachable", and is copied below for information.
Is this normal or should hass-opensprinkler be able to reconnect when open sprinkler re-joins the WiFi?
Thanks,
Matthew
Update for switch.vertical_garden fails
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 159, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw)
File "/usr/local/lib/python3.6/site-packages/urllib3/util/connection.py", line 80, in create_connection
raise err
File "/usr/local/lib/python3.6/site-packages/urllib3/util/connection.py", line 70, in create_connection
sock.connect(sa)
OSError: [Errno 113] Host is unreachable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 354, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/lib/python3.6/http/client.py", line 1239, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.6/http/client.py", line 1285, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.6/http/client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.6/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/local/lib/python3.6/http/client.py", line 964, in send
self.connect()
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 181, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 168, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x6884ecf0>: Failed to establish a new connection: [Errno 113] Host is unreachable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/local/lib/python3.6/site-packages/urllib3/util/retry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.1.190', port=8080): Max retries exceeded with url: /js?pw=[my-MD5-Password] (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x6884ecf0>: Failed to establish a new connection: [Errno 113] Host is unreachable',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/hass_opensprinkler.py", line 155, in status
response = requests.get(url, timeout=10)
File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.6/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.1.190', port=8080): Max retries exceeded with url: /js?pw=[my-MD5-Password] (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x6884ecf0>: Failed to establish a new connection: [Errno 113] Host is unreachable',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 221, in async_update_ha_state
await self.async_device_update()
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 349, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/homeassistant/util/__init__.py", line 315, in wrapper
result = method(*args, **kwargs)
File "/config/custom_components/switch/hass_opensprinkler.py", line 42, in update
self._is_on = self._station.status()
File "/config/custom_components/hass_opensprinkler.py", line 157, in status
_LOGGER.error("No route to device '%s'", self._resource)
AttributeError: 'OpensprinklerStation' object has no attribute '_resource'
Add station properties as sensor and binary sensor entity attributes
I recently updated via HACS and now all the sensors that are automatically created are duplicated.
Do you have any idea how I can delete the old entities?
I have looked in the .storage folder as well as via the UI but I cannot see how to delete them anywhere.
Thanks
Testing the current beta 0.110.0b0 (currently 0b3) and opensprinkler integration is not working.
Last working version was 109.6
I see you've got a PR for an official HA integration and it's gotten some attention! Really looking forward to it!
arch | x86_64 |
---|---|
chassis | vm |
dev | false |
docker | true |
hassio | true |
host_os | HassOS 4.6 |
installation_type | Home Assistant |
os_name | Linux |
os_version | 5.4.39 |
python_version | 3.7.7 |
supervisor | 222 |
timezone | America/Denver |
version | 0.110.0b3 |
virtualenv | false |
'NoneType' object has no attribute 'state'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service
connection.context(msg),
File "/usr/src/homeassistant/homeassistant/core.py", line 1253, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1288, in _execute_service
await handler.func(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
self._platforms.values(), func, call, required_features
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 453, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 597, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 484, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 622, in async_turn_on
await self.hass.async_add_executor_job(ft.partial(self.turn_on, **kwargs))
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/hass_opensprinkler/switch.py", line 89, in turn_on
self._station.turn_on(int(float(mins.state)))
AttributeError: 'NoneType' object has no attribute 'state'
Currently its hardcoded at 5 seconds. Could probably bump it up to 10 secs, but ideally it should be a config option
By default, Opensprinkler uses port 8080 and theirs no documentation that this integration uses port 80. At first, I did not know what was wrong id be great if this documentation was added.
Hi,
I think I have followed carefoully the installatioon notes, however I am still struggling.
I've tried first manually then via HACS but still the same result.
I keep getting the following error:
2019-09-29 20:49:00 ERROR (MainThread) [homeassistant.components.hassio] Component error: hass_opensprinkler - Integration hass_opensprinkler not found.
The content seems correctly in the folder:
max@ubuntu-docker:~/hassio/homeassistant/custom_components/hass_opensprinkler$ ls
__init__.py binary_sensor.py manifest.json scene.py sensor.py switch.py
and my config file includes:
hass_opensprinkler:
host: 192.168.x.x
password: xxxxxxx
ver 0.1.3
HA ver 0.99.3
anythin g obvious I am doing wrong????
thanks in advance!
2019-09-29 20:49:00 ERROR (MainThread) [homeassistant.components.hassio] Component error: hass_opensprinkler - Integration hass_opensprinkler not found.
Add sensors for station status
I am getting the following error. (I am not running HASS.io, I am running HomeAssistant on Rasbian lite.)
Unable to prepare setup for platform hass_opensprinkler.scene: Platform not found (No module named 'custom_components').
I had a pain getting this to work at all, as I had to put this into the components directory, as every time I tried to create a custom_components directory it wouldn't work.
I am also getting the following notifications:
The following components and platforms could not be set up:
hass_opensprinkler.binary_sensor
hass_opensprinkler.switch
hass_opensprinkler.sensor
hass_opensprinkler.scene
Please check your config.
I ended up having to put the hass_opensprinkler directory into the /srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/
as putting it into the
/srv/homeassistant/lib/python3.7/site-packages/homeassistant/custom_components/
never produced usable results.
What am I missing?
When i try to run this on the newest version, the component doesn't even load, i get an error stating
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 156, in _async_setup_component
component.setup, hass, processed_config) # type: ignore
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/hass_opensprinkler/init.py", line 55, in setup
for station in opensprinkler.stations():
File "/config/custom_components/hass_opensprinkler/init.py", line 118, in stations
for i, name in enumerate(response.json()['snames']):
KeyError: 'snames'
I'm not sure how to rectify the following error:
2018-09-14 09:32:58 WARNING (MainThread) [homeassistant.loader] You are using a custom component for opensprinkler which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2018-09-14 09:32:59 ERROR (MainThread) [homeassistant.setup] Error during setup of component opensprinkler
Traceback (most recent call last):
File "/opt/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 148, in _async_setup_component
component.setup, hass, processed_config) # type: ignore
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in iter
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/opt/homeassistant/config/custom_components/opensprinkler.py", line 47, in setup
for station in opensprinkler.stations():
File "/opt/homeassistant/config/custom_components/opensprinkler.py", line 85, in stations
for i, name in enumerate(response.json()['snames']):
KeyError: 'snames'
How does it affect HACS?
Add switch for controller to enable/disable operation
Hey Vincent,
First and foremost, love the product.
I'm wandering if we could make the timer more like a dimmable light. The time of the zone could still be automated from the entity itself and the UI would only show the timer if you click on the entity.
Just a thought.
Hi,
After updating to Hassio 0.81.2 all entity is not available and I got a notification that Hass-opensprinkler could not be setup..
Are you able please to have a look on you hv a time?
cheers, Beto
Hello,
Do you have any intention of releasing this to home-assistant so we don't need a custom component?
I run opensprinkler behind a reverse proxy. Any chance you can add an ssl option or similar to support encrypted connection?
Thanks!
I have swedish characters in my station names, programs etc.
May I suggest that you add the following to each request?
response.encoding = response.apparent_encoding
this solves the encoding issue for the response
Add program properties as binary sensor attributes
Dependent on: vinteo/py-opensprinkler#15
Update pyopensprinkler to 0.5.0 when released: vinteo/py-opensprinkler#12
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.