Open cvc90 opened 1 year ago
I've build this plugin against v1: https://github.com/roleoroleo/yi-hack-Allwinner
And my camera is a YI 9FUS type, which is not supported by the v2 version of yi-hack-allwinner-v2
So im open for PR's 🗡️
It does not seem very difficult to solve, since it simply does not seem to collect the data it receives from the json well, if you need to do any type of tests I will be happy to help you in any way possible to correct it.
true, but i don't have devices laying around with v2 installed/compatible. So it would be impossible for me to check & build.
If you like, make a fork out of this repo and try to rework the json code yourself?
Actually the first thing that it tries to do is dump the json response:
def onMessage(self, Connection, Data):
try:
Response = json.loads(Data["Data"])
DumpJSONResponseToLog(Response)
So if you dont see that part in your logs, its already failing at
Response = json.loads(Data["Data"])
You can try that call yourself with a browser to see the json if you like:
1) Go to the camera dashboard website and login 2) Adjust the url so that it ends with: '/cgi-bin/get_configs.sh?conf=camera'
You should then see the json payload in your browser
? can you assist ?
? can you assist ?
Yes @galadril, I have accessed the route http://xxx.xxx.x.xx:8080/cgi-bin/get_configs.sh?conf=camera as you say and I can say that I load the json perfectly.
Comparing with the plugin created by you, I see that options are missing when reading the json, I imagine that version 1 would not give the json so many options.
@galadril Hi, have you been able to take a look to try to fix it?
Ok i have a quick test version on a seperate branch https://github.com/galadril/Domoticz-Yi-Hack-Plugin/blob/alwinner-v2-support
(i could not test this, aldo the json looks pretty much the same as i have, but mine json is wrapped in a "Data" : { }
payload.
To install this different branch:
Go in your Domoticz directory using a command line and open the plugins directory.
Run the next commands:
git clone --branch alwinner-v2-support https://github.com/galadril/Domoticz-Yi-Hack-Plugin.git
Restart Domoticz.
You could see in your hardware that your then running the 0.0.3 version of the plugin
Thank you! I just tried this new branch in Domoticz and it still shows the json error in LOG, it's put in debug mode and it doesn't show any other error in LOG either, but the switches are still off as shown in the image and don't change their state .
mm well thats at least a start. Did some more changes, please pull again and restart domoticz
Good morning! I just updated the docker to the latest version, as you can see in the attached screenshots, everything seems to be the same as in the previous version, it still does not load the json correctly and that causes the switches to not load with their current state. I have also tried in debug mode and I don't see any extra error messages.
Yi Hack Plugin for Domoticz does not work correctly in version 0.2.6 of Yi Hack Allwinner V2 (https://github.com/roleoroleo/yi-hack-Allwinner-v2), it seems not to load correctly the json of the setting
LOG Record
CAM: Connected successfully to: 192.168.0.XX:8080 CAM: No json payload received.