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.

OpenNetHomeServer

Questions and comments specific to a particular plugin should go here.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Receive events from NetHomeServer

Post by krambriw »

Hello Michael, no problem
The information is in the so called payload of the event. A simple way to get it is to create a macro, drag the event to it and then add the following script as next step in the macro

Best regards, Walter

Code: Select all

p = eg.event.payload
print p
p = p.split('|')
temp = p[3]
print temp
mickelin
Experienced User
Posts: 85
Joined: Sun Jan 04, 2009 5:54 pm

Re: Receive events from NetHomeServer

Post by mickelin »

Brilliant, thanks!
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Receive events from NetHomeServer

Post by krambriw »

support also for the RFTransmitter in the plugin. Since NetHomeServer now supports Pronto codes, that would make it possible to send Pronto codes by RF from EG
Hi,

This is possible. To transmit RF from NetHomeServer you will need to either build a transmitter based on a remote or purchase that little CUL USB dongle he currently is implementing support for. Have you already made the remote mod?

I have no devices connected to and handled by NetHomeServer and I haven't played too much with the pronto code but I believe it is something you configure inside of NetHomeServer for each device that supports it?

If so, you could just help me to test some things before I start coding too much.

Start a telnet session and connect to NetHomeServer. From the prompt, type
o host-ip 8005
and you should be connected. Then type
dir
and you should get a list of all instances. Then try to set a device that you have configured for pronto
call, Bedroom Lamp, on
or something similar

If it works fine from telnet, I know how to code the things

Best regards, Walter


PS I noticed in your configuration screen shot above one little thing; drag the "UPM Logger" action to the Autostart as well, otherwise it wont start automatically when EG starts
mickelin
Experienced User
Posts: 85
Joined: Sun Jan 04, 2009 5:54 pm

Re: Receive events from NetHomeServer

Post by mickelin »

Hi Walter,

I have had a look around the config gui of the NHS but haven't found any references to Pronto. Perhaps it is not implemented yet, except in the analyzer?

Let me describe what I want to do, so you have the use case clear.

I use a Philips Pronto remote to control my home theatre. This remote sends RF Pronto codes to a pyramid that converts to IR and sends on to the A/V equipment (amplifier, DVD player, plasma, projector)

To control lights, curtains, projector screen etc, the Pronto remote sends "dummy" codes that are intercepted by EventGhost and used to trigger appropriate Tellstick On/Off/Dim commands.

What I want to do is to replace/complement the Pronto remote with a voice control interface, using the EG Voice plugin. Therefor I need EG to send the control signals to the A/V equipment. I had planned to use a USB-UIRT for this, but I would rather use RF directly, instead of having a set of pyramids translating the USB-UIRT signal to RF and back to IR.

I would rather not have to define and map all devices and codes in NHS, but just use it as a generic RF transmitter, just passing on a code that is sent from EG. That way, I could keep all configuration and device definitions etc in EG.

So my wishlist in summary:
- Define a generic Pronto remote object in NHS that re-transmits a code recieved through telnet
- Support in your plugin for taking a code in Pronto Hex format and sending it through to NHS

Long, description - is it doable?

EDIT:
I've tested some more and it looks promising! In NHS I defined an item of type RFTransmitter and called it ProntoTest.

Using telnet, it shows up under the dir command. I can issue a get command to get the attributes and I can call it by: call,ProntoTest, but haven't figured out how to provide the message code. The documentation (http://wiki.nethome.nu/doku.php/audiopr ... ransmitter) states that it can transmit a pronto message, but doesn't say how to format the message. It only lists one action: PlayTestBeep

call,ProntoTest,PlayTestBeep beeps and returns ok

call,ProntoTest,code returns ok

Thanks,
Michael
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Receive events from NetHomeServer

Post by krambriw »

Hello,

Yes this will not be too difficult. I expect to have a first test version uploaded sometime during the day

I have just found out how to send pronto codes to NHS, you can test this as well and replace the pronto below with the codes you prefer

This event is taken care of by NHS as an event that shall go out. When I send it via telnet, I hear the code in my speakers/headset. I changed nothing except that I configured the RFTransmitter to use the correct audio output

Best regards, Walter

Code: Select all

