Comments (53)
Hi,
'SERVER_ADDR' is a php system constant, so you don't have to change this one...
Please check if the index.php and the daemon is on the latest version.
from raspberry-remote.
???
there is nothing to edit in index.php
every needed setting is in config.php
i need the settings for this
systemcode is the homecode (11000 in my case) or ?
what means group ?
plug is the number of the powerplud to switch ?
in my case 0 to 2 or 1 to 3
from raspberry-remote.
Since i added the support for Intertechno devices the usage is like this:
<1 / 2> (1 for 'normal' 10dip things, 2 for intertechno with 2x16 options)
< homecode > your 11000
< devicecode > e.g. 10
< 0 / 1 > for on and off
My configfile looks like this:
$source = $_SERVER['SERVER_ADDR'];
$target = '127.0.0.1';
$port = 11337;
$config=array(
array("1", "00100", "01", "TL Lamp"), //DIP
array("2", "7" , "02", "Kueche"), //Intertechno
)
I also modified the send.cpp for usage with intertechno but isn't really ready for public yet
Could you describe more precisely what happens on your web interface?
- does it display all your devices?
- does it display the systemcode in front of your homecode?
- does it reload with changed color?
I just wanted to make sure you are on the latest web interface. You shouldn't edit anything in there...
from raspberry-remote.
does it display all your devices?
yes
does it display the systemcode in front of your homecode?
yes..it shows
1:11000:10
switch on
1:11000:10
switch off
does it reload with changed color?
yes
but anyway......nothing happens on the plugs
as i said ...with send via terminal everything works fine
from raspberry-remote.
Ok, it seems like the communication between the web interface and the daemon works...
It seems to be a problem of the daemon.. I'll check this later today.
How does your output look, when you start the daemon not in background?
'sudo ./daemon'
Does it display any errors?
from raspberry-remote.
Im not at home today
will check that tomorrow
which plugs are tested and known as functional with raspberry-remote ?
I actually use Elro AB440S
from raspberry-remote.
Since both the daemon and and send use a RCSwitch object to send the commands, and it works for you with send, it shouldn't be a problem of the switches.
I personally use these plugs.
from raspberry-remote.
I just tested it and got this messages
pi@raspberrypi ~/raspberry-remote $ sudo ./daemon
message: 11100012
nSys: 1
nGroup: 11000
nSwitchNumber: 2
nAction: -48
nAddr: 116
nPlugs: 1110
message: 11100012
nSys: 1
nGroup: 11000
nSwitchNumber: 2
nAction: -48
nAddr: 116
nPlugs: 1110
message: 11100012
nSys: 1
nGroup: 11000
nSwitchNumber: 2
nAction: -48
nAddr: 116
nPlugs: 1110
message: 111000012
nSys: 1
nGroup: 11000
nSwitchNumber: 1
nAction: 2
nAddr: 115
nPlugs: 1110
message: 1110000110
nSys: 1
nGroup: 11000
nSwitchNumber: 1
nAction: 1
nAddr: 115
nPlugs: 1110
message: 111000012
nSys: 1
nGroup: 11000
nSwitchNumber: 1
nAction: 2
nAddr: 115
nPlugs: 1110
message: 111000012
nSys: 1
nGroup: 11000
nSwitchNumber: 1
nAction: 2
nAddr: 115
nPlugs: 1110
message: 1110000100
nSys: 1
nGroup: 11000
nSwitchNumber: 1
nAction: 0
nAddr: 115
nPlugs: 1110
message: 111000012
nSys: 1
nGroup: 11000
nSwitchNumber: 1
nAction: 2
nAddr: 115
nPlugs: 1110
message: 111000012
nSys: 1
nGroup: 11000
nSwitchNumber: 1
nAction: 2
nAddr: 115
nPlugs: 1110
message: 1110000110
nSys: 1
nGroup: 11000
nSwitchNumber: 1
nAction: 1
nAddr: 115
nPlugs: 1110
message: 111000012
nSys: 1
nGroup: 11000
nSwitchNumber: 1
nAction: 2
nAddr: 115
nPlugs: 1110
message: 111000012
nSys: 1
nGroup: 11000
nSwitchNumber: 1
nAction: 2
nAddr: 115
nPlugs: 1110
message: 1110000100
nSys: 1
nGroup: 11000
nSwitchNumber: 1
nAction: 0
nAddr: 115
nPlugs: 1110
message: 111000012
nSys: 1
nGroup: 11000
nSwitchNumber: 1
nAction: 2
nAddr: 115
nPlugs: 1110
message: 111000012
nSys: 1
nGroup: 11000
nSwitchNumber: 1
nAction: 2
nAddr: 115
nPlugs: 1110
from raspberry-remote.
Ok, i think it is some weakness at the incoming data processing of the daemon.
Give it a try with a one digit plug number (don't forget to switch it on the actual switch too).
I'll work on that but im not a master at c++ ...
from raspberry-remote.
thanks for your efford........
I try it in the past with a one digit plug number
I think i try every constellation meanwhile :-(
The webinterface dont load then..........
tries to connect and show "Could not connect to socket" finally
daemon messages:
pi@raspberrypi ~/raspberry-remote $ sudo ./daemon
message: 11100012
nSys: 1
nGroup: 11000
nSwitchNumber: 2
nAction: -48
nAddr: 116
nPlugs: 1110
message: 11100012
nSys: 1
nGroup: 11000
nSwitchNumber: 2
nAction: -48
nAddr: 116
nPlugs: 1110
message: 11100012
nSys: 1
nGroup: 11000
nSwitchNumber: 2
nAction: -48
nAddr: 116
nPlugs: 1110
You said that you use the Brennenstuhl plugs........ it works ?
would be great to get it work for me too
from raspberry-remote.
It's kind of funny because when i tested your array(1 11000 10) it got the same error but not with array(1 11000 01 1). The daemon gets a wrong number for the action. -48 isnt the action you want to perform right? 😆
I think I'll test it tonight and update here if i find a solution.
from raspberry-remote.
cool........
looks like there is a solution in sight
from raspberry-remote.
i think its unfortunately more complicate than expected
there must be a difference between your Brennenstuhl Plugs and mine
But what........?
from raspberry-remote.
So im trying to make it all a little bit more flexible, i double-checked with my daemon wich is running fine since some months now and there isn't really a difference.
But all in all i don't have that much time for this project at the moment, it will be better in about a week. I attached my current setup, thats the best i can give you at the moment.
I also looked closely at your log, and the thing for the first messages is, that the received string is too short (it's static processing of it in the daemon), thats why it takes the "2" as the switch and a -48 as action bc this field is an empty one, behind the numbers.
So check that in your config all plugs have a length of 1(system)+5(house)+2(switchnumber)+1(action) = 9. And stay with switch numbering 01-09 for the moment.
I hope it will work for you!
Im coming more from java and this C++ is kind of a mess for me but i give my best ;-)
from raspberry-remote.
Hello,
now I replaced my files with yours from the zip
recompiled the daemon with the new .cpp
I canged the plug code to 00100........ same as yours
Webinterface still dont work
except changing colours when I switch off to on
send command is working fine as before
I also changed $target = '127.0.0.1'; in config.php to my local IP-Address without success
this is the daemon output
nSwitchNumber: 9 nAction: 2 nAddr: 23 nPlugs: 1110 message: 101100012 nSys: 1 nGroup: 01100 nSwitchNumber: 1 nAction: 2 nAddr: 55 nPlugs: 1110 message: 101100022 nSys: 1 nGroup: 01100 nSwitchNumber: 2 nAction: 2 nAddr: 56 nPlugs: 1110 message: 101100032 nSys: 1 nGroup: 01100 nSwitchNumber: 3 nAction: 2 nAddr: 57 nPlugs: 1110 message: 27022 nSys: 2 nGroup: 7 nSwitchNumber: 2 nAction: 2 nAddr: 31 nPlugs: 1110 computing systemcode for Intertechno Type B house[7] unit[2] ... 7/G ... got systemCode[7] 2 ... message: 1001000100 nSys: 1 nGroup: 00100 nSwitchNumber: 1 nAction: 0 nAddr: 15 nPlugs: 1110 message: 100100012 nSys: 1 nGroup: 00100 nSwitchNumber: 1 nAction: 2 nAddr: 15 nPlugs: 1110 message: 100100022 nSys: 1 nGroup: 00100 nSwitchNumber: 2 nAction: 2 nAddr: 16 nPlugs: 1110 message: 100100032 nSys: 1 nGroup: 00100 nSwitchNumber: 3 nAction: 2 nAddr: 17 nPlugs: 1110 message: 100100042 nSys: 1 nGroup: 00100 nSwitchNumber: 4 nAction: 2 nAddr: 18 nPlugs: 1110 message: 100100052 nSys: 1 nGroup: 00100 nSwitchNumber: 5 nAction: 2 nAddr: 19 nPlugs: 1110 message: 100100062 nSys: 1 nGroup: 00100 nSwitchNumber: 6 nAction: 2 nAddr: 20 nPlugs: 1110 message: 100100072 nSys: 1 nGroup: 00100 nSwitchNumber: 7 nAction: 2 nAddr: 21 nPlugs: 1110 message: 100100082 nSys: 1 nGroup: 00100 nSwitchNumber: 8 nAction: 2 nAddr: 22 nPlugs: 1110 message: 100100092 nSys: 1 nGroup: 00100 nSwitchNumber: 9 nAction: 2 nAddr: 23 nPlugs: 1110 message: 101100012 nSys: 1 nGroup: 01100 nSwitchNumber: 1 nAction: 2 nAddr: 55 nPlugs: 1110 message: 101100022 nSys: 1 nGroup: 01100 nSwitchNumber: 2 nAction: 2 nAddr: 56 nPlugs: 1110 message: 101100032 nSys: 1 nGroup: 01100 nSwitchNumber: 3 nAction: 2 nAddr: 57 nPlugs: 1110 message: 27022 nSys: 2 nGroup: 7 nSwitchNumber: 2 nAction: 2 nAddr: 31 nPlugs: 1110 computing systemcode for Intertechno Type B house[7] unit[2] ... 7/G ... got systemCode[7] 2 ... message: 100100012 nSys: 1 nGroup: 00100 nSwitchNumber: 1 nAction: 2 nAddr: 15 nPlugs: 1110 message: 100100022 nSys: 1 nGroup: 00100 nSwitchNumber: 2 nAction: 2 nAddr: 16 nPlugs: 1110 message: 100100032 nSys: 1 nGroup: 00100 nSwitchNumber: 3 nAction: 2 nAddr: 17 nPlugs: 1110 message: 100100042 nSys: 1 nGroup: 00100 nSwitchNumber: 4 nAction: 2 nAddr: 18 nPlugs: 1110 message: 100100052 nSys: 1 nGroup: 00100 nSwitchNumber: 5 nAction: 2 nAddr: 19 nPlugs: 1110 message: 100100062 nSys: 1 nGroup: 00100 nSwitchNumber: 6 nAction: 2 nAddr: 20 nPlugs: 1110 message: 100100072 nSys: 1 nGroup: 00100 nSwitchNumber: 7 nAction: 2 nAddr: 21 nPlugs: 1110 message: 100100082 nSys: 1 nGroup: 00100 nSwitchNumber: 8 nAction: 2 nAddr: 22 nPlugs: 1110 message: 100100092 nSys: 1 nGroup: 00100 nSwitchNumber: 9 nAction: 2 nAddr: 23 nPlugs: 1110 message: 101100012 nSys: 1 nGroup: 01100 nSwitchNumber: 1 nAction: 2 nAddr: 55 nPlugs: 1110 message: 101100022 nSys: 1 nGroup: 01100 nSwitchNumber: 2 nAction: 2 nAddr: 56 nPlugs: 1110 message: 101100032 nSys: 1 nGroup: 01100 nSwitchNumber: 3 nAction: 2 nAddr: 57 nPlugs: 1110 message: 27022 nSys: 2 nGroup: 7 nSwitchNumber: 2 nAction: 2 nAddr: 31 nPlugs: 1110
from raspberry-remote.
I have exactly the same problem as you, I have the same plugs.
Funnily enough, if I use this older Version everything works for me. Just use a housecode 00000, 00001 or 00010 or change it in daemon.cpp
https://github.com/xkonni/raspberry-remote/tree/40a0c6d9f35d5ee29a8d9f89d23d760527003dbe
from raspberry-remote.
you are using the version under the link you have posted ?
And housecode 00000, 00001 or 00010 is working ?
i try that
But in parallel i have ordered the plugs that tillepille is using (Brennenstuhl)
from raspberry-remote.
Yes, but you can define the allowed range of house codes in daemon.cpp and recompile it.
After having the problem with the webinterface I found this guide where I found the hint to use the old version.
from raspberry-remote.
It works now !!!!
I use housecode 00010 actually and the old version
many thanks
I'm looking forward if the Brennstuhl plugs work also with the old version or if they need the new one
from raspberry-remote.
Now i have another funny thing
I do the same thing on a second pi and a second sender
When the Webinterface shows "switched off" the plug is active and switched on
When the Webinterface shows "switched on" the plug is inactive and switched off
Wtf ???????????
from raspberry-remote.
I think the color of the frame is the status and the text in the middle is the state after you press the button. It's a bit confusing
from raspberry-remote.
I think my PR #18 will solve your problems.
from raspberry-remote.
Hi Phiber2000
I`m actually happy with the running old version
But nevertheless it would be fantastic to use a newer one that works
How can i get the new version ?
here at github ?
from raspberry-remote.
Of course here at github. It's a pull request from my fork.
Because I already merged the branch into my master, so all you have to do is cloning my repo and updating your webinterface and config.
Update: My PR #18 is merged, so just do a git pull
and update the webinterface and config.
Have a look at the comments in config.php
because the addressing is changed and now really allows up to 992 plugs (32 addresses * 31 plugs per address) including the Intertechno plugs.
Everything else - especially the send
program - behaves as before.
from raspberry-remote.
Thanks for your work Phiber2000!
I merged your pull request. Hope it will solve all the problems here so we can close this issue.
from raspberry-remote.
I will test it tomorrow
from raspberry-remote.
Ok I downloaded your files and will test it later
from raspberry-remote.
Tested it but it still doesn't work for me.
from raspberry-remote.
Please be more specific. System, Group, Plug, config entry...
from raspberry-remote.
Same problem as above, webinterface sends message but the switch doesn't do anything.
Group and switch number are all correct (Group 00001, switch no. 1). Here is the output:
message: 100001012
nSys: 1
nGroup: 00001
nSwitchNumber: 1
nAction: 2
nAddr: 33
nPlugs: 1024
message: 1000010110
nSys: 1
nGroup: 00001
nSwitchNumber: 1
nAction: 1
nAddr: 33
nPlugs: 1024
message: 100001012
nSys: 1
nGroup: 00001
nSwitchNumber: 1
nAction: 2
nAddr: 33
nPlugs: 1024
My config.php content looks like this:
<?php
$source = $_SERVER['SERVER_ADDR'];
$target = '192.168.2.131';
$port = 11337;
$config=array(
array("1", "00001", "01", "Schreibtisch"),
)
?>
from raspberry-remote.
Plug 1 Elro has address 16 not 01! Have a look at the notes at top of the new config.php.
from raspberry-remote.
whoops, now I feel stupid.. didn't realise it was in hex now.
Everything works fine, thanks!
from raspberry-remote.
It's decimal, not hex. And this (using two digits) was broken before.
Thanks for testing! Nice to hear that it works for you, too!
from raspberry-remote.
i`m struggeling with the strange numbering of the Elro plugs
array("1", "00001", "16", "Nr. 1"),
array("1", "00001", "08", "Nr. 2"),
array("1", "00001", "04", "Nr. 3"),
array("1", "00001", "02", "Nr. 4"),
array("1", "00001", "01", "Nr. 5"),
Is 16 and 08 correct ?
my plugs are switchable from A to E = 5
from raspberry-remote.
yes it makes sense, i have 2 sets, on one it is A-E and the other is 6-10. If you look at the values from ABCDE as one number, A=1 and rest 0 equals 10000 which has the value 16 decimal or 10 hex
from raspberry-remote.
ah ok ....
that makes sense
from raspberry-remote.
@perlian
Don't struggle, just use it. Maybe this is more understandable in your case:
Plug 1 (A) = "16"
Plug 2 (B) = "08"
Plug 3 (C) = "04"
Plug 4 (D) = "02"
Plug 5 (E) = "01"
from raspberry-remote.
Its a binary numbering, just don't read from a-e(1-5). So you could dip up the switch D and E and the switch number would be 3.
So just sum up the numbers of dips you switched up.
For the example above it means E and D, E has 1, D has 2, 2+1 means Switch nr 3.
i hope you understand it now.
does it work for you @perlian ?
from raspberry-remote.
Sorry I`m actually not at home so i cant test it
i will do that this evening
one question....has the numbering system changed since the last version ?
I always take 01 for plug A and not 16 in the past
The working (old) version use this system (01...02...03...04....05) as well
from raspberry-remote.
I tested it now
and it works !
Great job
the next projekt will be a nicer looking webinterface
Something like shown on that page
from raspberry-remote.
I must say that I'm testing with Intertechno Plugs (e.g. array("2", "01", "01", "Intertechno 1"),
and its not working.
This is the Daemon Output everytime I click one of the working switches on the webinterface (see at the end, because Intertechno is my last array):
[...]
//my elro plugs (working)
message: 111111042
nSys: 1
nGroup: 11111
nSwitchNumber: 4
nAction: 2
nAddr: 996
nPlugs: 1024
//the intertechno array (not working)
message: 201012
nSys: 2
nGroup: 01
nSwitchNumber: 1
nAction: 2
nAddr: 33
nPlugs: 1024
Switch out of range: 01:1
It seems like it can't get the status of the Intertechno Plug, switching is also not possible.
Anyone with the same problem? Any Idea?
BR - Varco
from raspberry-remote.
There may be something broken with the address calculation.
I never understood, what the original author (not the author of this patch) did here.
from raspberry-remote.
Try this (Branch: fix-intertechno_addr): FooDeas/raspberry-remote
Please report, so I can create a PR!
from raspberry-remote.
Yea something like that seems to fail..
I tried to fix it myself but failed many times,
what exactly do you think was the problem?
I will replace the daemon tonight, and let you know whether its working..
I've also found some bugs within the "send.cpp" which I could fix mysef.
I'll also let you know about that later when I'm back home.
Thanks for the quick replies!
-V
from raspberry-remote.
The problem was the calculation of the value, where to save/read in the state array.
By the way: I just optimized it a bit some minutes ago and pushed the changes.
The only very dirty thing I've seen in the sender daemon is, that the connection isn't closed after usage. I don't know, if that can harm or if it times out anytime... hopefully...
from raspberry-remote.
Just pulling..
I just remembered got a different send.cpp from here (almost at the end of the comments; #includes needed to be fixed though)
(also watch out for the text formatting on that page - " " will get wasted)
heres my current send.zip
The original send.cpp wasn't working with intertechno A-D; 1-16 Codes (somehow for me)
The good thing for that new send.cpp is, that both Intertechno Types and ELRO Switches are working.
If its already known or implemented somehow, please let me know.
For the sender timeout, I really have no clue
EDIT: Maybe something related to mySwitch.setPulseLength(300); which was missing? dunno
.. now testing the daemon.cpp :)
from raspberry-remote.
does the "daemon.h" also need to be updated?
building fails with:
`daemon.cpp: In function 'int main(int, char**)':'
daemon.cpp:141:51: error: 'getAddrElro' was not declared in this scope
int nAddr = getAddrElro(nGroup, nSwitchNumber);daemon.cpp:196:50: error: 'getAddrInt' was not declared in this scope
int nAddr = getAddrInt(nGroup, nSwitchNumber);daemon.cpp: In function 'int getAddrInt(const char*, int)':
daemon.cpp:342:25: error: invalid operands of types 'const char*' and 'int' to binary 'operator*'
return ((nGroup - 1) * 16) + (nSwitchNumber - 1) + 256;daemon.cpp:343:1: warning: control reaches end of non-void function [-Wreturn-type]`
from raspberry-remote.
My fault - still had my test code online. Pull again.
I had a second look at the sender: The sender of this project is okay. Nothing important to be changed.
from raspberry-remote.
Great, now Intertechno is working,
but Elros giving me following output now:
message: 111111162
nSys: 1
nGroup: 11111
nSwitchNumber: 16
nAction: 2
nAddr: 1008
nPlugs: 512
Switch out of range: 11111:16
message: 111111082
nSys: 1
nGroup: 11111
nSwitchNumber: 8
nAction: 2
nAddr: 1000
nPlugs: 512
Switch out of range: 11111:8
message: 111111042
nSys: 1
nGroup: 11111
nSwitchNumber: 4
nAction: 2
nAddr: 996
nPlugs: 512
Switch out of range: 11111:4
But Man, thanks for your efforts so far! :)
from raspberry-remote.
config.php
entry for your issue?
from raspberry-remote.
config.php Elro Array
array("1", "11111", "16", "Stecker 1"),
array("1", "11111", "08", "Stecker 2"),
array("1", "11111", "04", "Stecker 3"),
from raspberry-remote.
It should be done now. I forgot 2 bits.
from raspberry-remote.
Yeah! Thanks man, working now, just commented on #22
Alaaf! 👯
from raspberry-remote.
Related Issues (20)
- GPIO #17 is not available on Raspberry Pi 2B HOT 1
- Resolved --- Addressing more plugs ? HOT 1
- Powerswitch.cpp ipv6 socket? HOT 1
- Cannot call 01 / 08
- Webinterface dos not work HOT 1
- Webinterface "Could not connect to Socket" Problem Solved HOT 1
- webinterface - Intertechno switches don't work HOT 2
- starting daemon in binary mode dont work (more than 5 HOT 1
- Delay doesnt work
- Code send HOT 1
- Daemon crashes with Stretch HOT 1
- Checking the status HOT 4
- Doesn't compile HOT 6
- IPv6 - Could not bind to socket HOT 4
- Daemon randomly crashes - Too many open files HOT 6
- 1 button for all sockets
- 64Bit Support HOT 7
- 64Bit Support? HOT 1
- Help! arm64bit instruction // compiler
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raspberry-remote.