H801 Milight pluggin
Moderator: leecollings
-
- Posts: 34
- Joined: Wednesday 26 October 2016 21:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.5877
- Contact:
H801 Milight pluggin
Hey guy's
first time posting just wanted to say thanks to the developer/s who have created this. This stuff is great! I plan on providing walk throughs on youtube when I have time and create up to date documentation if people let me just so its easier for everyone. My first one was to create a walk through on how to get the Sonoff Dual working with both relays
Anyway, I have been running home automation for the past couple months and its great and slowly expanding. I just received my H801 from Aliexpress after finding information on how to control them via domoticz.
I have seen MANY scripts that work/partially work there are tid bits everywhere on the internet but not really good documentation. My there are two really good leads I have found on how to make it work
1) keep the original firmware and use a script created and it interacts with it via hex - this is great...however in my excitement with getting them I instantly flashed them with easy esp annnnnd now I can't find the bin files of the original firmware anywhere... anybody know where I can get those?
2) use easy esp with an plugin milight and which makes it similar to a milight and you interact on domoticz just like you would < this is a great option see link below
http://www.letscontrolit.com/forum/view ... 6&start=20
However... I am having a horrific time trying to compile easy esp and the milight pluggin. I have tried using this guide (the original link does not work as it looks like the website is very messed up so I am linking to a google cache page)
https://webcache.googleusercontent.com/ ... clnk&gl=uk
I am ususally using the bin files to flash all my esp8266 devices which is super easy ! but this is not the case as milight is not a part of the standard firmware
So my question/plea for help comes down to. does anybody have the original firmware I can flash back to it? OR does anybody have a working bin file of easy eps with milight add on OR could someone compile it for me?
first time posting just wanted to say thanks to the developer/s who have created this. This stuff is great! I plan on providing walk throughs on youtube when I have time and create up to date documentation if people let me just so its easier for everyone. My first one was to create a walk through on how to get the Sonoff Dual working with both relays
Anyway, I have been running home automation for the past couple months and its great and slowly expanding. I just received my H801 from Aliexpress after finding information on how to control them via domoticz.
I have seen MANY scripts that work/partially work there are tid bits everywhere on the internet but not really good documentation. My there are two really good leads I have found on how to make it work
1) keep the original firmware and use a script created and it interacts with it via hex - this is great...however in my excitement with getting them I instantly flashed them with easy esp annnnnd now I can't find the bin files of the original firmware anywhere... anybody know where I can get those?
2) use easy esp with an plugin milight and which makes it similar to a milight and you interact on domoticz just like you would < this is a great option see link below
http://www.letscontrolit.com/forum/view ... 6&start=20
However... I am having a horrific time trying to compile easy esp and the milight pluggin. I have tried using this guide (the original link does not work as it looks like the website is very messed up so I am linking to a google cache page)
https://webcache.googleusercontent.com/ ... clnk&gl=uk
I am ususally using the bin files to flash all my esp8266 devices which is super easy ! but this is not the case as milight is not a part of the standard firmware
So my question/plea for help comes down to. does anybody have the original firmware I can flash back to it? OR does anybody have a working bin file of easy eps with milight add on OR could someone compile it for me?
-
- Posts: 25
- Joined: Thursday 13 October 2016 21:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Kent, England
- Contact:
Re: H801 Milight pluggin
Hi borgkitty!
I have the original firmware which I got following a Google search - I've attached to this post so hopefully not against the rules. I've uploaded it and it seems to work ok.
What I really want to do is get my H801 working with Domoticz so if you get this firmware hooked up I'd like to know how you set it up please.
I've tried many times to get ESPEasy running - it compiles and uploads ok using the IDE but then spits out this ....
ets Jan 8 2013,rst cause:2, boot mode:(1,6)
ets Jan 8 2013,rst cause:4, boot mode:(1,6)
wdt reset
if I power cycle it spits out gibberish and I can't get to do anything else. Even a pre-compiled version does the same. Everyone else reports it works so I must be doing something wrong .....
I have the original firmware which I got following a Google search - I've attached to this post so hopefully not against the rules. I've uploaded it and it seems to work ok.
What I really want to do is get my H801 working with Domoticz so if you get this firmware hooked up I'd like to know how you set it up please.
I've tried many times to get ESPEasy running - it compiles and uploads ok using the IDE but then spits out this ....
ets Jan 8 2013,rst cause:2, boot mode:(1,6)
ets Jan 8 2013,rst cause:4, boot mode:(1,6)
wdt reset
if I power cycle it spits out gibberish and I can't get to do anything else. Even a pre-compiled version does the same. Everyone else reports it works so I must be doing something wrong .....
- Attachments
-
- FirmwareH801WiFiV1.2.rar
- (135.41 KiB) Downloaded 178 times
- ledfreak3d
- Posts: 98
- Joined: Sunday 01 November 2015 15:30
- Target OS: Linux
- Domoticz version: 3.8025
- Location: Hoorn
- Contact:
Re: H801 Milight pluggin
humz anybody got the white channel working with the milight plugin
rgb works great but cant get white to work
rgb works great but cant get white to work
Unleashe the magic smoke ;)
-
- Posts: 25
- Joined: Thursday 13 October 2016 21:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Kent, England
- Contact:
Re: H801 Milight pluggin
Thanks for the work on this module - finally got ESPEasy working with Domoticz ok on RGB, but not White. I can light the white with a HTTP string from internet explorer so the hardware is good.
Has anyone else fixed this please?
Has anyone else fixed this please?
-
- Posts: 34
- Joined: Wednesday 26 October 2016 21:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.5877
- Contact:
Re: H801 Milight pluggin
Sorry for the late reply. Thanks very much on this I will download it and keep it safe just in case anybody needs it. Also thanks to another user he already had a working version of the bin file with the compiled milight plugin in it. I was able to flash it after some trouble.MadBanana wrote:Hi borgkitty!
I have the original firmware which I got following a Google search - I've attached to this post so hopefully not against the rules. I've uploaded it and it seems to work ok.
.
Now I am running into problems with configuration.
I added a new device in esp easy the rgbw milight and have configured it with port 8899 r-15 g-13 b-16 w-14 pins
Then proceed to head over to domoticz go to hardware and add Limitless/AppLamp/Mi Light with LAN/WiFi configure it with port 8899 and the ip save it and then
Go check devices and try to turn on any of the lights and the only one that turns on is red. and sometimes it doesn't go off and sometimes it does no matter how many times i click it. I know all the lights are working because i can issue a direct command of control?cmd=gpio,15,0 to each of the respective pins and flip them on and off.
I was hoping to use this as a color picker not just on but i can't really get anything to work on it. Does anybody have any suggestions?
-
- Posts: 25
- Joined: Thursday 13 October 2016 21:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Kent, England
- Contact:
Re: H801 Milight pluggin
I had to swap the red and the green pins on my H801, which I did in ESPEasy.
I got mine working by .... from Hardware menu, make sure Set Mode is RGBW. In Switches, use edit and set switch type to dimmer then save.
Note that white will not light using the colour picker - there's another way to do this, read this post by Deennoo:-
viewtopic.php?f=51&t=7957&e=1&view=unread#unread
My white is on W2 (pin 4) so it should work as described although I needed to change the 33 in this line to 10 to get it to fade properly:-
CalcValue = (DomValue-1) * 33;
Good luck!
I got mine working by .... from Hardware menu, make sure Set Mode is RGBW. In Switches, use edit and set switch type to dimmer then save.
Note that white will not light using the colour picker - there's another way to do this, read this post by Deennoo:-
viewtopic.php?f=51&t=7957&e=1&view=unread#unread
My white is on W2 (pin 4) so it should work as described although I needed to change the 33 in this line to 10 to get it to fade properly:-
CalcValue = (DomValue-1) * 33;
Good luck!
-
- Posts: 34
- Joined: Wednesday 26 October 2016 21:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.5877
- Contact:
Re: H801 Milight pluggin
holy crap that was a fast reply. i got it working by what you suggested. I have not tried white yet. i will do that sometime this weekend.
I am then going to do a how to write up as there seems to be no one source of info on this just a lot of random posts with bits and pieces of good info on it.
I am then going to do a how to write up as there seems to be no one source of info on this just a lot of random posts with bits and pieces of good info on it.
-
- Posts: 25
- Joined: Thursday 13 October 2016 21:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Kent, England
- Contact:
Re: H801 Milight pluggin
Hope you get it working ok!borgkitty wrote:holy crap that was a fast reply. i got it working by what you suggested. I have not tried white yet. i will do that sometime this weekend.
I am then going to do a how to write up as there seems to be no one source of info on this just a lot of random posts with bits and pieces of good info on it.
Mine seems fine, only gripe is on initial power on it flashes the LEDs briefly before settling down. I think that's a hardware issue but would be good to understand why!
-
- Posts: 34
- Joined: Wednesday 26 October 2016 21:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.5877
- Contact:
Re: H801 Milight pluggin
hey thanks for the link and i am finally having time to sit down and try to get it to work but I can't as there is very vague instructions on the link you gave me with that script.Mine seems fine, only gripe is on initial power on it flashes the LEDs briefly before settling down. I think that's a hardware issue but would be good to understand why!
So what I have done so far was create a dummy like normal
went to switches section created a lightwave RF dimmer switch.
After I create the script and change the IP to my h801 ip and made it executable in domoticz/scripts with chmod +x
Then this is where I get hazy as there is nothing else after that. what do I do with the script? do I put it in the dummy script with script://h801white.lua? I have done this but can't get it to work.
I have tried changing the pin numbers as well with all of the numbers. Have tried manually executing the numbers with the control?cmd to the easy eps and nothing. I have tried on both w1 and w2 and measure it with a volt meter and it stays at 0v cont.
for domdevice what do i change this too? do I leave it or do i put the idx? or what?
any suggestions? i am a bit lost
Edit: after a bit of messing around I found that you had to have the same name as he said in the original post. I got that now and Found that you don't need to put it in the on/off part.
I got the script working and it seems to be working on w1. When I slide the it up and down it seems to move the voltage up and down on w1 like it should be HOWEVER it only moves it from 1.24 v to 1.65 volts which is no where near enough to power the LEDs. Suggestions? I have tried editing the number you told me to from 10 to original 33 to 500 just to see if it would help with the voltage
Last edited by borgkitty on Wednesday 16 November 2016 22:47, edited 2 times in total.
-
- Posts: 25
- Joined: Thursday 13 October 2016 21:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Kent, England
- Contact:
Re: H801 Milight pluggin
That's interesting, I followed it and it worked ok first go .... which bit did you find vague?borgkitty wrote:hey thanks for the link and i am finally having time to sit down and try to get it to work but I can't as there is very vague instructions on the link you gave me with that script.
I didn't need to chmod the scriptborgkitty wrote:After I create the script and change the IP to my h801 ip and made it executable in domoticz/scripts with chmod +x
Hmm, have you checked if it works on W2? Mine did first time ... have you left this line as it is? PIN = "4"; -- for w1 pinborgkitty wrote:I got the script working and it seems to be working on w1. When I slide the it up and down it seems to move the voltage up and down on w1 like it should be HOWEVER it only moves it from 1.24 v to 1.65 volts which is no where near enough to power the LEDs. Suggestions? I have tried editing the number you told me to from 10 to original 33 to 500 just to see if it would help with the voltage
In ESPEasy on my unit White is set to pin 4, which is W2. It maybe the voltage you see on W1 is induced ... or there's something else I can't think of!
-
- Posts: 34
- Joined: Wednesday 26 October 2016 21:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.5877
- Contact:
Re: H801 Milight pluggin
I am a partial idiot. I had the wrong IP. However still no joy. I can see domoticz log execute but no log shows up on easy esp. even when I manually change it with a command like http://192.168.0.227/control?cmd=gpio,4,1 or http://192.168.0.227/control?cmd=gpio,14,1. It does nothing, which is essentially what the script is doing via the curl.
https://chaozlabs.blogspot.co.uk/2015/0 ... -hack.html
most people agree with you though through this forum
here is domoticz executing what looks to be the light? I dont see anywhere that it executes the script? am I missing something?
Loooking more into it. here is the logs
https://s17.postimg.org/wffmnnj9r/domoticz.png
in my easy esp it doesn't receive any commands https://s17.postimg.org/in17s0si7/easy.png
testing the curl with the exact same output it should be getting it creates a log within easy esp. So my conclusion is that it is not executing the script properly? please correct me if i am wrong
If i put the script in the on/off it either returns error returned: 32256 or 512. Did you have to put the script in the on/off?
EDIT: AH HA had well.... the original post didn't really specify either way as he said either or. Originally i created the script in the /scripts folder but he also suggested do it in lua on domoticz. so that is what i did not I am getting stuff sent correctly to the easy esp in the logs. I am to tired tonight to test further but this is a step ahead.
I will def be writing a write up for this as this is confusing as hell and I am sure others find this confusing as hell
Edit 2: so I must have not slept the night before or something as I was doing rookie mistakes all night. so the voltage I was mearsurng was from input ground to w1 or w2. which makes sense that there is nothing or near nothing because I thought those pins were vout and did not pay attention to pinout on the case. I thought the vcc out was actually ground so in addition to me hooking it up wrong ground to ground I also had the LED strip backwards vout to ground and ground to vout FAIL on me. I have not tested this yet as I gave up but I am 99% sure it will work now
based on this its contradictory for which pin is whichIn ESPEasy on my unit White is set to pin 4, which is W2. It maybe the voltage you see on W1 is induced ... or there's something else I can't think of!
https://chaozlabs.blogspot.co.uk/2015/0 ... -hack.html
most people agree with you though through this forum
here is domoticz executing what looks to be the light? I dont see anywhere that it executes the script? am I missing something?
Loooking more into it. here is the logs
https://s17.postimg.org/wffmnnj9r/domoticz.png
in my easy esp it doesn't receive any commands https://s17.postimg.org/in17s0si7/easy.png
testing the curl with the exact same output it should be getting it creates a log within easy esp. So my conclusion is that it is not executing the script properly? please correct me if i am wrong
If i put the script in the on/off it either returns error returned: 32256 or 512. Did you have to put the script in the on/off?
EDIT: AH HA had well.... the original post didn't really specify either way as he said either or. Originally i created the script in the /scripts folder but he also suggested do it in lua on domoticz. so that is what i did not I am getting stuff sent correctly to the easy esp in the logs. I am to tired tonight to test further but this is a step ahead.
I will def be writing a write up for this as this is confusing as hell and I am sure others find this confusing as hell
Edit 2: so I must have not slept the night before or something as I was doing rookie mistakes all night. so the voltage I was mearsurng was from input ground to w1 or w2. which makes sense that there is nothing or near nothing because I thought those pins were vout and did not pay attention to pinout on the case. I thought the vcc out was actually ground so in addition to me hooking it up wrong ground to ground I also had the LED strip backwards vout to ground and ground to vout FAIL on me. I have not tested this yet as I gave up but I am 99% sure it will work now
-
- Posts: 25
- Joined: Thursday 13 October 2016 21:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Kent, England
- Contact:
Re: H801 Milight pluggin
Ah, that sounds a bit more promising. I will hold fire with any more fault finding until you've had another go! Good luck, having followed deennoo's post, mine worked first time.borgkitty wrote:Edit 2: so I must have not slept the night before or something as I was doing rookie mistakes all night. so the voltage I was mearsurng was from input ground to w1 or w2. which makes sense that there is nothing or near nothing because I thought those pins were vout and did not pay attention to pinout on the case. I thought the vcc out was actually ground so in addition to me hooking it up wrong ground to ground I also had the LED strip backwards vout to ground and ground to vout FAIL on me. I have not tested this yet as I gave up but I am 99% sure it will work now
In the case of my controller, this line is contradictory ... PIN = "4"; -- for w1 pin ... as pin 4 is connected to W2, pin 14 to W1. Possible hardware difference or typo in original post.
-
- Posts: 34
- Joined: Wednesday 26 October 2016 21:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.5877
- Contact:
Re: H801 Milight pluggin
annnnnnnnnnd it works huzzah
however I have a noticed a bug (maybe) in the code. when I set it to 3% the log on the easy esp actual shows the command to set it to off.
Also I changed the calc number from 33 to 34 because the pwm range goes from 0-1023. 34 brings it to almost 100% 1020
Finally I think it was noted in another thread somewhere that i can't find right now that there is a bug that you can't get all steps? because when i set it to 100% it stays for about 1 second then drops down to 96% (even though it already issued a 100% command)
however I have a noticed a bug (maybe) in the code. when I set it to 3% the log on the easy esp actual shows the command to set it to off.
Also I changed the calc number from 33 to 34 because the pwm range goes from 0-1023. 34 brings it to almost 100% 1020
Finally I think it was noted in another thread somewhere that i can't find right now that there is a bug that you can't get all steps? because when i set it to 100% it stays for about 1 second then drops down to 96% (even though it already issued a 100% command)
-
- Posts: 25
- Joined: Thursday 13 October 2016 21:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Kent, England
- Contact:
Re: H801 Milight pluggin
Excellent, well done!borgkitty wrote:annnnnnnnnnd it works huzzah)
Domoticz does seem a bit clunky in the way it interfaces with the H801 in this way - for me it works well enough to be ok for what I need.borgkitty wrote:however I have a noticed a bug (maybe) in the code. when I set it to 3% the log on the easy esp actual shows the command to set it to off.
Also I changed the calc number from 33 to 34 because the pwm range goes from 0-1023. 34 brings it to almost 100% 1020
Finally I think it was noted in another thread somewhere that i can't find right now that there is a bug that you can't get all steps? because when i set it to 100% it stays for about 1 second then drops down to 96% (even though it already issued a 100% command)
Who is online
Users browsing this forum: No registered users and 1 guest