event,Pronto_Message,Direction,Out,Pronto.Message,0000 0073 0000 0019 000e 002a 000e 002a 000e 002a 000e 002a 000e 002a 000e 002a 000e 002a 000e 002a 000e 002a 000e 002a 000e 002a 000e 002a 000e 002a 000e 002a 000e 002a 000e 002a 000e 002a 000e 002a 000e 002a 002a 000e 000e 002a 002a 000e 000e 002a 002a 000e 000e 0199
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Receive events from NetHomeServer

Post by krambriw »

New version with pronto command support uploaded in the first post above (just add an action for each pronto code to like to send)
Image2.jpg
Best regards, Walter
mickelin
Experienced User
Posts: 85
Joined: Sun Jan 04, 2009 5:54 pm

Re: Receive events from NetHomeServer

Post by mickelin »

Perfect, exactly like I wanted! You da man Walter! :D

I haven't quite gotten it to work yet, but I suspect there is a problem with my newly built transmitter. I'll try to check it out tomorrow and test some more.

I also picked up my UPM wind sensor today. This is what the logger entries and the analyzer look like:
Windsensor.jpg
As I rotate the wind direction sensor through N-E-S-W, the humidity number changes from 2-10-13-6. With no wind, the temperature shows -50, going to -47.8125 as I blow on the wind speed sensor. Looking at the analyzer results, notice that the command value also changes when there is wind.

So, the support is almost here, we just need to decode the data format and calibrate. Looking at the NHS homepage, there is mention of support for the UPM weather sensors in the next release, but no date on the post or next release. Do you know when it is due?

Thanks again for the Pronto support, that is just great!

/Michael
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Receive events from NetHomeServer

Post by krambriw »

Hi, yes exactly, the data decoding gets mixed up as a temp/humidity sensor

Can you log the thing (wind speed/direction) using a telnet session (copy/paste the result) so I can see if it is possible to decode already with this NHS version?

I have no info when the next release is due but I will ask next time

Best regards, Walter
Jostein
Experienced User
Posts: 108
Joined: Sun Feb 15, 2009 12:59 pm

Re: Receive events from NetHomeServer

Post by Jostein »

Hi.

