Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
RFXtrx
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: RFXtrx
Should be up now
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: RFXtrx
i have been using this plugin for few days with many LightwaveRF sockets ,sensors , remotes and switches and it has been working PERFECTLY so far.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: RFXtrx
Thank you for this feedback! It is always nice to hear such things, especially since I had no LightwaveRF products available while developingLightwaveRF
BR Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: RFXtrx
Back again, Walter! I won't tell you details, but this fall will from now on be considered "the lost fall".
Finally I can get my head above water again and start messing around a little bit. So I have (almost) found a way to do what I want with the new sensors, partly based on your suggestions. First of all I have used only "RFXtrx.*" as the trigger in my main temperature control script (which btw still is working perfectly, turning on and off heaters from the sensor). Then I do a couple of lines that checks if it's a Viking sensor or other kind of temp sensor. If it isn't, it just goes eg.Exit() Next step is conversion of the sensor's ID:
Romkonvertering is a lookup to a table (only showing the start of it):
Now that's where I am trying to put in the search for new sensors. My plan was to use this code to show a new sensor (usually an old sensor that has new batteries) like this, with the sensor number being what's split out of the event string:
The problem is that it errors out before it comes to that. Not so surprising, since it can't do the conversion when there's no corresponding entry in the table:
Is there an Err or something (that's LUA) that I can use to avoid that?
Code: Select all
if (eg.eventString.split(' ')[1]) == "Viking":
Rom = eg.globals.Romkonvertering[int(eg.eventString.split(' ')[4])]
else:
print("Dette er ikke en Viking-sensor")
eg.Exit()Code: Select all
eg.globals.Romkonvertering = {
43008:"1",
51200:"2",
43776:"3",
57088:"4",
}
Code: Select all
if not Rom:
print("***********************************")
print("Dette er en ny Viking-sensor:")
print("***********************************")
print (eg.eventString.split(' ')[4])
print("***********************************")
eg.Exit()Code: Select all
14:17:40 Traceback (most recent call last):
14:17:40 Python script "56", line 5, in <module>
14:17:40 Rom = eg.globals.Romkonvertering[int(eg.eventString.split(' ')[4])]
14:17:40 KeyError: 26368-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: RFXtrx
Hey, nice to see you back again!
For the script, I have two variants you could try. The first is a bit rough using try/except statements
The second is maybe more elegant and does not cause any exception
For the script, I have two variants you could try. The first is a bit rough using try/except statements
Code: Select all
try:
Rom = eg.globals.Romkonvertering[int(eg.eventString.split(' ')[4])]
except:
print("***********************************")
print("Dette er en ny Viking-sensor:")
print("***********************************")
print (eg.eventString.split(' ')[4])
print("***********************************")
eg.Exit()
Code: Select all
key = int(eg.eventString.split(' ')[4])
Rom = ""
if key in eg.globals.Romkonvertering:
Rom = eg.globals.Romkonvertering[key]
else:
print("***********************************")
print("Dette er en ny Viking-sensor:")
print("***********************************")
print (key)
print("***********************************")
eg.Exit()
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: RFXtrx
Thank you master! (It just sounded very appropriate in these days, even though I'm not going to the theater, I'll wait until the Force is on Blu-ray, I tend to get rather pissed on kids yapping and using their phones during the show!) I adjusted the asterixes to make it look a bit better (had to convert the integer to string to be able to print it with asterixes on each side, since it refused to concatenate a string and an integer), and here's the result:
So it should be no problem finding the new sensor and get it into the translation table now!
Code: Select all
18:20:52 ********************************
18:20:52 **Dette er en ny Viking-sensor**
18:20:52 ********************************
18:20:52 ************ 26368 *************
18:20:52 ********************************-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: RFXtrx
Very good!
Should be useful for all kind of devices changing id's randomly after battery replacement
Best regards
Should be useful for all kind of devices changing id's randomly after battery replacement
Best regards
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: RFXtrx
Yeah, I can imagine. I ran into a little snag, merging the code with my own code, though. The result I showed was from the test script:
But when I tried to merge it, I must have made a mistake somewhere, because it still runs my other rooms, but it doesn't show the new sensor:
Any idea why it just doesn't use that else when there is no corresponding "Rom" ?
Code: Select all
key = int(eg.eventString.split(' ')[4])
Rom = ""
if key in eg.globals.Romkonvertering:
Rom = eg.globals.Romkonvertering[key]
print (Rom)
else:
print('**********************************')
print("**Dette er en ny Viking-sensor**")
print('**********************************')
print('************* '+str(key)+' *************')
print('**********************************')
eg.Exit()Code: Select all
#Sjekke om det er en Viking-sensor
if (eg.eventString.split(' ')[1]) == "Viking":
#Finne rommet sensoren kommer fra ved hjelp av tabellen i oppstartsskriptet
key = int(eg.eventString.split(' ')[4])
Rom = ""
print("Dette er en Viking-sensor")
#Sjekke om det er en sensor som står i listen
if key in eg.globals.Romkonvertering:
Rom = eg.globals.Romkonvertering[key]
print (Rom)
#Skille ut temperatur og signal fra payload
eg.globals.Romtemperatur[Rom] = float((eg.event.payload.split(' ')[2]))
eg.globals.Signal[Rom] = (eg.event.payload.split(' ')[6])
#Hvis det ikke er en sensor som står i listen:
else:
print('**********************************')
print("**Dette er en ny Viking-sensor**")
print('**********************************')
print('************* '+str(key)+' *************')
print('**********************************')
eg.Exit()
Re: RFXtrx
Scratch that! It was'nt firing because I had forgotten to add the RfXtrx.* thing...
So it only reacted to the defined sensors! Now I only have to find a way to get around the stuff in the list that isn't t controlled but still fires an event (like fridge and outdoors). Maybe it's best to use a < statement and define those as 20 and up?
Re: RFXtrx
So next problem is that I have room numbers for the rooms and names for the other stuff, which makes it hard to separate. So I guess I'll have to change that and go for a series of numbers for those as well, probably starting at 20, just to have extra space between 13 and 20 for other rooms that may be controlled later. I have found code I can use to see what part of the script that should be run, if it's the temperature control or the alarm part (too hot in the freezer and stuff like that):
But that of course errors out on the stuff that has names. Well, then I have something to do the coming weekend too! 
Code: Select all
if 1 <= int(Rom) <= 13:Re: RFXtrx
New version, this only errors out on the two rooms that are rooms, but not controlled (bathroom and the kitchen, where the heat pump is working):
Code: Select all
try:
romsjekk = int(Rom)
except ValueError:
print("Dette er ikke et rom som styres")
eg.Exit()Re: RFXtrx
Hi! I upgraded to the latest version of the firmware, but suddenly discovered that it's not supported in the plug-in.
Will you have support for the latest version soon? Please? 
Edit: I downgraded to version 91 that should be supported by your latest plug-in version, but it didn't work either, at least at the first few attempts. Working on it...
Edit 2: Got it working again. Helped to plug out the cable so there was no power to the RFX (it still had power from an USB hub even when the pc was off).
Edit 3: I found out that it doesn't work with the new Viking 02813 sensors that have taken over for the previous version 02811. The Tellstick does, but not the RFX. I have mailed RFX support about that. I hope it's easy to fix, it's still the same protocol, only a variant. Undecoded messages in the RFXmanager sees the new sensors as what they are, Fine Offset.
Edit: I downgraded to version 91 that should be supported by your latest plug-in version, but it didn't work either, at least at the first few attempts. Working on it...
Edit 2: Got it working again. Helped to plug out the cable so there was no power to the RFX (it still had power from an USB hub even when the pc was off).
Edit 3: I found out that it doesn't work with the new Viking 02813 sensors that have taken over for the previous version 02811. The Tellstick does, but not the RFX. I have mailed RFX support about that. I hope it's easy to fix, it's still the same protocol, only a variant. Undecoded messages in the RFXmanager sees the new sensors as what they are, Fine Offset.
Re: RFXtrx
I have now sendt a sensor to Bert, so hopefully he can get it working with the RFXtrx433, even with the changes Viking obviously have made on this version. Strange thing is that it seems like it sends only on changes in temperature, and not with a set interval, at least that's what it seems like for me. Maybe a way to save batteries? Anyway, for my part there's no rush to make a new version before there's a firmware that supports the new Viking, if possible.
Re: RFXtrx
(Quote from Net Home Server thread)
Very weird. I would think it should have been part of it if you got it today. I got firmware 95 this morning, and Bert said that he had incorporated the Viking 02813. But I saw a log he sendt me, and that showed the sensor as a 02811. So maybe it's in there? Or did he say that it wasn't a part of it?krambriw wrote:I have just this morning received a new sdk from Bert (that is necessary to have to update the plugin) but the Viking 02813 is not in there yetCould you please have a look and see if you can update the RFX plug-in?
BR