Can't send varying data to 1-wire memory.

16 views
Skip to first unread message

Gary Fariss

unread,
Sep 18, 2017, 8:10:47 PM9/18/17
to openremot...@googlegroups.com
Dear openremote'ers,

I'm trying to send various data to one of the memories in a 1-wire DS2438 device. I intend to do this by using "execute.command" in a rule RHS with two parameters. I am using the stripped-down test configuration below. I monitor the page.3 memory by accessing the DS2438 with my browser.

I use the browser to set the 8-byte memory to all-zero. I reboot the raspberry pi. The memory remains all-zero. I "push" the button on the iPhone and "ABC" appears in the memory (4142430000000000 actually).

Further button pushes do not put "999" into the memory. If I change the "Data to send" in the command to none (empty), I get a "java.lang.NullPointerException" in openremote/logs/dev.log.
(see http://www.gizmology.com/dev.log

I sure would like to get this working... Even though openremote is open source, I really don't have the java skills to dig in and make a fix... Worse yet, I have no idea how to rebuild the program if I found a fix.

Help??

BTW: I can READ the memory location display it on the iPhone.

73,
Gary

-------- COMMAND ----------------
Name: Send page data
Protocol: 1-wire Protocol
Hostname: 192.168.1.181
Port: 4304
Device address: SprinkIPC/pages
Sensor attribute: page.3
Temp. scale:
Polling interval: 3s
Data to send: ABC

-------- COMMAND ----------------
Name: Catch Button
Protocol: In-Memory Virtual Command
Command: on
Address: testbutton

-------- SENSOR -----------------
Name: Button Sense
Command: Catch Button
Type: custom
Custom State Items: (empty)

-------- BUTTON -----------------
Command: Catch Button

-------- RULES ------------------
rule "Send to page.3"
when
Event(source=="Button Sense", value=="on")
then
execute.command("Send page data", "999");
end





---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Stuart Hanlon

unread,
Sep 19, 2017, 1:58:07 AM9/19/17
to OpenRemote
Hi

I've never used 1-Wire devices, so this suggestion is purely a guess.


Have you tried using the ${param} variable in the command, so that the 999 of passed to the command?

(Take out the polling interval, as I assume that this resends the command like it does in other protocols)


Like this :-

-------- COMMAND ----------------
Name: Send page data
Protocol: 1-wire Protocol
Hostname: 192.168.1.181
Port: 4304
Device address: SprinkIPC/pages
Sensor attribute: page.3
Temp. scale:
Polling interval:

Data to send: ${param}

Gary Fariss

unread,
Sep 19, 2017, 5:19:48 PM9/19/17
to OpenRemote
Stuart,

Nope. All I get is the ASCII codes for $(param) (2428706172616D29) written into DS2438's memory.

Also, the 1-wire protocol template won't let me leave the polling interval blank and submit it.

Thanks!

73,
Gary
>--
>You received this message because you are subscribed to the Google Groups "OpenRemote" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to openremotecommu...@googlegroups.com.
>Visit this group at https://groups.google.com/group/openremotecommunity.
>To view this discussion on the web visit https://groups.google.com/d/msgid/openremotecommunity/241685b1-180e-4131-8653-ce69791c57d1%40googlegroups.com.
>For more options, visit https://groups.google.com/d/optout.

Michal Rutka

unread,
Sep 20, 2017, 4:45:40 AM9/20/17
to OpenRemote
You need to use curly braces just like Stewart's written. Now you write just the string into the memory.

Gary Fariss

unread,
Sep 20, 2017, 5:28:09 PM9/20/17
to OpenRemote
Michal (and Stuart),

After Sync, I now get ${param} as ASCII in page.3 (247B706172616D7D). This occurs BEFORE I "push" the button.

Also, I can put 0 in the polling interval, but still can't leave it blank and submit.

I see in https://github.com/openremote/Documentation/wiki/OpenRemote-Rules-examples the sentence:
"This rule makes use of the ${param} variable that is deployable in some device protocols."
Is it the case that ${param} is not "deployable" in the 1-wire device protocol implementation?

Thanks!

73,
Gary

At 01:45 AM 9/20/2017, Michal Rutka wrote:
>You need to use curly braces just like Stewart's written. Now you write just the string into the memory.


Reply all
Reply to author
Forward
0 new messages