This is interesting. The raspberry pie on which is open sprinkler is behind a brick wall outside. For WIFI signal, it may not be the best.
However, and this is the interesting part, I have absolutely no problem getting access to the UI of open sprinkler from any browser on the network. On the raspberry, I have also a Bluetooth to mqtt bridge. It push data from my Xiaomi sensor to my home assistant MQTT broker every hour. It work every time.
What do you think ? The other application seem to work fineā¦but maybe they handle connection differentlyā¦
Hi @vinteo,
Great work by the way!
Iāve setup your custom integration and I see a strange behavior. My first station and first program are not created (index 0).
For example Iāve set
stations:
- 0
- 1
- 2
and I see only my second and third station (index 1 and index 2).
Same with my programs. Iāve set the programs indexes 0, 2 and 4 in the config and see only my third and fifth program.
I tried to change the station order in the config and still, I canāt see my indexes 0 station and program
No errors in the log. Iām at HA 0.99.3, OS 2.1.8 and hass-opensprinkler 0.1.3
Iāve double and triple check everything, Iām running out of idea on how to debug the issue.
It works now! Not specifying any stations or programs in the config did the trick! Thanks!
Maybe an issue with the filteringā¦ My OpenSprinkler is set as Disabled right now (already few inches of snow on the ground here in Montreal, Canada). Maybe this setting change a bit the REST response and the filter mode cannot handle it.
Any plans to add the integration as an official integration of HA?
Iām trying to get this working using open sprinkler pi (latest) and the latest version of HassIO, but get the following error and a notification saying the component did not load:
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'
Anyone have any idea how to get around this? Is this an issue with open sprinkler pi v open sprinkler?
Without seeing this I have done the same, it looks nice, but I have a problem, Opensprinkler donāt have SSL, to get this working I have to turn off SSL in HA. Iām not that technical and havenāt found a way around it. Either no SSL in HA or no Iframe for opensprinkler.
Any tips or hint would be helpful here.
The thing Iām disatisfied with in opensprinkler is the weather report, not that accurate for Sweden, this I will solve in an ugly way, I bought a Sonoff 5V that I will stop the opensprinkler via the rainsensor with if it rains according to the Swedish forecast from HA.
I use reverse proxy in synology to give ssl to opensprinklerā¦ it would however be best if the opensprinkler plugin was part of HACS or official hassio plugin with ingressā¦
Been loving your Open Sprinkler integration but mine has also broken recently (same errors as simo26246). I installed HACS to get the latest version as your github repo suggested it was available via HACS.
I canāt see any reference to it in HACS and was wondering if you have any idea why?
Thanks vinteo,
I added the custom repro and was able to add your integration through HACS. Appreciate the tip.
Today I also updated to HA 0.104. I have some OpenSprinkler entities back now but I am still missing some.
The following info is from my HA log (appears several times):
2020-01-17 12:15:44 ERROR (MainThread) [homeassistant.helpers.entity] Update for binary_sensor.rain_delay fails
Traceback (most recent call last):
File "C:\Utils\Python\Python37-32\lib\site-packages\homeassistant\helpers\entity.py", line 279, in async_update_ha_state
await self.async_device_update()
File "C:\Utils\Python\Python37-32\lib\site-packages\homeassistant\helpers\entity.py", line 461, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "C:\Utils\Python\Python37-32\lib\concurrent\futures\thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "C:\Utils\Python\Python37-32\lib\site-packages\homeassistant\util\__init__.py", line 240, in wrapper
result = method(*args, **kwargs)
File "C:\Utils\HomeAssistant\custom_components\hass_opensprinkler\binary_sensor.py", line 80, in update
self._is_on = bool(self._sensor())
File "C:\Utils\HomeAssistant\custom_components\hass_opensprinkler\__init__.py", line 175, in rain_delay
return self._get_controller_variable(CONF_RAIN_DELAY, 'rd')
File "C:\Utils\HomeAssistant\custom_components\hass_opensprinkler\__init__.py", line 109, in _get_controller_variable
self.data[key] = response.json()[variable]
File "C:\Utils\Python\Python37-32\lib\site-packages\requests\models.py", line 897, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Utils\Python\Python37-32\lib\json\__init__.py", line 348, in loads
return _default_decoder.decode(s)
File "C:\Utils\Python\Python37-32\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Utils\Python\Python37-32\lib\json\decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid control character at: line 1 column 349 (char 348)
Appears it is now on the HACS repo. Good work. I too was having issues with it working so just removed it as I couldnāt find the update, will set it back up again now.
Having an issue, get the following error when I try and trigger one of the switches "Failed to call service switch/turn_on. āNoneTypeā object has no attribute āstateā "
Any ideas?
Have reinstalled, removed and reinstalled.
Iām on Hassio 104.3
All stations show in Hassio but all get the same error when switched. Also if I activate a station via the opensprinkler app it updates the state of the station that is running. I am able to turn off a running station just can not turn them on