I am trying to display the temprature values in a web page. I have made it by using Bitmonster`s webserver posted in here.
I have managed to do it.

The only problem is that the webserver i use is on a different computer than the one with the UPM reciever. I tought that i could use the network event sender to repeat the event put have not been able to do so with the payload.

Do you know how to do it or should i post somewhere else?
mickelin
Experienced User
Posts: 85
Joined: Sun Jan 04, 2009 5:54 pm

Re: Receive events from NetHomeServer

Post by mickelin »

krambriw wrote:Hi, yes exactly, the data decoding gets mixed up as a temp/humidity sensor

Can you log the thing (wind speed/direction) using a telnet session (copy/paste the result)
This is what it looks like in telnet:
subscribe
ok
event,UPM_Message,Direction,In,UPM.DeviceCode,2,UPM.HouseCode,10,UPM.Humidity,8,
UPM.LowBattery,0,UPM.Temp,0
event,UPM_Message,Direction,In,UPM.DeviceCode,2,UPM.HouseCode,10,UPM.Humidity,8,
UPM.LowBattery,0,UPM.Temp,0
event,UPM_Message,Direction,In,UPM.DeviceCode,2,UPM.HouseCode,10,UPM.Humidity,8,
UPM.LowBattery,0,UPM.Temp,0
event,UPM_Message,Direction,In,UPM.DeviceCode,2,UPM.HouseCode,10,UPM.Humidity,8,
UPM.LowBattery,0,UPM.Temp,0
event,UPM_Message,Direction,In,UPM.DeviceCode,2,UPM.HouseCode,10,UPM.Humidity,16
,UPM.LowBattery,0,UPM.Temp,0
event,UPM_Message,Direction,In,UPM.DeviceCode,2,UPM.HouseCode,10,UPM.Humidity,16
,UPM.LowBattery,0,UPM.Temp,0
event,UPM_Message,Direction,In,UPM.DeviceCode,2,UPM.HouseCode,10,UPM.Humidity,24
,UPM.LowBattery,0,UPM.Temp,0
event,UPM_Message,Direction,In,UPM.DeviceCode,2,UPM.HouseCode,10,UPM.Humidity,24
,UPM.LowBattery,0,UPM.Temp,0
event,UPM_Message,Direction,In,UPM.DeviceCode,2,UPM.HouseCode,10,UPM.Humidity,0,
UPM.LowBattery,0,UPM.Temp,0
event,UPM_Message,Direction,In,UPM.DeviceCode,2,UPM.HouseCode,10,UPM.Humidity,0,
UPM.LowBattery,0,UPM.Temp,0
event,UPM_Message,Direction,In,UPM.DeviceCode,2,UPM.HouseCode,10,UPM.Humidity,30
,UPM.LowBattery,0,UPM.Temp,28
event,UPM_Message,Direction,In,UPM.DeviceCode,2,UPM.HouseCode,10,UPM.Humidity,30
,UPM.LowBattery,0,UPM.Temp,28
event,UPM_Message,Direction,In,UPM.DeviceCode,2,UPM.HouseCode,10,UPM.Humidity,0,
UPM.LowBattery,0,UPM.Temp,20
event,UPM_Message,Direction,In,UPM.DeviceCode,2,UPM.HouseCode,10,UPM.Humidity,0,
UPM.LowBattery,0,UPM.Temp,20

I'll see if I can find a compass to get some more accurate direction data
Jostein
Experienced User
Posts: 108
Joined: Sun Feb 15, 2009 12:59 pm

Re: Receive events from NetHomeServer

Post by Jostein »

Hi.
Regarding the wind direction i have maped it completeley. I used the original "Station" set the arrow for N checed that i got N on there an what i got in EG. And so on.

The walue goes from 0 -15
Wind direction.JPG
mickelin you said that you had 2 on N. Are you sure that you had it towards N when you checed. There is an arrow under the arrow for the N direction. If not they might not work the same way.

We should be able to use a phyton scipt to map the humidity to N and so on. I am not that good at that thou so it would be great if somebody can do that.

http://en.wikipedia.org/wiki/Boxing_the_compass

I wil post the wind range later today.
mickelin
Experienced User
Posts: 85
Joined: Sun Jan 04, 2009 5:54 pm

Re: Receive events from NetHomeServer

Post by mickelin »

Hi Jostein,

So you have the actual station! Perfect, then that solves the decoding problem. I was too cheap and only bought the windsensor as a spare part, as you suggested in your previous post.

You are quite right that N is 0, I had only pointed it in the general direction. I have now checked with a compass.

Looking forward to your post on the windspeed decode!

Cheers,
Michael
Jostein
Experienced User
Posts: 108
Joined: Sun Feb 15, 2009 12:59 pm

Re: Receive events from NetHomeServer

Post by Jostein »

I got the whole set as i feared i would not figure it out or get the values at all in to EG.

Using a floor fan and adusting the lenghts to the instrument i was able to get the speed calculations.
Here are the results from reading the speed from the "station" and temp from EG:
Wind Speed.JPG
Wind Speed.JPG (13.06 KiB) Viewed 5685 times
From my calculations it seams that for every extra km/h 0,0625 is added. And we get the table:
Speed calculated.JPG
I have noe idea on how to have a phyton script convert from temp to speed. So i hope you or someone has the skils for that. Or else it is useless. Loking forward to an example or any sugjestions on how to solve it.

Will try to sort out the rain sensor someday if that is wanted?

Regards Jostein
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Receive events from NetHomeServer

Post by krambriw »

Hello,
Great logging!

As we can see from the log, in this NHS version, there is no way to directly see if the message comes from an UPM Termometer, Hygrometer, Windmeter or Rainmeter

A quick solution using the current version of NHS could be that we reserve some house codes for the Wind and Rain devices (if possible to set). Like House code = 15 is reserved for Wind, House code = 14 for Rain

If they are hard coded in the device, I can filter on that (in the log it seems to be 10)

Is it possible to set the house and device code in the devices?

Jostein, do you think you could also log the messages in the telnet session for the wind speed for some sample speeds? Just to check if the protocol sends the same as showed on the display (km/h or miles/hour)

Please give your suggestion if I shall make a version with reserved house codes

Best regards, Walter
mickelin
Experienced User
Posts: 85
Joined: Sun Jan 04, 2009 5:54 pm

Re: Receive events from NetHomeServer

Post by mickelin »

Great progress!

For the windsensor, the house code and device code are hardcoded in the device (10/2), no way to set it. I suspect the same is true for the rainsensor (Jostein?) I believe the house code range for the temp sensor is 1-15, so the risk for conflict should be limited with a "fixed filter" approach.

Walter, may I suggest a config option for windspeed in km/h or m/s? The later is more standard, at least in Sweden.

Jostein, what type of data does the rainsensor send out? Is it just a value based on how much water is in the cup or something more sofisticated?

Cheers,
Michael
Post Reply